This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix usage of inferior_ptid in two thread_alive implementations
> Date: Wed, 22 Feb 2017 16:06:50 -0500
> From: Simon Marchi <simon.marchi@polymtl.ca>
> Cc: Pedro Alves <palves@redhat.com>, simon.marchi@ericsson.com,
> gdb-patches@sourceware.org
>
> > 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).
Go32 indeed doesn't support multiple threads.
> But still it would be "more correct" to read the parameter instead
> of the global, IMO.
I didn't say anything to the contrary. I'm saying that if go32
doesn't have this function called, I don't have to worry about the
implications of the change.