NetBSD Problem Report #58010
From www@netbsd.org Fri Mar 8 21:43:55 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 8BADC1A923B
for <gnats-bugs@gnats.NetBSD.org>; Fri, 8 Mar 2024 21:43:55 +0000 (UTC)
Message-Id: <20240308214324.3F9111A923C@mollari.NetBSD.org>
Date: Fri, 8 Mar 2024 21:43:24 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: crash(8) doesn't support `mach cpu N' to examine registers/stack of other CPUs
X-Send-Pr-Version: www-1.0
>Number: 58010
>Category: bin
>Synopsis: crash(8) doesn't support `mach cpu N' to examine registers/stack of other CPUs
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 08 21:45:00 +0000 2024
>Last-Modified: Mon Aug 17 19:00:01 +0000 2026
>Originator: Taylor R Campbell
>Release: current, 10, 9, 8, ...
>Organization:
The NetDDB Foundacrash
>Environment:
>Description:
The `mach cpu N' command in ddb lets you switch to another CPU's saved registers and stack, even if the CPU is running and they haven't been saved into the lwp state. crash(8) is built without support for `mach cpu N', though.
>How-To-Repeat:
Try to examine another running CPU's registers and stack trace in a crash dump.
>Fix:
Yes, please!
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58010 CVS commit: src
Date: Mon, 17 Aug 2026 18:58:57 +0000
Module Name: src
Committed By: riastradh
Date: Mon Aug 17 18:58:57 UTC 2026
Modified Files:
src/sys/arch/amd64/amd64: db_interface.c
src/sys/arch/i386/i386: db_interface.c
src/usr.sbin/crash: Makefile
src/usr.sbin/crash/arch: x86.c
Log Message:
crash(8): Add support for `mach cpu N' on x86.
Requires core dump to have the registers saved on cpuN. This happens
with the ddb `sync' command, but not with the kern.dump_on_panic=1
ddb.onpanic=0 path yet -- TBD.
PR bin/58010: crash(8) doesn't support `mach cpu N' to examine
registers/stack of other CPUs
To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amd64/amd64/db_interface.c
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/i386/i386/db_interface.c
cvs rdiff -u -r1.54 -r1.55 src/usr.sbin/crash/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/crash/arch/x86.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.