Cannot access memory at break point address in GDB

0

I've already set breakpoint at address 0x000004ed. But why can't I access it even after the code has been ran?

(gdb) disassemble main 
Dump of assembler code for function main:
   0x000004ed <+0>: push   ebp
   0x000004ee <+1>: mov    ebp,esp
   0x000004f0 <+3>: sub    esp,0x10
   0x000004f3 <+6>: call   0x512 <__x86.get_pc_thunk.ax>
   0x000004f8 <+11>:    add    eax,0x1ae4
   0x000004fd <+16>:    mov    DWORD PTR [ebp-0x8],0x1
   0x00000504 <+23>:    mov    DWORD PTR [ebp-0x4],0x2
   0x0000050b <+30>:    mov    eax,0x0
   0x00000510 <+35>:    leave  
   0x00000511 <+36>:    ret    
End of assembler dump.

break *0x000004ed

(gdb) break *0x000004ed
Breakpoint 1 at 0x4ed: file var.c, line 2.

run

(gdb) run
Starting program: /home/wolf/var32 
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x4ed
c
memory
gdb
asked on Stack Overflow May 3, 2020 by Wolf

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0