-
-
Notifications
You must be signed in to change notification settings - Fork 64
Description
While porting probe-rs to use gdbstub I found two packets that would be helpful to respond to:
Edit: qC - this queries the current thread ID. WIthout responding GDB works correctly, but the client emits a message that may be confusing to end users.qC is no longer needed after debugging an issue with ? in the thread.
qThreadExtraInfo - this allows the stub to provide a string of extra data about a thread. It's a free form string that is displayed on the client and can be useful for adding extra detailed status or thread names, for example.
Both of these would produce a better experience for the probe-rs logic and I'd be glad to take a shot at producing a PR that adds the logic. Before I do I wanted some feedback on how to approach this.
Both packets feel like appropriate functions on the MultiThreadBase trait. To avoid a break I could add them with default implementations - qC could return the first value from list_active_threads and qThreadExtraInfo could return a 0 byte string by default. This avoids a break, but it puts a bit more burden on the implementor to realize these are options for them to extend.
Any thoughts / feedback on this?