* 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.
This commit is contained in:
Pedro Alves
2011-01-28 16:18:55 +00:00
parent e8c9e0a18f
commit ffd5ec2486
4 changed files with 55 additions and 29 deletions

View File

@@ -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

View File

@@ -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