Skip to content

Problem with gdb #27

Closed Answered by kdrag0n
angelopassa asked this question in Q&A
Mar 8, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

It looks like Rosetta for Linux doesn't support running debuggers. Neither does QEMU:

(gdb) run
Starting program: /usr/bin/dmesg
warning: Could not trace the inferior process.
warning: ptrace: Function not implemented
During startup program exited with code 127.

Rosetta includes a GDB debug server which you should be able to connect to as a remote debug target, like this:

ROSETTA_DEBUGSERVER_PORT=4040 ls &
gdb ls
target remote :4040

Unfortunately, Rosetta just gets stuck using 100% CPU in a busy-loop when I run it like that.

I don't think there are any good answers here. While I don't think it's an inherent limitation, supporting ptrace + debugging in userspace emulators is hard and it …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by kdrag0n
Comment options

You must be logged in to vote
1 reply
@kdrag0n
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants