0
   0x00000000000006da <+0>: push   rbp
   0x00000000000006db <+1>: mov    rbp,rsp
   0x00000000000006de <+4>: sub    rsp,0x10
   0x00000000000006e2 <+8>: mov    DWORD PTR [rbp-0x4],edi
   0x00000000000006e5 <+11>:    mov    QWORD PTR [rbp-0x10],rsi
   0x00000000000006e9 <+15>:    cmp    DWORD PTR [rbp-0x4],0x2
   0x00000000000006ed <+19>:    jne    0x748 <main+110>
   0x00000000000006ef <+21>:    mov    rax,QWORD PTR [rbp-0x10]
   0x00000000000006f3 <+25>:    add    rax,0x8
   0x00000000000006f7 <+29>:    mov    rax,QWORD PTR [rax]
   0x00000000000006fa <+32>:    mov    rsi,rax
   0x00000000000006fd <+35>:    lea    rdi,[rip+0xe0]        # 0x7e4
   0x0000000000000704 <+42>:    mov    eax,0x0
   0x0000000000000709 <+47>:    call   0x5a0 <printf@plt>
   0x000000000000070e <+52>:    mov    rax,QWORD PTR [rbp-0x10]
   0x0000000000000712 <+56>:    add    rax,0x8
   0x0000000000000716 <+60>:    mov    rax,QWORD PTR [rax]
   0x0000000000000719 <+63>:    lea    rsi,[rip+0xda]        # 0x7fa
   0x0000000000000720 <+70>:    mov    rdi,rax
   0x0000000000000723 <+73>:    call   0x5b0 <strcmp@plt>
   0x0000000000000728 <+78>:    test   eax,eax
   0x000000000000072a <+80>:    jne    0x73a <main+96>
   0x000000000000072c <+82>:    lea    rdi,[rip+0xd4]        # 0x807
   0x0000000000000733 <+89>:    call   0x590 <puts@plt>
   0x0000000000000738 <+94>:    jmp    0x754 <main+122>
   0x000000000000073a <+96>:    lea    rdi,[rip+0xd6]        # 0x817
   0x0000000000000741 <+103>:   call   0x590 <puts@plt>
   0x0000000000000746 <+108>:   jmp    0x754 <main+122>
   0x0000000000000748 <+110>:   lea    rdi,[rip+0xcf]        # 0x81e
   0x000000000000074f <+117>:   call   0x590 <puts@plt>
   0x0000000000000754 <+122>:   mov    eax,0x0
   0x0000000000000759 <+127>:   leave  
   0x000000000000075a <+128>:   ret  

Hi! Using GDB on Linux, everytime i try to set a breakpoint to one of these adresses, it print me an error, saying that it's impossible or dangerous. How can i fix this? Thanks!

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Mr.Robot
  • 5
  • 5
  • Those are just placeholder addresses from a PIE executable that hasn't been relocated yet. Use `starti` first, then set breakpoints. Or if there's a debug symbols for `main`, `start` will get you to the top of it. – Peter Cordes Jun 14 '20 at 21:07
  • It seems working. Thank you very much! – Mr.Robot Jun 14 '20 at 21:15

0 Answers0