Bug 31090 - "mi" equivalent of "(gdb) kill"
Summary: "mi" equivalent of "(gdb) kill"
Status: RESOLVED WORKSFORME
Alias: None
Product: gdb
Classification: Unclassified
Component: mi (show other bugs)
Version: unknown
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-28 00:03 UTC by Ernie Pasveer
Modified: 2025-09-22 16:45 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ernie Pasveer 2023-11-28 00:03:16 UTC
Is there an equivalent to the "kill" command?

Something like?

    -exec-kill

I'd like to kill the running program, reap the child process, but leave the executable's symbol information still loaded in gdb.

The "kill" command seems to do all this but I can't see a "mi" equivalent.
Comment 1 Tom Tromey 2023-11-28 01:19:55 UTC
I don't think there is one.
One could be added (though for best results you'd have to do it).
Using the CLI "kill" command seems fine, though, as well.
Comment 2 Ernie Pasveer 2023-11-28 15:27:35 UTC
Yes, the CLI "kill" command does work. However, it's not "mi" friendly for frontend use. eg: there's no "^done" message afterwards.

I'll attempt to implement it and submit a patch, as per the documents.
Comment 3 Ernie Pasveer 2025-09-22 16:45:58 UTC
I've created a python version of "-exec-kill" mi command. Plus some others I needed for my Seergdb gui frontend.

https://github.com/epasveer/seer/tree/main/src/resources/mi-python

People can freely grab them if they want.