From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12642 invoked by alias); 15 Jun 2008 22:58:09 -0000 Received: (qmail 12633 invoked by uid 22791); 15 Jun 2008 22:58:08 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 15 Jun 2008 22:57:51 +0000 Received: (qmail 14427 invoked from network); 15 Jun 2008 22:57:49 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Jun 2008 22:57:49 -0000 Content-Disposition: inline Subject: [non-stop] 00/10 non-stop mode To: gdb-patches@sourceware.org From: Pedro Alves Date: Mon, 16 Jun 2008 01:29:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <200806152357.52177.pedro@codesourcery.com> 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/msg00297.txt.bz2 [ 3rd time I'm sending this. Don't know why, but it doesn't seem to want to go through, while the rest of the series went ok. Maybe because I had an attachment with .cmd extension. Here are the contents of the nonstop.cmd file mentioned in the body of the message: cat /home/pedro/nonstop.cmd # GDB Command file to turn on non-stop debugging mode. # Enable the async interface maint set linux-async 1 # With non-stop, breakpoints have to be always inserted set breakpoint always-inserted 1 # If using the CLI, pagination breaks non-stop set pagination off # Finally, turn it on! set non-stop 1 ] Hi, Here goes a new series of non-stop debugging support, core and linux native (x86, and probably PowerPC once Luis' displaced stepping patch for PPC goes in). The series now has no uncommited dependencies, so you can now easilly pick it. There are still unresolved ongoing discussions on how to expose target support for non-stop, but that shouldn't prevent this series to go in. Contrary to the previous series, this series does add the support for GDB to *not* switch threads automatically on events (in non-stop mode), and implements the support for exited threads. I'd say it's in commit-state, except for any rework due to review, of course. MI/non-stop is our main focus, but CLI works a bit too, although there are a few rough UI edges. To activate nonstop mode, I use the attached nonstop.cmd command file, with 'gdb -x nonstop.cmd program'. I've tested the full series on x86-pc-linux-gnu async/sync/all-stop to make sure nothing broke, and also on arm-linux to make sure software single-stepping didn't brake, and also on cygwin, to test at least a non-linux target. Here's the looks of non-stop mode in the CLI, debugging a multi-threaded app: (gdb) r& Starting program: /home/pedro/gdb/tests/threads32 (gdb) [Thread debugging using libthread_db enabled] [New LWP 23453] [New LWP 23454] info threads =C2=A0 3 Thread 0xf7603b90 (LWP 23454) =C2=A0(running) =C2=A0 2 Thread 0xf7e04b90 (LWP 23453) =C2=A0(running) * 1 LWP 23450 =C2=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 () b 63 Breakpoint 1 at 0x80485a6: file threads.c, line 63. (gdb) info threads During symbol reading, incomplete CFI data; unspecified registers (e.g., ea= x)=20 at 0xffffe411. =C2=A0 3 Thread 0xf7603b90 (LWP 23454) =C2=A0(running) * 2 Thread 0xf7e04b90 (LWP 23453) =C2=A00xffffe410 in __kernel_vsyscall () =C2=A0 1 Thread 0xf7e056b0 (LWP 23450) =C2=A0(running) (gdb) c& Continuing. (gdb) Breakpoint 1, thread_function0 (arg=3D0x0) at threads.c:63 63 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(*myp) ++; info threads =C2=A0 3 Thread 0xf7603b90 (LWP 23454) =C2=A0(running) * 2 Thread 0xf7e04b90 (LWP 23453) =C2=A0thread_function0 (arg=3D0x0) at thr= eads.c:63 =C2=A0 1 Thread 0xf7e056b0 (LWP 23450) =C2=A0(running) (gdb) b 80 Breakpoint 2 at 0x80485f0: file threads.c, line 80. (gdb) [Switching to Thread 0xf7603b90 (LWP 23454)] Breakpoint 2, thread_function1 (arg=3D0x1) at threads.c:80 80 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(*myp) ++; info threads * 3 Thread 0xf7603b90 (LWP 23454) =C2=A0thread_function1 (arg=3D0x1) at thr= eads.c:80 =C2=A0 2 Thread 0xf7e04b90 (LWP 23453) =C2=A0thread_function0 (arg=3D0x0) a= t threads.c:63 =C2=A0 1 Thread 0xf7e056b0 (LWP 23450) =C2=A0(running) (gdb) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=20 --=20 Pedro Alves