Sunday, 15 April 2012

c - How to get the value of the base pointer, stack pointer and saved base pointer -


I know how to use gdb and information used frames but I basis, stack and saved The value of the base is not getting indicator. How do I get it? Can I get them in the frame of information information or do I have to do something else?

info reg to rsp the stack pointer (64-bit x86 ) and base pointer ( rbp will show the contents of registers including 64-bit) x86):

  (gdb) info reg Rax 0x401340 4,199,232 Rbx 0x0 0 RCX 0x0 0 RDX 0x7fffffffe608 140737488348680 RSI 0x7fffffffe5f8 140737488348664 RDI 0x0 0 RBP 0x0 0x0 RSP 0x7fffffffe508 0x7fffffffe508 r8 0x7ffff7dd4e80 140737351863936 r9 0x7ffff7dea560 140737351951712 R10 0x7fffffffe2d0 140737488347856 r11 0x7ffff7a50290 140737348174480 r12 0x4013e2 4199394 r13 0x7fffffe5f0 140737488348656 r14 0x0 0 r15 0x0 0 Rep 0x7ffff7a50290 0x7ffff7a50290 & lt; __GI _exit & gt; Eflags 0x202 [IF] CS 0x33 51 SS 0x2 B-43 DS 0x0 0 S 0x0 0 FS 0x0 0 GS 0x0 0  

The remaining information info frame :

  (gdb) info frame stack level 0, 0x7fffffffe510: in __GI_exit rip = 0x7ffff7a50290 (exit.c: 104); Saved RIP = 0x40134 D 0x7fffffffe520 source language Arglist on 0x7fffffffe500 been summoned by frame C, Arges: status = 0 local 0x7fffffffe500, Previous Frame SP 0x7fffffffe510 are registers saved: RIP on 0x7fffffffe508  

No comments:

Post a Comment