diff options
author | Pedro Alves <palves@redhat.com> | 2011-04-20 17:01:11 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-04-20 17:01:11 +0000 |
commit | b78974c3b4cea6c98cb8dfd9c0bee59efd45d311 (patch) | |
tree | f469d8b9134b15398d79696f3c16c0135b8d4318 /gdb/testsuite/gdb.base/maint.exp | |
parent | 15be625dff82153e4e05018a22c6cd66ba160f70 (diff) | |
download | gdb-b78974c3b4cea6c98cb8dfd9c0bee59efd45d311.zip gdb-b78974c3b4cea6c98cb8dfd9c0bee59efd45d311.tar.gz gdb-b78974c3b4cea6c98cb8dfd9c0bee59efd45d311.tar.bz2 |
2011-04-20 Pedro Alves <pedro@codesourcery.com>
gdb/
* regcache.c (get_thread_arch_regcache): If creating a regcache for
null_ptid, assume and allow a NULL address space, instead of
asking the target for the ptid's address space.
* infrun.c (ptid_is_pid): Remove assertion.
gdb/testsuite/
* gdb.base/maint.exp: Test that "maint print registers" works
without a running program.
Diffstat (limited to 'gdb/testsuite/gdb.base/maint.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/maint.exp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index 843391a..61ad439 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -54,10 +54,6 @@ if $tracelevel then { global usestubs -# -# test running programs -# - set testfile "break" set srcfile ${testfile}.c set srcfile1 ${testfile}1.c @@ -82,6 +78,21 @@ if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir + +# The commands we test here produce many lines of output; disable "press +# <return> to continue" prompts. +gdb_test_no_output "set height 0" + +# Tests that require that no program is running + +gdb_file_cmd ${binfile} + +# Test for a regression where this command would internal-error if the +# program wasn't running. +gdb_test "maint print registers" "Name.*Nr.*Rel.*Offset.*Size.*Type.*" + +# Tests that can or should be done with a running program + gdb_load ${binfile} if ![runto_main] then { @@ -89,11 +100,6 @@ if ![runto_main] then { } -# The commands we test here produce many lines of output; disable "press -# <return> to continue" prompts. -gdb_test_no_output "set height 0" - - # # this command does not produce any output # unless there is some problem with the symtabs and psymtabs |