It seems to me that a disconnection whether by the command or by a crash of gdb 
should not change exec state. That seems totally logical to me. That way a 
crash of gdb doesn't prevent reattaching and continuing to debug.

With quit though, the explicit detach is intended to restart the program so 
that it isn't paused after exiting the debugger.

The only way that I have found currently to end gdb with the program running is 
to continue execution in gdb. Then, go to another terminal and kill -9 the gdb 
process. This is not great. I would love to be able to choose which to do by 
only interacting with gdb in a normal way. Having to kill the process from 
another terminal is annoying, but it also limits the ability to script certain 
actions within gdb.


---

** [tickets:#314] quit doesn't properly detach**

**Status:** new
**Milestone:** 0.11.0
**Created:** Thu Aug 19, 2021 05:02 AM UTC by Wren Turkal
**Last Updated:** Thu Aug 19, 2021 03:34 PM UTC
**Owner:** nobody


The quit command is supposed to detach (and thus continue) the inferior before 
exiting.

If one wants to disconnect without continuing the inferior, there is also a 
disconnect command.

I noticed this change: http://openocd.zylin.com/#/c/5600/1

Here's the gdb docs on attach/detach: 
https://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_22.html

Here's the gdb docs on detach/disconnect: 
https://sourceware.org/gdb/current/onlinedocs/gdb/Connecting.html#Connecting

It would be lovely to have the right semantics so that quiting continues while 
disconnect does not change the execution state to match these semantics.


---

Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.


Reply via email to