NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/60826: Linux emulation: ptrace support on x86_64 missing
>Number: 60826
>Category: kern
>Synopsis: Linux emulation: ptrace support on x86_64 missing
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 30 08:35:00 +0000 2026
>Originator: Thomas Klausner
>Release: NetBSD 11.99.8
>Organization:
>Environment:
Architecture: x86_64
Machine: amd64
>Description:
When running wip/suse15_gdb's /emul/linux/usr/bin/gdb on a Linux
x86_64 binary, one gets:
--- begin ---
(gdb) r
Starting program: /usr/pkg/emul/linux/usr/bin/gcc-12
[ 2678745.9401125] linux_sys_rt_sigaction: setting signal 64 ignored
Couldn't get registers: Input/output error.
(gdb)
--- end ---
I'm not sure about the first warning, but the second is caused
by /usr/src/sys/compat/linux/common/linux_ptrace.h:
#if defined(__i386__) || defined (__powerpc__) || defined (__mips__) || \
defined(__arm__)
struct linux_sys_ptrace_args;
int linux_sys_ptrace_arch(struct lwp *, const struct linux_sys_ptrace_args *, register_t *);
#define LINUX_SYS_PTRACE_ARCH(l,v,r) linux_sys_ptrace_arch((l),(v),(r))
#else
#define LINUX_SYS_PTRACE_ARCH(l,v,r) EIO
#endif
i.e., on x86_64 in particular, linux_sys_ptrace_arch returns is not implemented.
Using the native gdb is not an option either:
--- begin ---
$ gdb /emul/linux/usr/bin/gcc-12
...
warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default i386:x86-64 settings.
Reading symbols from /emul/linux/usr/bin/gcc-12...
(No debugging symbols found in /emul/linux/usr/bin/gcc-12)
(gdb) br main
Function "main" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (main) pending.
(gdb) r
Starting program: /usr/pkg/emul/linux/usr/bin/gcc-12
gcc-12: fatal error: no input files
compilation terminated.
[Inferior 1 (process 1955) exited with code 01]
--- end ---
>How-To-Repeat:
See above.
>Fix:
Yes please.
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index