Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Pedro Alves <palves@redhat.com>,
	simon.marchi@ericsson.com, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix usage of inferior_ptid in two thread_alive  implementations
Date: Wed, 22 Feb 2017 21:06:00 -0000	[thread overview]
Message-ID: <3050e2df7823690bc1b6d77920ec1303@polymtl.ca> (raw)
In-Reply-To: <83o9yb3xdx.fsf@gnu.org>

On 2017-02-09 15:46, Eli Zaretskii wrote:
>> Cc: Simon Marchi <simon.marchi@ericsson.com>, 
>> gdb-patches@sourceware.org
>> From: Pedro Alves <palves@redhat.com>
>> Date: Thu, 9 Feb 2017 17:53:16 +0000
>> 
>> On 02/09/2017 04:46 PM, Simon Marchi wrote:
>> > On 2017-02-08 07:40, Pedro Alves wrote:
>> >> On 02/07/2017 09:24 PM, Simon Marchi wrote:
>> >>> While inspecting some target code, I noticed that in these two
>> >>> implementations of thread_alive, inferior_ptid is referenced directly
>> >>> instead of using the ptid passed as parameters.  I guess that it is
>> >>> wrong, although I can't really test it in both cases.
>> >>
>> >> I can't test either, but it looks right to me.
>> >
>> > Soooo.. is this an approval :) ?
>> 
>> OK by the end of the week to give a chance of area
>> maintainers or interested folks to comment.  E.g., Eli
>> is the go32-nat.c maintainer and I don't mean to overstep,
>> though that bit does look obvious to me.
> 
> Is that function even called in the go32 port?

Why wouldn't it?  For example, you could have this pseudo-stack:

#0 go32_thread_alive
#1 target_thread_alive
#2 thread_alive
#3 thread_apply_all_command

If this target doesn't support multiple threads, it's possible that 
inferior_ptid will always be equal to ptid (equal to the only existing 
thread).  But still it would be "more correct" to read the parameter 
instead of the global, IMO.

Simon


  reply	other threads:[~2017-02-22 21:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 21:25 Simon Marchi
2017-02-08 12:40 ` Pedro Alves
2017-02-09 16:46   ` Simon Marchi
2017-02-09 17:53     ` Pedro Alves
2017-02-09 20:47       ` Eli Zaretskii
2017-02-22 21:06         ` Simon Marchi [this message]
2017-02-23  3:36           ` Eli Zaretskii
2017-02-23 15:57             ` Simon Marchi
2017-03-29 20:30       ` John Baldwin
2017-03-30  0:51         ` Simon Marchi

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=3050e2df7823690bc1b6d77920ec1303@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@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