This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: linux-low.c: stop_all_processes vs longjmp snafu?
- From: Doug Evans <dje at google dot com>
- To: gdb at sourceware dot org
- Date: Sat, 13 Dec 2008 11:23:44 -0800
- Subject: Re: linux-low.c: stop_all_processes vs longjmp snafu?
- References: <20081213001325.F05871C7A79@localhost>
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++ ...]