qilingframework / qiling

A True Instrumentable Binary Emulation Framework
https://qiling.io
GNU General Public License v2.0
5.14k stars 744 forks source link

Debugger not supported #1332

Closed Ryze-T closed 1 year ago

Ryze-T commented 1 year ago

*Describe the bug TendaAC1518.py: ql.debugger=":9999" Error: Debugger not supported image

Sample Code image

elicn commented 1 year ago

You should use ql.debugger = "gdb:9999" instead.

Ryze-T commented 1 year ago

image I used tencent Cloud machine。 Does it matter?

Ryze-T commented 1 year ago

ql.debugger = "gdb:0.0.0.0:9999"

this code can solve it

Ryze-T commented 1 year ago

But When I used Ida Pro debug. tendaac18.py,It errors: image

elicn commented 1 year ago

The reason is that execve is re-loading Qiling, which then tries to re-open the debugger. There was a line there to prevent that, but it was removed for some reason (... by me, apparently).

https://github.com/qilingframework/qiling/blob/e2b0e4d5adc3e2557c95528a052a7d792aec99fb/qiling/os/posix/syscall/unistd.py#L519

Uncomment that line, and see if it works.

Ryze-T commented 1 year ago

Thanks,It work

Ryze-T commented 1 year ago

When I don't use debug options,It works: image

When I open debug options and gdb connect it and run, It doesn't work: image image image

elicn commented 1 year ago

I don't understand the problem you encounter, and the purpose of the attached screenshots is unclear to me. Can you please clarify the situation?

KA2010 commented 10 months ago

@Ryze-T How you solve this issue? I counter same, thanks

elicn commented 10 months ago

Hey @KA2010, let me know what is the exact scenario in which you encounter the problem. Maybe we should re-open this one.