Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>,
	       GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Consolidate target_mourn_inferior between GDB and gdbserver
Date: Thu, 15 Sep 2016 15:51:00 -0000	[thread overview]
Message-ID: <d8e7fcbd-6446-542c-025a-2d0e17757b10@redhat.com> (raw)
In-Reply-To: <1473655918-2101-1-git-send-email-sergiodj@redhat.com>

On 09/12/2016 05:51 AM, Sergio Durigan Junior wrote:
> This patch consolidates the API of target_mourn_inferior between GDB
> and gdbserver, in my continuing efforts to make sharing the
> fork_inferior function possible between both.
> 
> GDB's version of the function did not care about the inferior's ptid
> being mourned, but gdbserver's needed to know this information.  Since
> it actually makes sense to pass the ptid as an argument, instead of
> depending on a global value directly (which GDB's version did), I
> decided to make the generic API to accept it.  I then went on and
> extended all calls being made on GDB to include a ptid argument (which
> ended up being inferior_ptid most of the times, anyway), and now we
> have a more sane interface.
> 
> On GDB's side, after talking to Pedro a bit about it, we decided that
> just an assertion to make sure that the ptid being passed is equal to
> inferior_ptid would be enough for now, on the GDB side.  We can remove
> the assertion and perform more operations later if we ever pass
> anything different than inferior_ptid.
> 
> Regression tested on our BuildBot, everything OK.
> 

Thanks, patch is OK.

> I'd appreciate a special look at gdb/windows-nat.c's modification
> because I wasn't really sure what to do there.  It seemed to me that
> maybe I should build a ptid out of the process information there, but
> then I am almost sure the assertion on GDB's side would trigger.

Just leave it passing inferior_ptid like all other places, which is
a no-op.  We're certain the assertion does not fail this way.

Thanks,
Pedro Alves


  reply	other threads:[~2016-09-15 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12  4:52 Sergio Durigan Junior
2016-09-15 15:51 ` Pedro Alves [this message]
2016-09-19  4:19   ` Sergio Durigan Junior
2016-09-19 14:39     ` Pedro Alves
2016-09-19 17:07       ` Sergio Durigan Junior
2016-09-20 11:13       ` [PATCH] Use 'event_ptid' instead of 'resume_ptid' on startup_inferior (fix for regression on my last commit) Sergio Durigan Junior
2016-09-20 11:18         ` Pedro Alves
2016-09-20 12:32           ` Sergio Durigan Junior
2016-09-23 13:59     ` [PATCH] Consolidate target_mourn_inferior between GDB and gdbserver Jon Turney
2016-09-23 15:45       ` 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=d8e7fcbd-6446-542c-025a-2d0e17757b10@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sergiodj@redhat.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