This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Missing new inferior notification for core files


A Tuesday 05 May 2009 21:15:23, Marc Khouzam wrote:

> with HEAD of April 30th, I noticed that there is no notification
> of a new inferior when connecting to a core file.  This is on Linux.
> 
> Note that the session below uses MI, but I also tried
> plain CLI and used 'set print inferior-events 1';
> in that case still, no [New inferior ] event was shown.
> So, inferior.c#add_inferior() does not seem to get called for a core
> file.
>
> This causes a problem for DSF-GDB because it is not made
> aware that a new inferior must be shown to the user.

The observer_notify_new_inferior call should move from add_inferior
to add_inferior_silent.  corelow.c:core_open should probably also
be made a bit smarter to only delay adding the new inferior until
the pid of the core file is known.  As is currently, on some targets,
(e.g., solaris), the thread group's target pid will always start
as `1' and immediately changes to the pid the process had when it
crashed,  if that pid is retrievable (although the gdb inferior id
never changes) --- there's no defined MI notification for this id
change.  This last bit doesn't currently affect linux though.

> Maybe this is a simple fix that can get in before branch time for 7.0?

Patch and/or a bugzilla PR is welcome.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]