]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/
authorPedro Alves <palves@redhat.com>
Tue, 8 Mar 2011 12:11:50 +0000 (12:11 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 8 Mar 2011 12:11:50 +0000 (12:11 +0000)
2011-03-08  Pedro Alves  <pedro@codesourcery.com>

* remote.c (remote_check_symbols): Skip if the target has no
execution.

gdb/testsuite/
2011-03-08  Jan Kratochvil  <jan.kratochvil@redhat.com>

* gdb.server/ext-run.exp
(load new file without any gdbserver inferior): New test.

gdb/ChangeLog
gdb/remote.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.server/ext-run.exp

index 289c5e29cd6f6c8684781d5bd37175ee89d1cc7b..df6ec776c549c458114a848c613368ad0253251b 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-08  Pedro Alves  <pedro@codesourcery.com>
+
+       * remote.c (remote_check_symbols): Skip if the target has no
+       execution.
+
 2011-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
 
        * c-valprint.c (c_val_print): Add embedded_offset to address
index d1b52b796243f05d96938c6572b6c4f14b8fccc6..70daf82132c957d90f7aba9712309b02e384ee8f 100644 (file)
@@ -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,
index 4889adda85da7da3143f1734ed1ee75dbbed5166..e5e6c42cce6fe3ab1ed1ce7249e5eb380f95b654 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * gdb.server/ext-run.exp
+       (load new file without any gdbserver inferior): New test.
+
 2011-01-14  Joel Brobecker  <brobecker@adacore.com>
 
        * gdb.base/wchar.c, gdb.base/wchar.exp: New testcases.
index d8fda739260bd95ef4bd7ec5ec630b498bca893d..00164323686d6e3a9477410763ea7cabfd541b63 100644 (file)
@@ -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"