NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/54590: running binaries from gdb fails
The following reply was made to PR toolchain/54590; it has been noted by GNATS.
From: christos%zoulas.com@localhost (Christos Zoulas)
To: gnats-bugs%netbsd.org@localhost, toolchain-manager%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, martin%NetBSD.org@localhost
Cc:
Subject: Re: toolchain/54590: running binaries from gdb fails
Date: Tue, 1 Oct 2019 14:07:26 -0400
On Oct 1, 4:45pm, martin%duskware.de@localhost (Martin Husemann) wrote:
-- Subject: Re: toolchain/54590: running binaries from gdb fails
| The following reply was made to PR toolchain/54590; it has been noted by GNATS.
|
| From: Martin Husemann <martin%duskware.de@localhost>
| To: gnats-bugs%netbsd.org@localhost
| Cc: kamil%NetBSD.org@localhost
| Subject: Re: toolchain/54590: running binaries from gdb fails
| Date: Tue, 1 Oct 2019 18:44:32 +0200
|
| Example ktrace for this issue:
|
| 24228 1 gdb CALL execve(0xbfffee18,0xbb8b6070,0xbb89fd00)
| 24228 1 gdb NAMI "/usr/pkg/bin/tcsh"
| 24228 1 gdb NAMI "/usr/libexec/ld.elf_so"
| 24228 1 tcsh EMUL "netbsd"
| 7933 1 gdb RET __vfork14 24228/0x5ea4
| 7933 1 gdb CALL __wait450(0x5ea4,0xbfffe18c,0,0)
| 7933 1 gdb RET __wait450 24228/0x5ea4
| 7933 1 gdb CALL ptrace(PT_GET_PROCESS_STATE,0x5ea4,0xbfffe190,8)
| 7933 1 gdb RET ptrace -1 errno 22 Invalid argument
|
| 24228 == 0x5ea4
| and sizeof struct ptrace_state should be == 8.
|
| So I guess sys_ptrace_common.c:701 strikes and I really don't get how this
| is supposed to work.
The trap events reported in eventswitch are:
KASSERT((code == TRAP_CHLD) || (code == TRAP_LWP) ||
(code == TRAP_EXEC));
But the trap events that can be retrieved in get_process_stats are:
(t->p_sigctx.ps_info._code != TRAP_CHLD &&
t->p_sigctx.ps_info._code != TRAP_LWP)) {
(TRAP_EXEC is missing)
christos
Home |
Main Index |
Thread Index |
Old Index