From: Nick Roberts <nickrob@snap.net.nz>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [non-stop] 00/10 non-stop mode
Date: Tue, 17 Jun 2008 04:24:00 -0000 [thread overview]
Message-ID: <18518.59619.663844.666466@kahikatea.snap.net.nz> (raw)
In-Reply-To: <200806152357.52177.pedro@codesourcery.com>
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.
>
> # 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
>
> # If using the CLI, pagination breaks non-stop
> set pagination off
>
> # 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:
>
> (gdb) r&
> Starting program: /home/pedro/gdb/tests/threads32
> (gdb) [Thread debugging using libthread_db enabled]
> [New LWP 23453]
> [New LWP 23454]
> info threads
> 3 Thread 0xf7603b90 (LWP 23454) (running)
> 2 Thread 0xf7e04b90 (LWP 23453) (running)
> * 1 LWP 23450 (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) when
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)
> at 0xffffe411.
> 3 Thread 0xf7603b90 (LWP 23454) (running)
> * 2 Thread 0xf7e04b90 (LWP 23453) 0xffffe410 in __kernel_vsyscall ()
> 1 Thread 0xf7e056b0 (LWP 23450) (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 presumably
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 these
ideas?
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2008-06-16 22:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-16 1:29 Pedro Alves
2008-06-16 7:13 ` Vladimir Prus
2008-06-17 4:24 ` Nick Roberts [this message]
2008-06-18 17:32 ` Pedro Alves
2008-06-18 21:36 ` Nick Roberts
2008-06-18 21:37 ` Pedro Alves
2008-06-19 3:33 ` Nick Roberts
2008-06-19 5:07 ` Pedro Alves
2008-06-19 6:07 ` Nick Roberts
2008-06-19 6:43 ` Pedro Alves
2008-06-19 13:57 ` Marc Khouzam
2008-06-19 16:31 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18518.59619.663844.666466@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox