Skip to content

Add 'monitor save' and 'monitor exit/quit' GDB commands #136

@openbinary0

Description

@openbinary0

I'm using VSCode + Platformio for debugging right now with a custom debug tool setup (https://docs.platformio.org/en/latest/plus/debug-tools/custom.html). The thing is, when closing a debug session, platformio seems to forcefully close down the debug server. This means the config file at .bloom/settings.json isn't saved and bloom is forcefully quit. Not ideal.

But I found out that platformio does run the GDB command pio_reset_run_target (if it exists) upon exiting the debug session. So this gives an opportunity for bloom to close gracefully by defining this command as follows:

define pio_reset_run_target
    monitor exit
end

Unfortunately, I found out monitor exit doesn't exist :/

This is why I would suggest adding these two commands:

  • monitor save - Saves the current configuration to .bloom/settings.json and wait for it to be saved.
  • monitor exit and monitor quit - Close bloom gracefully, waiting until it's fully closed. This should also make gdb detach from the remote (bloom).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions