* linux-low.c: stop_all_processes vs longjmp snafu?
@ 2008-12-13 0:14 Doug Evans
2008-12-13 19:24 ` Doug Evans
0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2008-12-13 0:14 UTC (permalink / raw)
To: gdb
linux-low.c:stop_all_processes is the only place that sets stopping_threads:
static void
stop_all_processes (void)
{
stopping_threads = 1;
for_each_inferior (&all_processes, send_sigstop);
for_each_inferior (&all_processes, wait_for_sigstop);
stopping_threads = 0;
}
and all functions that test stopping_threads can throw an error
(call longjmp).
I'm guessing fixing this is waiting on someone to remove stopping_threads,
right?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-low.c: stop_all_processes vs longjmp snafu?
2008-12-13 0:14 linux-low.c: stop_all_processes vs longjmp snafu? Doug Evans
@ 2008-12-13 19:24 ` Doug Evans
2008-12-14 18:32 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2008-12-13 19:24 UTC (permalink / raw)
To: gdb
On Fri, Dec 12, 2008 at 4:13 PM, Doug Evans <dje@google.com> wrote:
> linux-low.c:stop_all_processes is the only place that sets stopping_threads:
>
> static void
> stop_all_processes (void)
> {
> stopping_threads = 1;
> for_each_inferior (&all_processes, send_sigstop);
> for_each_inferior (&all_processes, wait_for_sigstop);
> stopping_threads = 0;
> }
>
> and all functions that test stopping_threads can throw an error
> (call longjmp).
>
> I'm guessing fixing this is waiting on someone to remove stopping_threads,
> right?
I was thinking that we don't want to support nested setjmps. But in a
case like this do we want to continue to try to stop all processes
even if stopping one of them throws an error? [assuming we're keeping
setjmp and not rewriting gdbserver in c++ ...]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-low.c: stop_all_processes vs longjmp snafu?
2008-12-13 19:24 ` Doug Evans
@ 2008-12-14 18:32 ` Daniel Jacobowitz
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2008-12-14 18:32 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb
On Sat, Dec 13, 2008 at 11:23:44AM -0800, Doug Evans wrote:
> I was thinking that we don't want to support nested setjmps. But in a
> case like this do we want to continue to try to stop all processes
> even if stopping one of them throws an error? [assuming we're keeping
> setjmp and not rewriting gdbserver in c++ ...]
I'm more thinking that we should do actual error handling in
gdbserver, and ditch the longjmp based version. It almost never
works. It tends to leave state inconsistent; and up until recently
(or maybe still) it left the protocol state machine in the wrong state.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-14 18:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-13 0:14 linux-low.c: stop_all_processes vs longjmp snafu? Doug Evans
2008-12-13 19:24 ` Doug Evans
2008-12-14 18:32 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox