This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


    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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]