Closed D1mon closed 1 year ago
Yeah that's expected, you have to run dc
to continue the execution of the process if you want that. If there's an issue after this it could be related to the way threads are processed
Yes, it works, but sometimes needes few times dc
. Application is running, but i can't put any radare command except ^C (Ctrl + C), and app freezes again.
Then it seems that dc is not continuing all the threads. But only the currently selected one
On Fri, May 7, 2021, 9:05 AM D1mon @.***> wrote:
Yes, it works, but sometimes needes few times dc. Application is running, but i can't put any radare command except ^C (Ctrl + C), and app freezes again.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/radareorg/radare2/issues/18663#issuecomment-834121710, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG75FT357RLIRK4C5L67I3TMOGNJANCNFSM44G6F2TQ .
I testing in gdb
. In gdb same bug(maybe not bug, but i don't like this behavior). gdb
freezes after attaching and unfreeze after cont
and i can't input any commands until press ^C
Well thats how debuggers work. They have a blocking interface when the process is running. You cant interact with the debugee until the process is stoped again. Windows have some async apis but you cant do everything. In r2, the memory reads go thru the proc interface so if u just want to read write memory while the process runs you can do that. But reading registers and such is not possible or make sense at all
If you want interactivity use r2frida
Can you try setting -e dbg.threads=true ?
No works, still freezes.
After dc? After attaching is expected and normal
After dc
- program works: unfreeze. But in radare i can't put any commands, need press ^C then program freeze but in radare i can put commands. One out of two. Either I can use a program or debugger. At the same time does not work. I need to constantly switch.
Yes, thats usually how debuggers work on Linux. because ptrace is blocking and must be used from the same thread.
This may be correct, but it is not convenient. Is it possible to make it so that it does not block and it is possible to simultaneously work with both the program and the debugger?
This may not apply to this topic, but I just wonder. And how then does Cheat Engine (CE) work? When CE works in the debugger mode, it does not block the program (game).
Cheat engine is a windows tool. Windows api permit that. On linux/mac the debugger needs to block/queue calls and have dedicated threads to handle this. Its just that r2 debugger for windows behaves like linux/mac debuggers work. Which nay not be the expected way.
This will eventually be addressed but its not yet done
I really hope this issue does not come from cast on the refactor of this PR: https://github.com/radareorg/radare2/pull/18669
This is not an issue. Its normal behaviour and its not a regression. And no, your patch is harmless and unrelated
Same as #15937 but for Linux(Manjaro)
Environment
Description
Any programs freezes after attach
Test
terminal 1: run
kate
terminal 2:
r2 -d <pid of kate>
kate freezes (buttons, keypress not working)