This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: why does GDB always stop a thread when connecting?
- From: David Taylor <dtaylor at emc dot com>
- To: Luis Machado <lgustavo at codesourcery dot com>
- Cc: gdb at sourceware dot org, dtaylor at emc dot com
- Date: Tue, 05 Apr 2016 16:51:44 -0400
- Subject: Re: why does GDB always stop a thread when connecting?
- Authentication-results: sourceware.org; auth=none
On 04/05/2016 01:43 PM, Luis Machado wrote:
Does setting "may-interrupt" to "off" help?
I'll try that as a possible kludgey workaround. But, if it works, since
the user should be able to stop and interrupt threads -- we just don't
want GDB doing so when not asked to do so -- it would mean the user
or the GUI would have to do something like:
set may-interrupt off
issue target command...
set may-interrupt on
For our target, and I suspect for many of the non-stop remote targets
out there, the only GDB operations that come to mind that require a
stopped thread are to read and/or write the registers of the thread and
to single step the thread.
We do not require a stopped thread to create or delete breakpoints. To
enable of disable breakpoints. To create, delete, enable, or disable
tracepoints. To start or stop a trace experiment. To read or write
memory.
IF there is no good reason for the current behavior, then I'm willing to
write and test a patch. If there is a good reason, then perhaps a new
user settable variable is needed to decide whether to do the pointless
and gratuitous (to me) stop of a thread when connecting.
David