2013-10-03 5 views
0

Как просмотреть данные по адресу первого операнда в gdb?Синтаксис Gdb для команды печати

cmp [ebp+eax], edi 

Я попытался с помощью:

print /d $ebp 
print /d $eax 

и вручную добавлять значения, чтобы сделать адрес, но не был уверен, что делать дальше, или если есть более простой способ ...

ответ

1
(gdb) help x 
Examine memory: x/FMT ADDRESS. 
ADDRESS is an expression for the memory address to examine. 
FMT is a repeat count followed by a format letter and a size letter. 
Format letters are o(octal), x(hex), d(decimal), u(unsigned decimal), 
    t(binary), f(float), a(address), i(instruction), c(char) and s(string). 
Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes). 
The specified number of objects of the specified size are printed 
according to the format. 

Для примера:

x/d $ebp+$eax 
+0

спасибо, это было то, что второй знак доллара Я отсутствовал из x/d $ ebp + eax – user2827214

Смежные вопросы