code-debug icon indicating copy to clipboard operation
code-debug copied to clipboard

Add a register view

Open nomtats opened this issue 5 years ago • 1 comments

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

nomtats avatar Sep 14 '20 12:09 nomtats

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.

GitMensch avatar Mar 04 '22 15:03 GitMensch

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

jbreu avatar Nov 24 '23 06:11 jbreu

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!)

WebFreak001 avatar Nov 24 '23 07:11 WebFreak001

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

jbreu avatar Nov 24 '23 10:11 jbreu

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 :warning:
src/backend/mi2/mi2.ts 0.00% 29 Missing :warning:

:exclamation: 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              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Feb 07 '24 04:02 codecov-commenter

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

nomtats avatar Feb 07 '24 05:02 nomtats

thanks for tackling this again!

WebFreak001 avatar Feb 07 '24 05:02 WebFreak001

Thank you very much @nomtats !

jbreu avatar Feb 10 '24 08:02 jbreu

@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

jbreu avatar Feb 10 '24 08:02 jbreu

@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.

nomtats avatar Feb 13 '24 03:02 nomtats