Radare2: Radare is unable to print output of binary in debug mode (macOS 10.12.5)

Created on 16 May 2017  Â·  13Comments  Â·  Source: radareorg/radare2

Hello,
I have a problem to executing binary when I want to do debug, radare prints ==> Process finished but there is not available any outputs.
I have also attached the screenshot of this problem.
screen shot 2017-05-17 at 1 11 51 am

sajjad@MacBook-Pro:~$/opt/radare2/bin/radare2 -v
radare2 1.5.0-git 14772 @ darwin-x86-64 git.1.4.0-228-g7d7c9cb5a
commit: 7d7c9cb5a741a2556a9daa7cbe0e86570f800a8c build: 2017-05-17__01:00:10

All 13 comments

You didn't set any breakpoint and run 'continue' - so the process successfully run to its end.

Thank you for your response.
Process is successfully run but radare can not print any output.
for example in this screenshot output is "aaa" that can not print it,and i did some set breakpoints.
screen shot 2017-05-17 at 10 23 05 am

I think it occurred after upgrading macOS to 10.12.5.
did anyone check it on macOS 10.12.5 ?

I could print the output by forwarding stdio with rarun2 script. But directly stdin is not possible to control, by default (without using rarun2) stdin and stdout will not be shown in terminal.
screen shot 2017-05-19 at 12 13 49 am

thank you @radare, stdout is fixed now, but stdin still have problem.

  1. can not send any data to input (stdin is not work)
  2. when a process calling a stdin func, radare will be so slow (!like when someone wants to sniff the terminal input with reading current terminal tty (cat /dev/ttys000))!
    this is my source and binary :
    https://0x00.ir/files.7z

Try with -X /dev/stdin

On 19 May 2017, at 07:59, SajjadPourali notifications@github.com wrote:

thanks @radare , stdout is fixed, but stdin still have problem.

can not get any data from input (stdin is not work)
when a process calling a stdin func, radare will be so slow!
this is my source and binary :
https://0x00.ir/files.7z
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I tried it but problem is persistent, after calling a stdin func, characters must type twice .
I did upload a temporary video of this problem.
https://www.youtube.com/watch?v=tOu05JDKU-s

@Maijin : in this video i shows my physical keyboard too, because i wanted to show that keys must pressed twice after calling a stdin func.


update : also i made it with asciinema : https://asciinema.org/a/0kegkfwsipq81bknwk965u2ug

ok fair enough

yeah even if you do r2 -X stdout=/dev/stdout -d ./a

the problem was that for some reason mach is ignoring our request to keep the 0,1,2 fds open and close the rest and its closing them all. you can verify this with the dd command.

i fixied this. but seems like there’s still another regression to fix. ill try to have a look at this but it was introduced by @alvaro_fe

On 18 May 2017, at 21:53, SajjadPourali notifications@github.com wrote:

I could print the output by forwarding stdio with rarun2 script. But directly stdin is not possible, and by default (without using rarun2) stdin and stdout will not be shown in terminal.
https://cloud.githubusercontent.com/assets/20374762/26220609/8891aa02-3c28-11e7-90b3-0af886963a9f.png
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/7510#issuecomment-302522863, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lpYRMaI9y2ZZxpaOvQwOBy4ZWmAJks5r7KGegaJpZM4NdEk4.

@radare : What do you think about reopening this issue ?

Open another one. The output is printed already, so the issue is different

On 20 May 2017, at 13:28, SajjadPourali notifications@github.com wrote:

@radare : What do you think about reopening this issue ?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

XVilka picture XVilka  Â·  6Comments

YugoCode picture YugoCode  Â·  6Comments

NotAFile picture NotAFile  Â·  6Comments

S01den picture S01den  Â·  4Comments

MariasStory picture MariasStory  Â·  6Comments