Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: added more debug options #2356

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

Merged
cmaglie merged 8 commits into arduino:master from cmaglie:more_debug_options
Oct 9, 2023
Merged

Conversation

Copy link
Member

@cmaglie cmaglie commented Oct 4, 2023
edited by pillo79
Loading

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

There are 3 changes in the way debug configuration is build:

  1. debug.server.openocd.scripts is now an array, so multiple scripts may be provided
    debug.server.openocd.scripts.0=first_script
    debug.server.openocd.scripts.1=second_script
    debug.server.openocd.scripts.2=third_script
    
    debug.server.openocd.script (singular) is still supported but deprecated.
  2. The new parameter svd_file has been added
    debug.svd_file=svd-file
    
  3. Added the possibility to inject custom parameters for the cortex-debug plugin of the Arduino IDE 2.0, via the subtree debug.cortex-debug.custom.* configuration keys
    debug.cortex-debug.custom.postAttachCommands.0=set remote hardware-watchpoint-limit 2
    debug.cortex-debug.custom.postAttachCommands.1=monitor reset halt
    debug.cortex-debug.custom.postAttachCommands.2=monitor gdb_sync
    debug.cortex-debug.custom.postAttachCommands.3=thb setup
    debug.cortex-debug.custom.postAttachCommands.4=c
    debug.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
    debug.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
    debug.cortex-debug.custom.overrideRestartCommands.2=thb setup
    debug.cortex-debug.custom.overrideRestartCommands.3=c
    debug.cortex-debug.custom.anotherStringParamer=hellooo
    
    the above is intended to be directly injected in the launch.json generated by the Arduino IDE. The array-style keys (ending with a numeric index something.0=... are automatically converted into JSON arrays. For example the configuration above will produce the following:
    "cortex-debug_custom_configuration": {
     "anotherStringParamer": "hellooo",
     "overrideRestartCommands": [
     "monitor reset halt",
     "monitor gdb_sync",
     "thb setup",
     "c"
     ],
     "postAttachCommands": [
     "set remote hardware-watchpoint-limit 2",
     "monitor reset halt",
     "monitor gdb_sync",
     "thb setup",
     "c"
     ]
    }

What is the current behavior?

The added parameters are ignored.

What is the new behavior?

The added parameters are supported.

Does this PR introduce a breaking change, and is titled accordingly?

Only in the gRPC API.

Other information

@cmaglie cmaglie self-assigned this Oct 4, 2023
@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface labels Oct 4, 2023
Copy link

codecov bot commented Oct 4, 2023
edited
Loading

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (f561da0) 62.79% compared to head (f088a76) 62.98%.

Additional details and impacted files
@@ Coverage Diff @@
## master #2356 +/- ##
==========================================
+ Coverage 62.79% 62.98% +0.18% 
==========================================
 Files 203 203 
 Lines 19143 19243 +100 
==========================================
+ Hits 12021 12120 +99 
+ Misses 6068 6066 -2 
- Partials 1054 1057 +3 
Flag Coverage Δ
unit 62.98% <81.60%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
commands/debug/debug.go 40.49% <50.00%> (-0.53%) ⬇️
commands/debug/debug_info.go 66.86% <89.47%> (+12.81%) ⬆️
internal/cli/debug/debug.go 73.48% <77.41%> (+5.35%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@umbynos umbynos left a comment

Choose a reason for hiding this comment

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

Left some comments

cmaglie and others added 2 commits October 9, 2023 14:23
@cmaglie cmaglie merged commit 748fcf6 into arduino:master Oct 9, 2023
facchinm added a commit to facchinm/ArduinoCore-mbed that referenced this pull request Oct 11, 2023
@cmaglie cmaglie deleted the more_debug_options branch October 19, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@per1234 per1234 Awaiting requested review from per1234

@alessio-perugini alessio-perugini Awaiting requested review from alessio-perugini

@MatteoPologruto MatteoPologruto Awaiting requested review from MatteoPologruto

1 more reviewer

@umbynos umbynos umbynos approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /