aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.btrace/tailcall.exp
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2013-09-10 12:27:14 +0200
committerMarkus Metzger <markus.t.metzger@intel.com>2014-01-16 13:12:00 +0100
commit6e07b1d27e5d3fb20e7d13f0cadfd923243fc48d (patch)
tree9e0046ecb5176806772d54c8369024d04a6ae82d /gdb/testsuite/gdb.btrace/tailcall.exp
parent969c39fbcd6a5675c1f4b97cd23d680e4b5b6487 (diff)
downloadgdb-6e07b1d27e5d3fb20e7d13f0cadfd923243fc48d.zip
gdb-6e07b1d27e5d3fb20e7d13f0cadfd923243fc48d.tar.gz
gdb-6e07b1d27e5d3fb20e7d13f0cadfd923243fc48d.tar.bz2
record-btrace: show trace from enable location
The btrace record target shows the branch trace from the location of the first branch destination. This is the first BTS records. After adding incremental updates, we can now add a dummy record for the current PC when we enable tracing so we show the trace from the location where branch tracing has been enabled. 2014-01-16 Markus Metzger <markus.t.metzger@intel.com> * btrace.c: Include regcache.h. (btrace_add_pc): New. (btrace_enable): Call btrace_add_pc. (btrace_is_empty): New. * btrace.h (btrace_is_empty): New. * record-btrace.c (require_btrace, record_btrace_info): Call btrace_is_empty. testsuite/ * gdb.btrace/Makefile.in (EXECUTABLES): Add delta. * gdb.btrace/exception.exp: Update. * gdb.btrace/instruction_history.exp: Update. * gdb.btrace/record_goto.exp: Update. * gdb.btrace/tailcall.exp: Update. * gdb.btrace/unknown_functions.exp: Update. * gdb.btrace/delta.exp: New.
Diffstat (limited to 'gdb/testsuite/gdb.btrace/tailcall.exp')
-rw-r--r--gdb/testsuite/gdb.btrace/tailcall.exp16
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.btrace/tailcall.exp b/gdb/testsuite/gdb.btrace/tailcall.exp
index a001783..23988f2 100644
--- a/gdb/testsuite/gdb.btrace/tailcall.exp
+++ b/gdb/testsuite/gdb.btrace/tailcall.exp
@@ -49,20 +49,22 @@ gdb_test "next"
# show the flat branch trace
gdb_test "record function-call-history 1" [join [list \
- "1\tfoo" \
- "2\tbar" \
- "3\tmain" \
+ "1\tmain" \
+ "2\tfoo" \
+ "3\tbar" \
+ "4\tmain" \
] "\r\n"] "flat"
# show the branch trace with calls indented
gdb_test "record function-call-history /c 1" [join [list \
- "1\t foo" \
- "2\t bar" \
- "3\tmain" \
+ "1\tmain" \
+ "2\t foo" \
+ "3\t bar" \
+ "4\tmain" \
] "\r\n"] "indented"
# go into bar
-gdb_test "record goto 3" ".*bar \\(\\) at .*x86-tailcall.c:24\r\n.*"
+gdb_test "record goto 4" ".*bar \\(\\) at .*x86-tailcall.c:24\r\n.*"
# check the backtrace
gdb_test "backtrace" [join [list \