-
Notifications
You must be signed in to change notification settings - Fork 118
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 registerLimit
config option to specify the registers to list in Registers view
#444
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this nice PR!
Apart from the comments below:
- please add an entry to the Changelog file
- it is likely reasonable to note this option in the README, as well as pointing out how to get the numbers "(starting from zero)", which I guess is either
info registers
orinterpreter mi2 "-data-list-register-values --skip-unavailable N"
.
package.json
Outdated
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please revert that missing EOL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. the formatter wrongly did this.
src/backend/mi2/mi2.ts
Outdated
@@ -883,7 +883,7 @@ export class MI2 extends EventEmitter implements IBackend { | |||
async getRegisterValues(): Promise<RegisterValue[]> { | |||
if (trace) | |||
this.log("stderr", "getRegisterValues"); | |||
const result = await this.sendCommand("data-list-register-values N"); | |||
const result = await this.sendCommand("data-list-register-values N"+ " " +this.registerLimit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const result = await this.sendCommand("data-list-register-values N " + this.registerLimit);
but maybe we should use
const result = await this.sendCommand("data-list-register-values --skip-unavailable N " + this.registerLimit);
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second one is indeed better since it avoids more unavaliable registers when this attribute works.
795cf71
to
9e641d2
Compare
spell check linter failed on "unfetchable", I've asked chatgpt4 for an adjusted text and it changed some other pieces as well, coming up with (after some hinting)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Reverted the deletion of EOL in package.json
- Appended
--skip-unavaliable
after-data-list-register-names
- Added an entry in CHANGELOG.md
- Added an introduction of how to set
registerLimit
option in README.md
package.json
Outdated
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. the formatter wrongly did this.
src/backend/mi2/mi2.ts
Outdated
@@ -883,7 +883,7 @@ export class MI2 extends EventEmitter implements IBackend { | |||
async getRegisterValues(): Promise<RegisterValue[]> { | |||
if (trace) | |||
this.log("stderr", "getRegisterValues"); | |||
const result = await this.sendCommand("data-list-register-values N"); | |||
const result = await this.sendCommand("data-list-register-values N"+ " " +this.registerLimit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second one is indeed better since it avoids more unavaliable registers when this attribute works.
9e641d2
to
bf77aa8
Compare
The introduction paragraph in README.md is being swapped by the new version now. |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #444 +/- ##
==========================================
+ Coverage 20.47% 22.52% +2.05%
==========================================
Files 14 14
Lines 1807 1891 +84
Branches 392 416 +24
==========================================
+ Hits 370 426 +56
- Misses 1392 1465 +73
+ Partials 45 0 -45 ☔ View full report in Codecov by Sentry. |
I've run the prettier stuff locally, that's the diff you need to apply to fix the failing CI diff --git a/CHANGELOG.md b/CHANGELOG.md
index 602bf5a..47db805 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,7 +22,8 @@ Versioning].
enabled by default ([@JacquesLucke])
- Suppress error for hover as the user may just play with the mouse ([@oltolm]).
- solve the problem of failed parsing of containers ([@henryriley0])
-- Resolves #421 - Added `registerLimit` option to specify the registers to display to avoid corrupting the whole registers view - PR #444 ([@chenzhiy2001])
+- Fixes #421 - Added `registerLimit` option to specify the registers to
+ display - PR #444 ([@chenzhiy2001])
## [0.27.0] - 2024-02-07
@@ -244,6 +245,7 @@ Versioning].
[@abussy-aldebaran]: https://github.com/abussy-aldebaran
[@anshulrouthu]: https://github.com/anshulrouthu
[@brownts]: https://github.com/brownts
+[@chenzhiy2001]: https://github.com/chenzhiy2001
[@coldencullen]: https://github.com/ColdenCullen
[@eamousing]: https://github.com/eamousing
[@evangrayk]: https://github.com/evangrayk |
Oops, I forgot to run |
I have no clue why the close happened... |
Sometimes Github gets really confusing. I also felt that. |
It says "The master branch was force-pushed", please try to just push the change yourself, if the reopen still doesn't work afterwards, create a new PR (leaving the old PR reference in). See the suggested ChangeLog diff above. |
Add `registerLimit` config option to specify the registers to list in Registers view (continuation of PR #444)
In cases like #421, fetching unfetchable registers can corrupt the whole Registers view.
So I added
registerLimit
config option to let users specify what registers they want the debugger to automatically fetch, thus avoiding the issue.