diff options
author | Pedro Alves <palves@redhat.com> | 2011-01-28 16:18:55 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-01-28 16:18:55 +0000 |
commit | ffd5ec2486b4786e903d72aca3cc42aade30b15f (patch) | |
tree | 356ac10e3f74d39f759adf0f8778a39820a6046a /gdb/testsuite | |
parent | e8c9e0a18f11d0247f43aecf6771494ee033177a (diff) | |
download | gdb-ffd5ec2486b4786e903d72aca3cc42aade30b15f.zip gdb-ffd5ec2486b4786e903d72aca3cc42aade30b15f.tar.gz gdb-ffd5ec2486b4786e903d72aca3cc42aade30b15f.tar.bz2 |
gdb/
* tracepoint.c (tfile_xfer_partial): If there's no traceframe
selected, don't try iterating over the traceframe's blocks.
(tfile_has_stack): If there's no traceframe selected, then there's
no stack.
(tfile_has_registers): If there's no traceframe selected, then
there's no registers.
gdb/testsuite/
* gdb.trace/tfile.exp: Test that with no traceframe selected,
there's no stack or registers.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.trace/tfile.exp | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3b9b284..1e7543e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-01-28 Pedro Alves <pedro@codesourcery.com> + + * gdb.trace/tfile.exp: Test that with no traceframe selected, + there's no stack or registers. + 2011-01-26 Tom Tromey <tromey@redhat.com> * gdb.python/py-prettyprint.exp (run_lang_tests): Ensure no blank diff --git a/gdb/testsuite/gdb.trace/tfile.exp b/gdb/testsuite/gdb.trace/tfile.exp index ec21a89..0614423 100644 --- a/gdb/testsuite/gdb.trace/tfile.exp +++ b/gdb/testsuite/gdb.trace/tfile.exp @@ -92,6 +92,14 @@ Trace buffer has 256 bytes of 4096 bytes free \\(93% full\\).* Looking at trace frame 0, tracepoint .*" \ "tstatus on trace file" +gdb_test "tfind end" "No longer looking at any trace frame" "leave tfind mode" + +gdb_test "backtrace" "No stack\." \ + "no stack if no traceframe selected" + +gdb_test "info registers" "The program has no registers now\." \ + "no registers if no traceframe selected" + # Now start afresh, using only a trace file. gdb_exit |