This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
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.
On second thought, this way is simpler. Try this. I'm giving it a
testsuite spin. We'll handle the inferior pid change later.
--
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);