This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix AIX breakage - Re: [RFA] Keep breakpoints always inserted.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Cc: vladimir at codesourcery dot com
- Date: Sun, 4 May 2008 01:27:24 +0200 (CEST)
- Subject: [commit] Fix AIX breakage - Re: [RFA] Keep breakpoints always inserted.
Vladimir Prus wrote:
>@@ -1402,6 +1402,10 @@ handle_inferior_event (struct execution_control_state *ecs)
> we're attaching or setting up a remote connection. */
> if (stop_soon == STOP_QUIETLY || stop_soon == NO_STOP_QUIETLY)
> {
>+ /* Loading of shared libraries might have changed breakpoint
>+ addresses. Make sure new breakpoints are inserted. */
>+ if (!breakpoints_always_inserted_mode ())
>+ insert_breakpoints ();
> resume (0, TARGET_SIGNAL_0);
> prepare_to_wait (ecs);
> return;
This change completely breaks AIX, as there you'll get TARGET_WAITKIND_LOADED
during startup (refering to shared libraries used by the *shell* that runs
before the actual inferior is started). We must not insert breakpoints
intended for the inferior into the shell ...
Fixed by the patch below. Tested on powerpc-ibm-aix5.3.0.0;
committed to mainline.
Bye,
Ulrich
ChangeLog:
* infrun.c (handle_inferior_event): Do not insert breakpoints at
TARGET_WAITKIND_LOADED events during startup (i.e. in the shell).
diff -urNp gdb-orig/gdb/infrun.c gdb-head/gdb/infrun.c
--- gdb-orig/gdb/infrun.c 2008-05-03 17:19:02.000000000 -0400
+++ gdb-head/gdb/infrun.c 2008-05-03 17:45:46.000000000 -0400
@@ -1817,7 +1817,8 @@ handle_inferior_event (struct execution_
{
/* Loading of shared libraries might have changed breakpoint
addresses. Make sure new breakpoints are inserted. */
- if (!breakpoints_always_inserted_mode ())
+ if (stop_soon == NO_STOP_QUIETLY
+ && !breakpoints_always_inserted_mode ())
insert_breakpoints ();
resume (0, TARGET_SIGNAL_0);
prepare_to_wait (ecs);
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com