User Tools

Site Tools


gdb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gdb [2024/05/07 08:20] – [Breakpoint] A User Not Logged ingdb [2024/11/14 06:58] (current) A User Not Logged in
Line 16: Line 16:
 ====== Print Command ====== ====== Print Command ======
  
 +print string pointed by $rdi:
 +
 +  x/s $rdi
 +  
 show bytes pointed by register with offset: show bytes pointed by register with offset:
  
Line 23: Line 27:
  
   p/x *(char *)$rcx@$dx   p/x *(char *)$rcx@$dx
 +  p/x (char[size]) *$rcx
  
 ====== Breakpoint ====== ====== Breakpoint ======
Line 28: Line 33:
 break on address: break on address:
  
-  b *<addr>+  b *0xdeadbeef
  
 break at offset to function name: break at offset to function name:
  
 <code> <code>
-b *(&func_name+<offset>+b *(&func_name+0xbeef
-b *(funcname+<offset>)+b *(funcname+0xbeef) 
 +b *('class::method'+0xbeef)
 </code> </code>
  
Line 47: Line 53:
 commands commands
   silent   silent
-  printf "msg: %d\n", *($rdi+0x34)+  printf "msg: %d\n", *($rdi+0xbeef)
   cont   cont
 end end
Line 54: Line 60:
      
      
-====== View Memory ====== 
- 
  
gdb.1715070039.txt.gz · Last modified: by A User Not Logged in

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki