Re: why does GDB always stop a thread when connecting?

David Taylor <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <8684.1459889504@usendtaylorx2l>
    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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.