debugging - (gdb) Get the value of the memory address indicated by a register -


So I'm working on this debugging project for which I need to see assembly code in GDB. Is a line that reads movzbl (% ebx),% eax . I understand that it adds zero for less important byte copies of (ebx) to % eax , and more important bits. I am trying to use gdb to know which value is kept on (% ebx)

information registers % ebx is 0x804a6ac . As I understand, to get value on (% ebx) , I want the value located at the address 0x804a6ac . How do I get this value? I know that, after movzbl (% ebx),% eax is run , the value of % eax is 0x41 , so I suppose Is that 41 is the least important byte of (% ebx) , but how can I see its full value?

I tried to do p / x $ 0x804a6ac , but I get $ 13 = value can not be converted into integer. . I tried to do p / x% ebx , but I get a syntax error in expression near "% x ebx". "

The "standard" command for this is x / cx $ ebx .

This is better than p / x * 0x804a6ac You do not need to cut / paste the value of $ ebx .

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -