Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(835)

Unified Diff: gdb/testsuite/gdb.trace/trace-break.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.trace/tfind.exp ('k') | gdb/testsuite/gdb.trace/trace-mt.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.trace/trace-break.exp
diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp
index 1c372d4ff74ec6682f4fee24552fa79aecc086e0..d75e2bc0ac8b808cda370ee80f876aee1e637c9b 100644
--- a/gdb/testsuite/gdb.trace/trace-break.exp
+++ b/gdb/testsuite/gdb.trace/trace-break.exp
@@ -14,10 +14,8 @@
load_lib "trace-support.exp";
-set testfile "trace-break"
+standard_testfile
set executable $testfile
-set srcfile $testfile.c
-set binfile $objdir/$subdir/$testfile
set expfile $testfile.exp
# Some targets have leading underscores on assembly symbols.
@@ -55,19 +53,16 @@ if [is_amd64_regs_target] {
# Set breakpoint and tracepoint at the same address.
-proc break_trace_same_addr_1 { trace_type option } {
+proc break_trace_same_addr_1 { trace_type option } \
+{ with_test_prefix "1 $trace_type $option" \
+{
global executable
- global pf_prefix
global hex
- set old_pf_prefix $pf_prefix
- set pf_prefix "$pf_prefix 1 $trace_type $option:"
-
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -87,25 +82,20 @@ proc break_trace_same_addr_1 { trace_type option } {
gdb_test "tfind" "Found trace frame 0, tracepoint .*" "tfind frame 0"
gdb_test "tfind" "Target failed to find requested trace frame\\..*"
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Set multiple tracepoints at the same address.
-proc break_trace_same_addr_2 { trace_type1 trace_type2 option } {
+proc break_trace_same_addr_2 { trace_type1 trace_type2 option } \
+{ with_test_prefix "2 $trace_type1 $trace_type2 $option" \
+{
global executable
- global pf_prefix
global hex
- set old_pf_prefix $pf_prefix
- set pf_prefix "$pf_prefix 2 $trace_type1 $trace_type2 $option:"
-
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -129,26 +119,21 @@ proc break_trace_same_addr_2 { trace_type1 trace_type2 option } {
gdb_test "tfind" "Found trace frame 0, tracepoint .*" "tfind frame 0"
gdb_test "tfind" "Found trace frame 1, tracepoint .*" "tfind frame 1"
gdb_test "tfind" "Target failed to find requested trace frame\\..*"
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Set breakpoint and tracepoint at the same address. Delete breakpoint, and verify
# that tracepoint still works.
-proc break_trace_same_addr_3 { trace_type option } {
+proc break_trace_same_addr_3 { trace_type option } \
+{ with_test_prefix "3 $trace_type $option" \
+{
global executable
- global pf_prefix
global hex
- set old_pf_prefix $pf_prefix
- set pf_prefix "$pf_prefix 3 $trace_type $option:"
-
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -169,26 +154,22 @@ proc break_trace_same_addr_3 { trace_type option } {
gdb_test "tfind" "Found trace frame 0, tracepoint .*" "tfind frame 0"
gdb_test "tfind" "Target failed to find requested trace frame\\..*"
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Set breakpoint and tracepoint at the same address. Delete tracepoint, and verify
# that breakpoint still works.
-proc break_trace_same_addr_4 { trace_type option } {
+proc break_trace_same_addr_4 { trace_type option } \
+{ with_test_prefix "4 $trace_type $option" \
+{
global executable
- global pf_prefix
global hex
- set old_pf_prefix $pf_prefix
- set pf_prefix "$pf_prefix 4 $trace_type $option:"
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -210,31 +191,26 @@ proc break_trace_same_addr_4 { trace_type option } {
gdb_test "tstop" "Trace is not running.*"
gdb_test "tfind" "Target failed to find requested trace frame\\..*"
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Set two tracepoints TRACE1 and TRACE2 at two locations, and start tracing.
# Then, set tracepoint TRACE3 at either of these two locations.
# TRACE3_AT_FIRST_LOC is a boolean variable to decide insert TRACE3 at which
# of two locations. Verify these tracepoints work as expected.
-proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } {
+proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \
+{ with_test_prefix "5 $trace1 $trace2 ${trace3}@${trace3_at_first_loc}" \
+{
global executable
- global pf_prefix
global hex
global fpreg
global spreg
global pcreg
- set old_pf_prefix $pf_prefix
- set pf_prefix "$pf_prefix 5 $trace1 $trace2 ${trace3}@${trace3_at_first_loc}:"
-
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -289,29 +265,24 @@ proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } {
gdb_test "tdump" \
"Data collected at tracepoint .*, trace frame \[0-9\]:.*\\$${fpreg} = .*" \
"tdump 3"
-
- set pf_prefix $old_pf_prefix
-}
+}}
# Set two tracepoints at the same address, and enable/disable them. Verify
# tracepoints work as expect.
-proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } {
+proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } \
+{ with_test_prefix "6 $trace1 $enable1 $trace2 $enable2" \
+{
global executable
- global pf_prefix
global hex
global gdb_prompt
global spreg
global pcreg
- set old_pf_prefix $pf_prefix
- set pf_prefix "$pf_prefix 6 $trace1 $enable1 $trace2 $enable2:"
-
# Start with a fresh gdb.
clean_restart ${executable}
if ![runto_main] {
fail "Can't run to main"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -362,9 +333,7 @@ proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } {
gdb_test "tfind tracepoint 5" "Target failed to find requested trace frame.*" \
"tfind test frame of tracepoint 5"
}
-
- set pf_prefix $old_pf_prefix
-}
+}}
foreach break_always_inserted { "on" "off" } {
@@ -381,7 +350,7 @@ foreach at_first_loc { "1" "0" } {
break_trace_same_addr_6 "trace" "enable" "trace" "disable"
break_trace_same_addr_6 "trace" "disable" "trace" "enable"
-set libipa $objdir/../gdbserver/libinproctrace.so
+set libipa [get_in_proc_agent]
gdb_load_shlibs $libipa
# Can't use prepare_for_testing, because that splits compiling into
@@ -401,7 +370,7 @@ if ![runto_main] {
}
gdb_reinitialize_dir $srcdir/$subdir
-if { [gdb_test "info sharedlibrary" ".*libinproctrace\.so.*" "IPA loaded"] != 0 } {
+if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } {
untested "Could not find IPA lib loaded"
} else {
foreach break_always_inserted { "on" "off" } {
« no previous file with comments | « gdb/testsuite/gdb.trace/tfind.exp ('k') | gdb/testsuite/gdb.trace/trace-mt.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698