gdb/
authorPedro Alves <palves@redhat.com>
Tue, 8 Mar 2011 12:46:52 +0000 (12:46 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 8 Mar 2011 12:46:52 +0000 (12:46 +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 135a1612c1622dbb85eca784a7ce8071e586d242..05d8314fac73367bef3721f4775b729634960736 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-03-08  Joel Brobecker  <brobecker@adacore.com>
 
        * target.c (read_whatever_is_readable): Reformat comment,
index 8c4176c93e368e67f3d4aea15d6fff8e227871af..3034e618b93e6828a8681d2a19b9e2ab7d718f23 100644 (file)
@@ -3435,10 +3435,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 e5092b1c359b874b599d786d75243c224ba8e63a..6ff5c1011ac6b05a345db6335c0db7b8b07467ad 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-03-07  Tom Tromey  <tromey@redhat.com>
 
        * Makefile.in (TAGS): Rewrite.
index f54f91d572b95b90295902047111dae5c394eaa3..b9305274202952986b03f36da4054a8d04d8cb1f 100644 (file)
@@ -60,4 +60,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"
This page took 0.056708 seconds and 4 git commands to generate.