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

Evaluating pointers as arrays #64

Open
NanShanJi opened this issue Mar 31, 2024 · 1 comment
Open

Evaluating pointers as arrays #64

NanShanJi opened this issue Mar 31, 2024 · 1 comment
Labels
question Further information is requested

Comments

@NanShanJi
Copy link

image

Hello, it seems that it does not support the display of pointer array values

@rohanrhu
Copy link
Owner

rohanrhu commented Mar 31, 2024

Hi, you can evaluate and show pointers as array.

Open a new evaluator (𝑓𝑥 button on the top bar) and cast your pointer into an array like this:

*argv@2

The syntax is *ptr@NUM_OF_ITEMS.

image

(The first evaluator window is a pointer evaluated and you can't see it as an array but the second one it is casted into an array.)

GDB doesn't know that how many items there are on the memory from the address your pointer is pointing; so you must convert it into an array like this with a length.

@rohanrhu rohanrhu added the question Further information is requested label Mar 31, 2024
@rohanrhu rohanrhu changed the title Pointer arrays are not supported Evaluating pointers as arrays Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants