* Thread ID in gdbserver
@ 2005-06-06 5:25 Atsushi Nemoto
2005-06-06 13:46 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Atsushi Nemoto @ 2005-06-06 5:25 UTC (permalink / raw)
To: gdb
Hi. In Mar 2005, the type of cont_thread, stop_thread, etc. was
changed to "unsigned long" from "int". But there are still some codes
which assume these variables are signed numbers.
For example, in gdbserver/server.c:
unsigned long cont_thread;
...
if (n == 1 && resume_info[0].thread != -1)
cont_thread = resume_info[0].thread;
else
cont_thread = -1;
...
if (step || sig || cont_thread > 0)
This looks very suspicious.
For now I do not know whether this is real problem, but it is
potential bug and should be fixed, isn't it?
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Thread ID in gdbserver
2005-06-06 5:25 Thread ID in gdbserver Atsushi Nemoto
@ 2005-06-06 13:46 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-06-06 13:46 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: gdb
On Mon, Jun 06, 2005 at 02:25:17PM +0900, Atsushi Nemoto wrote:
> Hi. In Mar 2005, the type of cont_thread, stop_thread, etc. was
> changed to "unsigned long" from "int". But there are still some codes
> which assume these variables are signed numbers.
>
> For example, in gdbserver/server.c:
>
> unsigned long cont_thread;
> ...
> if (n == 1 && resume_info[0].thread != -1)
> cont_thread = resume_info[0].thread;
> else
> cont_thread = -1;
> ...
> if (step || sig || cont_thread > 0)
>
> This looks very suspicious.
>
> For now I do not know whether this is real problem, but it is
> potential bug and should be fixed, isn't it?
Absolutely. I have a bunch of saved mail in my todo list reminding me
to fix these, but I haven't yet. With a modern GDB using vCont, most
of these bugs are not encountered; I didn't do a detailed analysis of
the others to see if they'd cause problems, it would be easier to fix
them.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-06 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-06 5:25 Thread ID in gdbserver Atsushi Nemoto
2005-06-06 13:46 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox