From: Pedro Alves Date: Tue, 8 Mar 2011 12:11:50 +0000 (+0000) Subject: gdb/ X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b7edaecd0486c0ca33b3bb8bd05427a979a55bf;p=thirdparty%2Fbinutils-gdb.git gdb/ 2011-03-08 Pedro Alves * remote.c (remote_check_symbols): Skip if the target has no execution. gdb/testsuite/ 2011-03-08 Jan Kratochvil * gdb.server/ext-run.exp (load new file without any gdbserver inferior): New test. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 289c5e29cd6..df6ec776c54 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Pedro Alves + + * remote.c (remote_check_symbols): Skip if the target has no + execution. + 2011-02-18 Pierre Muller * c-valprint.c (c_val_print): Add embedded_offset to address diff --git a/gdb/remote.c b/gdb/remote.c index d1b52b79624..70daf82132c 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -3431,10 +3431,19 @@ remote_check_symbols (struct objfile *objfile) struct minimal_symbol *sym; int end; + /* The remote side has no concept of inferiors that aren't running + yet, it only knows about running processes. If we're connected + but our current inferior is not running, we should not invite the + remote target to request symbol lookups related to its + (unrelated) current process. */ + if (!target_has_execution) + return; + if (remote_protocol_packets[PACKET_qSymbol].support == PACKET_DISABLE) return; - /* Make sure the remote is pointing at the right process. */ + /* Make sure the remote is pointing at the right process. Note + there's no way to select "no process". */ set_general_process (); /* Allocate a message buffer. We can't reuse the input buffer in RS, diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4889adda85d..e5e6c42cce6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Jan Kratochvil + + * gdb.server/ext-run.exp + (load new file without any gdbserver inferior): New test. + 2011-01-14 Joel Brobecker * gdb.base/wchar.c, gdb.base/wchar.exp: New testcases. diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp index d8fda739260..00164323686 100644 --- a/gdb/testsuite/gdb.server/ext-run.exp +++ b/gdb/testsuite/gdb.server/ext-run.exp @@ -57,4 +57,9 @@ if { [istarget *-*-linux*] } { } gdb_test "kill" "" "kill" "Kill the program being debugged.*" "y" + +gdb_load $binfile +gdb_test "monitor help" "The following monitor commands.*" \ + "load new file without any gdbserver inferior" + gdb_test_no_output "monitor exit"