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 a register view #242

Merged
merged 2 commits into from
Feb 7, 2024
Merged

Add a register view #242

merged 2 commits into from
Feb 7, 2024

Conversation

nomtats
Copy link
Contributor

@nomtats nomtats commented Sep 14, 2020

Hi,

I've added a register view using a TreeView.
It doesn't distinguish GPR from the other types of registers at all.
Let me know if you think this is acceptable.
image

@GitMensch
Copy link
Collaborator

That looks like a neat idea. Checking the discussion within multiple vscode extensions the separate register panel was "dropped"; instead the "way to go" is using the Variable panel.

For "old" vscode versions this means to add a "virtual" variable "Registers" with those beneath the local variables; newer versions (not checked which one exactly) can return those with "Register" scope and vscode will do the right thing.

Could you please inspect to:

  • Add the registers to the dap implementation? That was added in 2019, so should be possible.
  • If the registers aren't shown because of too low dependency version: recheck which version is needed and possibly add a "virtual" variable that contains those.

@jbreu
Copy link

jbreu commented Nov 24, 2023

Any chance this gets merged soon? It would be really helpful!

@WebFreak001
Copy link
Owner

Any chance this gets merged soon?

probably not unless someone puts in the work to bring it up to date with the current extension and vscode capabilities. If you want to give it a try, we can help you if you run into issues.

you can find a guide on working on the project here: https://github.com/WebFreak001/code-debug/blob/master/HACKING.md (it's even fairly recent, thanks @GitMensch!)

@jbreu
Copy link

jbreu commented Nov 24, 2023

Grüß Gott,
I will have a look, but I have no clue about these Typescript and npm workflows so I wouldnt count on me ;)

@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2024

Codecov Report

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

Comparison is base (7ee97b6) 21.30% compared to head (65234c5) 20.89%.

Files Patch % Lines
src/mibase.ts 0.00% 35 Missing ⚠️
src/backend/mi2/mi2.ts 0.00% 29 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
- Coverage   21.30%   20.89%   -0.41%     
==========================================
  Files          14       14              
  Lines        1737     1771      +34     
  Branches      375      381       +6     
==========================================
  Hits          370      370              
- Misses       1322     1356      +34     
  Partials       45       45              

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

@nomtats
Copy link
Contributor Author

nomtats commented Feb 7, 2024

Hi @WebFreak001, @GitMensch

I've found some time to update this to work with the latest DAP.
Let me know if this works for you.

Screenshot 2024-02-07 at 12 53 31

src/mibase.ts Outdated Show resolved Hide resolved
src/mibase.ts Outdated Show resolved Hide resolved
src/backend/mi2/mi2.ts Outdated Show resolved Hide resolved
@WebFreak001 WebFreak001 merged commit 5a8b3c8 into WebFreak001:master Feb 7, 2024
4 checks passed
@WebFreak001
Copy link
Owner

thanks for tackling this again!

@nomtats nomtats deleted the work branch February 7, 2024 05:39
@jbreu
Copy link

jbreu commented Feb 10, 2024

Thank you very much @nomtats !

@jbreu
Copy link

jbreu commented Feb 10, 2024

@nomtats @WebFreak001 one question, if I may: How do you manage to get always hex output? For me its a mix of decimal and hex when setting "valuesFormatting": "prettyPrinters" in launch.json

grafik

@nomtats
Copy link
Contributor Author

nomtats commented Feb 13, 2024

@jbreu it uses 'data-list-register-values N' to retrieve register values where 'N' means "natural format". In another word, it's whatever GDB feels like.
https://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_223.html
you can change it to 'x' to always get Hex values.

@Zapmawww
Copy link

hi guys, what about add --skip-unavailable to the the gdb command, so that we could ignore unavailable regs and still get a output.
like this: -data-list-register-values N --skip-unavailable

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.

6 participants