This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix always-inserted breakpoints for extended remote
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Thu, 8 May 2008 12:10:22 -0400
- Subject: [commit] Fix always-inserted breakpoints for extended remote
Here's an example of why I wanted a test for always-inserted
breakpoints, even though it is mostly useful as the default setting
for nonstop mode: it was broken in the extended-remote configuration I
use to test Symbian OS.
init_wait_for_inferior will mark all breakpoints as uninserted. Since
get_offsets may cause breakpoints to be inserted (objfile_relocate
to breakpoint_re_set), make sure to mark them uninserted first, not
after. Otherwise we'll insert them twice.
Tested on arm-symbianelf, committed.
--
Daniel Jacobowitz
CodeSourcery
2008-05-08 Daniel Jacobowitz <dan@codesourcery.com>
* remote.c (extended_remote_create_inferior_1): Clean up
before marking the target running.
--- remote.c (revision 1037)
+++ remote.c (local)
@@ -5468,6 +5468,12 @@ extended_remote_create_inferior_1 (char
extended_remote_restart ();
}
+ /* Clean up from the last time we ran, before we mark the target
+ running again. This will mark breakpoints uninserted, and
+ get_offsets may insert breakpoints. */
+ init_thread_list ();
+ init_wait_for_inferior ();
+
/* Now mark the inferior as running before we do anything else. */
attach_flag = 0;
inferior_ptid = pid_to_ptid (MAGIC_NULL_PID);
@@ -5478,10 +5484,6 @@ extended_remote_create_inferior_1 (char
/* Get updated offsets, if the stub uses qOffsets. */
get_offsets ();
-
- /* Clean up from the last time we were running. */
- init_thread_list ();
- init_wait_for_inferior ();
}
static void