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]

disconnected vs detach with remote


Hi,

There is something I don't get about the terminology. Let's say that
you have a gdb connected to an extended gdbserver. There is one
inferior You have one inferior running with some disconnected dprintfs
in there.

When you use detach, according to the documentation [1], gdb should
detach from the process and let it continue. However, if any kind of
persistent command is in there, such as a disconnected dprintf,
gdbserver will not detach from the thread. It will say

    Persistent commands are present, leaving gdbserver attached to the process

This is really confusing to me. If I ask gdb to detach from the
current process, I expect it to do so, regardless of anything I did
before.

Then, when I type disconnect, it seems like it removes everything from
the inferior, including disconnected dprintfs. This is very confusing,
as anybody would expect "disconnected" dprintfs or "disconnected"
tracing to stay untouched when you "disconnect".

Finally, when you type quit, or hit Control-D, while you are still
connected to gdbserver, it seems to show another behavior that I have
not characterized yet.

If you can shed some light on what we should expect from each command
in the various scenarios, it would be really helpful.

Simon

[1] https://sourceware.org/gdb/current/onlinedocs/gdb/Attach.html


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