Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

cpp-debug: show variables in the 'memory view' #111

Closed
wants to merge 2 commits into from

Conversation

vince-fugnitto
Copy link
Member

What it does

The following pull-request adds support for display variables in the memory view:

image

How to test

TBD.

Review checklist

Reminder for reviewers

In theory, we could have problems reading addresses as JS numbers, since
JS numbers don't have full 64 bits precision.  This patch makes use of
the 'long' library, which stores 64-bit numbers as two 32-bit halves.

Signed-off-by: Vincent Fugnitto <[email protected]>
Signed-off-by: Simon Marchi <[email protected]>
Signed-off-by: Paul Maréchal <[email protected]>
This patch makes it so we hightlight the local variables of the current
frame in the memory view.  The idea is simple, we get the size and
address of all locals of the current frame through GDB (sizeof(foo) and
&foo).  If the bytes backing these variables are in the scope of the
memory view, we highlight them with a different color for each variable.

Signed-off-by: Simon Marchi <[email protected]>
Signed-off-by: Paul Maréchal <[email protected]>
Signed-off-by: Vincent Fugnitto <[email protected]>
Copy link
Member Author

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

Currently, scrolling down on Firefox does not work (it does for Chrome).

@marcdumais-work
Copy link
Contributor

marcdumais-work commented Oct 2, 2020

Currently, scrolling down on Firefox does not work (it does for Chrome).

It seems to work for me on Firefox 80.0.1 (64-bit).

There are many general issues with the memory view though. One I've noticed is that the view does not seem to refresh when execution stops, e.g. after stepping the debugger. So I guess the memory view should potentially be behind an experimental or such flag, not just the variable highlight feature.

@vince-fugnitto
Copy link
Member Author

Closing, the changes are no longer necessary thanks to #119 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants