Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug interpreter flag #626

Merged
merged 8 commits into from
Mar 20, 2020
Merged

Add debug interpreter flag #626

merged 8 commits into from
Mar 20, 2020

Conversation

rsora
Copy link
Contributor

@rsora rsora commented Mar 19, 2020

NOTE: This PR requires arduino/ArduinoCore-samd#506 to be merged

This PR:

  • Removes Updates ugly Fix paths handling for gdb #597 hotfix
  • Adds --interpreter flag and protobuf property to select the desired debug commands interpreter
  • Removes mandatory port property, not always necessary to use the debugger
  • Updates the client example accordingly

@rsora rsora changed the title Rsora/debug interpreter Add debug interpreter flag Mar 19, 2020
@rsora rsora requested a review from cmaglie March 19, 2020 17:37
@rsora
Copy link
Contributor Author

rsora commented Mar 19, 2020

cc @spoenemann

@per1234
Copy link
Contributor

per1234 commented Mar 20, 2020

Should the interpreter property be documented in https://arduino.github.io/arduino-cli/platform-specification/?

@cmaglie
Copy link
Member

cmaglie commented Mar 20, 2020

Should the interpreter property be documented in https://arduino.github.io/arduino-cli/platform-specification/?

Yes.

Also the --interpreter flag is gdb-specific, the real question is: are we going to ever support anything different from a GDB server for the debugger?

If the answer is no, as I think, then we should also state explicitly in the docs and in the cli help that the debug command will start a GDB server session with whatever middleware is needed.

Probably is a good idea to change a bit the recipes in the platform.txt from tools.gdb.debug.pattern to something like tools.openocd.debug.pattern (since we will always use gdb and what changes is the middleware).

@cmaglie
Copy link
Member

cmaglie commented Mar 20, 2020

from tools.gdb.debug.pattern to something like tools.openocd.debug.pattern

or maybe tools.gdb-openocd.debug.pattern?

@rsora
Copy link
Contributor Author

rsora commented Mar 20, 2020

If the answer is no, as I think, then we should also state explicitly in the docs and in the cli help that the debug command will start a GDB server session with whatever middleware is needed.

We are already doing it here, is that correct?

@cmaglie
Copy link
Member

cmaglie commented Mar 20, 2020

We are already doing it here, is that correct?

Yes

@rsora rsora requested a review from cmaglie March 20, 2020 16:16
commands/debug/debug.go Outdated Show resolved Hide resolved
Copy link
Member

@cmaglie cmaglie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

@rsora rsora merged commit fbcd87f into master Mar 20, 2020
@rsora rsora deleted the rsora/debug-interpreter branch March 20, 2020 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants