Arne
Arne

Reputation: 21

reading memory offset with GDB [GAS]

How can I read the following memory address with GDB :

0x30(%rsp,%rdx,4)

I've tried :

x/[s/d] 0x30 + ($rsp + $rdx + 4)

However, the results are not at all what I expected to find. Apologies if this is a duplicate - I couldn't find a matching question via search.

Upvotes: 2

Views: 139

Answers (1)

user184968
user184968

Reputation:

You need multiply $rdx by 4:

x/d $rsp + $rdx * 4+0x30

Upvotes: 1

Related Questions