Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with reverse debugging #8198

Closed
dukebarman opened this issue Aug 12, 2017 · 10 comments
Closed

Problems with reverse debugging #8198

dukebarman opened this issue Aug 12, 2017 · 10 comments
Assignees
Labels
Milestone

Comments

@dukebarman
Copy link
Contributor

dukebarman commented Aug 12, 2017

I try examples about reverse debugging from Radare2 book:

$ r2 /bin/ls
[0x004049a0]> dts+
[0x004049a0]> dso 2
[0x00000000]> dr rip
0x00000000
[0x00000000]>

But rip by default is 0x0. It should be equal entrypoint and start to debug with ESIL.

The other problem. I try to debug:

$ r2 -d /bin/ls
Process with PID 19843 started...
= attach 19843 19843
bin.baddr 0x00400000
Using 0x400000
Assuming filepath /bin/ls
asm.bits 64
 -- What is the most complex r2 command? q - then you have to deal with real life /o\
[0x7f2ff54c8c30]> dts+
Reading 8192 bytes from 0x0061d000...
Reading 4096 bytes from 0x0061f000...
Reading 8192 bytes from 0x7f2ff56ed000...
Reading 4096 bytes from 0x7f2ff56ef000...
Reading 135168 bytes from 0x7ffe1b1a7000...
[0x7f2ff54c8c30]> dso 2
hit breakpoint at: 7f2ff54c8c38
[0x7f2ff54c8c30]> dsb

After last command I can't stop working with ctrl+c and see these errors:
2017-08-12_19-59-10

@dukebarman dukebarman changed the title Start address is 0x0 with ESIL Problems with reverse debugging Aug 12, 2017
@Maijin
Copy link
Contributor

Maijin commented Aug 12, 2017

@RKX1209 ^ See this

@RKX1209
Copy link
Contributor

RKX1209 commented Aug 13, 2017

At first, you need to add '-d' option when use 'dts+', and in ESIL mode, 'aets+' should be.
And second problem can be occurred when program execute some non deterministic events
like system calls.
I'm gonna work this problem. Sorry for inconvenience.

@radare
Copy link
Collaborator

radare commented Aug 14, 2017 via email

@radare
Copy link
Collaborator

radare commented Aug 27, 2017

are you on latest r2? try typing aeip first if you are on esil

@dukebarman
Copy link
Contributor Author

Yeap!

$ r2 -v
radare2 1.7.0-git 16223 @ linux-x86-64 git.1.6.0-955-g05315c9
commit: 05315c92702b2be3754c3f66fca87162c7b8b5cb build: 2017-09-27__16:48:51

The first bug with ESIL is fixed for me:

$ r2 /bin/ls
 -- Move around the bytes with h,j,k,l! Arrow keys are neither portable nor efficient
[0x004049a0]> dts+
[0x004049a0]> dso 2
[0x004049a0]> dr rip
0x004049a2
[0x004049a0]> 

The second about debugger - nope :(

@Maijin Maijin removed the ESIL label Sep 27, 2017
@XVilka XVilka added this to the 2.1.0 milestone Nov 16, 2017
@XVilka
Copy link
Contributor

XVilka commented Nov 16, 2017

Still reproducible :( @RKX1209 do you have time to check this please?

@radare
Copy link
Collaborator

radare commented Nov 24, 2017

yep reverse debugging is pretty buggy. ive seen a bunch of problems and i'll probably give a try after the 2.1 release

@radare radare modified the milestones: 2.1.0, 2.2.0 Nov 24, 2017
@radare radare modified the milestones: 2.2.0, 2.3.0 Dec 24, 2017
@XVilka
Copy link
Contributor

XVilka commented Jan 12, 2018

Good thing for GSoC microtask, imho

@XVilka XVilka modified the milestones: 2.3.0, 2.4.0 Jan 25, 2018
@radare radare modified the milestones: 2.4.0, 2.5.0 Feb 27, 2018
sivaramaaa added a commit to sivaramaaa/radare2 that referenced this issue Apr 4, 2018
@radare radare closed this as completed in 17061a7 Apr 4, 2018
@dukebarman
Copy link
Contributor Author

Confirm, fix works for second case too

@radare
Copy link
Collaborator

radare commented Apr 5, 2018 via email

SakiiR pushed a commit to SakiiR/radare2 that referenced this issue Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants