Problem with gdb #27
-
I have a problem with gdb. I started an ubuntu machine with cpu intel. When in type "run" on gdb it reports this error: "Couldn't get registers: Input/output error." |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It looks like Rosetta for Linux doesn't support running debuggers. Neither does QEMU:
Rosetta includes a GDB debug server which you should be able to connect to as a remote debug target, like this:
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 looks like there aren't any Linux ones that implement it fully (yet). Your use case may be better served by apps that run full-blown emulated VMs with QEMU (but obviously at a much larger performance cost due to emulation). |
Beta Was this translation helpful? Give feedback.
-
So you are using Ubuntu? I presume this is correct with orbstacks setup? You cannot directly run gdb since you would be debugging the rosetta runtime. I did read somewhere a security setting in Ubuntu that can stop the attachment of processes so have you tried? 'echo 0 > sudo tee /proc/sys/kernel/yama/ptrace_scope `
|
Beta Was this translation helpful? Give feedback.
It looks like Rosetta for Linux doesn't support running debuggers. Neither does QEMU:
Rosetta includes a GDB debug server which you should be able to connect to as a remote debug target, like this:
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 …