From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23397 invoked by alias); 13 Dec 2008 19:24:25 -0000 Received: (qmail 23389 invoked by uid 22791); 13 Dec 2008 19:24:25 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 13 Dec 2008 19:23:50 +0000 Received: from spaceape24.eur.corp.google.com (spaceape24.eur.corp.google.com [172.28.16.76]) by smtp-out.google.com with ESMTP id mBDJNlUx022186 for ; Sat, 13 Dec 2008 11:23:48 -0800 Received: from rv-out-0506.google.com (rvbf6.prod.google.com [10.140.82.6]) by spaceape24.eur.corp.google.com with ESMTP id mBDJNjV4017381 for ; Sat, 13 Dec 2008 11:23:46 -0800 Received: by rv-out-0506.google.com with SMTP id f6so2112075rvb.55 for ; Sat, 13 Dec 2008 11:23:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.141.152.9 with SMTP id e9mr1734920rvo.189.1229196224766; Sat, 13 Dec 2008 11:23:44 -0800 (PST) In-Reply-To: <20081213001325.F05871C7A79@localhost> References: <20081213001325.F05871C7A79@localhost> Date: Sat, 13 Dec 2008 19:24:00 -0000 Message-ID: Subject: Re: linux-low.c: stop_all_processes vs longjmp snafu? From: Doug Evans To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00052.txt.bz2 On Fri, Dec 12, 2008 at 4:13 PM, Doug Evans 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++ ...]