1 May 2005 10:46
gdb can't trace
Emmanuel Dreyfus <manu <at> netbsd.org>
2005-05-01 08:46:00 GMT
2005-05-01 08:46:00 GMT
Hello
I'm working on COMPAT_LINUX/amd64 and I experience unexpected problems.
When launching a Linux binary, the program starts but hangs before doing
any system call. Running gdb shows it is stopped on a hlt instruction.
What is it? halt? halt until when?
Thanks to sysctl proc.$$.stopexec I can use gdb to attach the program
before it starts. Stack and registers are correctly set up.
In order to find out what goes wrong, I'd like to trace the Linux binary
running on NetBSD using gdb. But gdb seems unable to trace. Anyone see
any reason why it could not?
$ gdb /emul/linux/bin/hello
(gdb) attach 632
Attaching to program: /emul/linux/bin/hello, process 632
_start () at ../sysdeps/x86_64/elf/start.S:48
48 ../sysdeps/x86_64/elf/start.S: No such file or directory.
in ../sysdeps/x86_64/elf/start.S
Current language: auto; currently asm
(gdb) info reg
rax 0x0 0
rbx 0x0 0
rcx 0x4001c0 4194752
rdx 0x0 0
rsi 0x0 0
rdi 0x0 0
rbp 0x0 0
(Continue reading)
RSS Feed