From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30583 invoked by alias); 16 Jun 2008 22:28:25 -0000 Received: (qmail 30567 invoked by uid 22791); 16 Jun 2008 22:28:24 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 16 Jun 2008 22:27:54 +0000 Received: from kahikatea.snap.net.nz (147.61.255.123.dynamic.snap.net.nz [123.255.61.147]) by viper.snap.net.nz (Postfix) with ESMTP id 374863DBC2C; Tue, 17 Jun 2008 10:27:51 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 0769E8FC6D; Tue, 17 Jun 2008 10:27:49 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <18518.59619.663844.666466@kahikatea.snap.net.nz> Date: Tue, 17 Jun 2008 04:24:00 -0000 To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [non-stop] 00/10 non-stop mode In-Reply-To: <200806152357.52177.pedro@codesourcery.com> References: <200806152357.52177.pedro@codesourcery.com> X-Mailer: VM 7.19 under Emacs 22.2.50.2 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00313.txt.bz2 These are a great set of patches and they applied cleanly (after I sorted out my own mistakes!). It's odd how good posts attract little response while trivial remarks often lead to long threads. > cat /home/pedro/nonstop.cmd > # GDB Command file to turn on non-stop debugging mode. >=20 > # Enable the async interface > maint set linux-async 1 Why is this still a maintenance command while the others aren't? > # With non-stop, breakpoints have to be always inserted > set breakpoint always-inserted 1 >=20 > # If using the CLI, pagination breaks non-stop > set pagination off >=20 > # Finally, turn it on! > set non-stop 1 Does it make sense to have always-inserted without non-stop? If not could these two options be merged? > Here's the looks of non-stop mode in the CLI, debugging > a multi-threaded app: >=20 > (gdb) r& > Starting program: /home/pedro/gdb/tests/threads32 > (gdb) [Thread debugging using libthread_db enabled] > [New LWP 23453] > [New LWP 23454] > info threads > =A0 3 Thread 0xf7603b90 (LWP 23454) =A0(running) > =A0 2 Thread 0xf7e04b90 (LWP 23453) =A0(running) > * 1 LWP 23450 =A0(running) > (gdb) thread 2 > [Switching to thread 2 (Thread 0xf7e04b90 (LWP 23453))] (running) > (gdb) interrupt > (gdb) > Program received signal SIGINT, Interrupt. > [Switching to Thread 0xf7e04b90 (LWP 23453)] > 0xffffe410 in __kernel_vsyscall () How about giving the interrupt command an argument so that (gdb) interrupt 2 means (gdb) thread 2 (gdb) interrupt I realise you're not really interested in CLI commands but the same change could be made to -exec-interrupt, > b 63 > Breakpoint 1 at 0x80485a6: file threads.c, line 63. It's interesting that you can set breakpoints (presumably on all threads) w= hen the other threads are still running. Given that is the case, would it make sense to add "break" to the list of commands that can be executed while the target is running? (using get_cmd_async_ok). Then you wouldn't need to interrupt a thread first. > (gdb) info threads > During symbol reading, incomplete CFI data; unspecified registers (e.g.,= eax)=20 > at 0xffffe411. > =A0 3 Thread 0xf7603b90 (LWP 23454) =A0(running) > * 2 Thread 0xf7e04b90 (LWP 23453) =A00xffffe410 in __kernel_vsyscall () > =A0 1 Thread 0xf7e056b0 (LWP 23450) =A0(running) With "info threads" (and perhaps elsewhere) I don't always get the prompt back. I've seen this just with async mode - I think there's some weird interaction with readline. Once while pressing return to get the prompt, I got a SIGTRAP which presuma= bly meant that GDB had thought it had removed a breakpoint when, in fact, it hadn't. I can't reproduce this, though. > (gdb) c& > Continuing. The "continue" command just acts on the current thread. I know there was a dicussion about using "--all" and that N is used already as an ignore count, but I suggested a separate command, "threadset", to determine which thread(= s) "continue" acts on: http://sourceware.org/ml/gdb/2008-03/msg00229.html as well as being able to release and hold threads. What do you think of th= ese ideas? --=20 Nick http://www.inet.net.nz/~nick= rob