Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: "Marc Khouzam" <marc.khouzam@ericsson.com>
Subject: Re: Missing new inferior notification for core files
Date: Tue, 05 May 2009 20:28:00 -0000	[thread overview]
Message-ID: <200905052129.01749.pedro@codesourcery.com> (raw)
In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA0762F13E@ecamlmw720.eamcs.ericsson.se>

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


  reply	other threads:[~2009-05-05 20:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05 20:15 Marc Khouzam
2009-05-05 20:28 ` Pedro Alves [this message]
2009-05-05 20:38   ` Pedro Alves
2009-05-06 13:45     ` Marc Khouzam
2009-05-06 17:27       ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200905052129.01749.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb@sourceware.org \
    --cc=marc.khouzam@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox