I am trying to debug a simple buffer overflow program using gdb . I analyzed the program on windows without any issues .But now i am using linux gdb with exact same program but i am getting "Cannot access memory at address 0xffffffffffffdfa0" error while accessing esp and a variable. enter image description here

Can anyone help me out thanks

  • 2
    Include code as a text – Paweł Łukasik Jun 20 at 15:43
  • Even when using RSP or SP keeps giving me the "Cannot access memory" error. Any help would be appriciated. – Digital Human Dec 7 at 6:48

Try examining rsp instead of esp.

 ax->16-bit
eax->32-bit
rax->64-bit

It is similar for stack pointer too. sp->16-bit, esp->32-bits and rsp->64-bit. When you are examining the esp, the address is actually 64 bits but you are trying examine and forcing it to split to 32 bits addresses.

enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.