This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Move new_inferior notification call (was: Missing new inferior notification for core files)
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Marc Khouzam <marc dot khouzam at ericsson dot com>
- Date: Wed, 6 May 2009 18:24:47 +0100
- Subject: Move new_inferior notification call (was: Missing new inferior notification for core files)
As discussed on:
http://sourceware.org/ml/gdb/2009-05/msg00021.html
No regressions on x86_64-linux. I'm checking it in.
--
Pedro Alves
2009-05-06 Pedro Alves <pedro@codesourcery.com>
* inferior.c (add_inferior): Move observer_notify_new_inferior
call to...
(add_inferior_silent): ... here.
---
gdb/inferior.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: src/gdb/inferior.c
===================================================================
--- src.orig/gdb/inferior.c 2009-05-06 18:00:00.000000000 +0100
+++ src/gdb/inferior.c 2009-05-06 18:20:48.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);