This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Missing new inferior notification for core files
> -----Original Message-----
> From: gdb-owner@sourceware.org
> [mailto:gdb-owner@sourceware.org] On Behalf Of Pedro Alves
> Sent: Tuesday, May 05, 2009 4:39 PM
> To: gdb@sourceware.org
> Cc: Marc Khouzam
> Subject: Re: Missing new inferior notification for core files
>
> On Tuesday 05 May 2009 21:29:01, Pedro Alves wrote:
> > A Tuesday 05 May 2009 21:15:23, Marc Khouzam wrote:
>
> > > Maybe this is a simple fix that can get in before branch
> time for 7.0?
> >
> > Patch and/or a bugzilla PR is welcome.
My apologies about not providing such a simple fix myself.
To be honnest, I hadn't realized it would be soooo easy.
> On second thought, this way is simpler. Try this. I'm giving it a
> testsuite spin. We'll handle the inferior pid change later.
Of course, this worked great.
Thanks!
>
> --
> Pedro Alves
>
> ---
> gdb/inferior.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: src/gdb/inferior.c
> ===================================================================
> --- src.orig/gdb/inferior.c 2009-05-05 21:34:08.000000000 +0100
> +++ src/gdb/inferior.c 2009-05-05 21:34:34.000000000 +0100
> @@ -84,6 +84,8 @@ add_inferior_silent (int pid)
> inf->next = inferior_list;
> inferior_list = inf;
>
> + observer_notify_new_inferior (pid);
> +
> return inf;
> }
>
> @@ -92,8 +94,6 @@ add_inferior (int pid)
> {
> struct inferior *inf = add_inferior_silent (pid);
>
> - observer_notify_new_inferior (pid);
> -
> if (print_inferior_events)
> printf_unfiltered (_("[New inferior %d]\n"), pid);
>
>