From nobody Wed Aug 24 19:25:17 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MCbf56rd7z4Zfl0; Wed, 24 Aug 2022 19:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MCbf54GRrz3Q34; Wed, 24 Aug 2022 19:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661369117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wsq2zlfQjit/LWsWAlR1xzog5Frhg+nQBkqjKr9EPt0=; b=iMmpRtQM6vrlRcrmN03+3uzYCJ8LLBRNtgkdlOgYWZ/YlBiJtGafAmSVrRlLmg05ZUZvos 246BVnLajW6RT6sU4HcARAdWhtZe+woDQ8KJiPb/f+MpAuHFQKx7QN//2n89YBGI87PLuu 9qrtc9pM6AgmkSp59vZC4oCE/gK0hIIqXUv7EZZupVQCq3rFK896NT0fprg1WHzh02fb0Q cp/42lr8Yk2AcQf1AARPqCXzh7nvB9OJUHY4x1s6mjHmRXg7EMMUX8lW3Ua//C6frmdY5U m0XUArBQptzAUuDy9xHCLd6RsJALrHQ3R6aiGk/MAqk5zWb1LQFQKBLNfeDE2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MCbf53NYJzLC1; Wed, 24 Aug 2022 19:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27OJPHU2069286; Wed, 24 Aug 2022 19:25:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27OJPHeA069285; Wed, 24 Aug 2022 19:25:17 GMT (envelope-from git) Date: Wed, 24 Aug 2022 19:25:17 GMT Message-Id: <202208241925.27OJPHeA069285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ff32a055542f - main - x86: improve machdep.uprintf_signal List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff32a055542f0bbe835205a261350d9c0b6c553a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661369117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wsq2zlfQjit/LWsWAlR1xzog5Frhg+nQBkqjKr9EPt0=; b=ezpLjt/YprdNW1Ksdv8Iv3WBO4Ikvaw0efcY4KekBPKZzDYelbomOmpPYhFxvMi/kqO5uU vILL9Y4VCu0jnmPF5eZE3b4HXhOXrfEZgGZv14WXKs+XkNFx/sLshb7NzTFQew+Pr8wUju Ido3NJ4+BYfm/9Pzk/Syuz8dU4Me2h0MwmbNs+Qz0X9ImcgUIddJP+ywK62oJKTeVP6ll0 +a0fYtgl44tov3JbS/V0xVwPcC+b3pl/rjv/lIBrnU8kDsMs37/sdDTTltMH3fvrZWi1PF VnJxDiI+XGCVX3uE5Vr2ou7nX//tLJ8ryFLYi1irBV+7zmM5DAdn8aRy0vuBOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661369117; a=rsa-sha256; cv=none; b=D72OYj4Ozm8a9ARnLF+QvU9At0zKIqkb2Xl6cUUv2zkp3VTwLEBpmvjfjEMTE30UkoRMAZ hmHMw3Ai41gwzD2sec5sLHiQ8rHtPdKZ8AiNrdxpNaahnOux5AaxS9slKCYTw84C+k4aIU LC7mmVf4AjNXtT0tq/fctMF9B35D2beNXYHceVhfSYVFBK6GPD6npgi+h6Yaqv9mxxXXFC ZRgI7wD8Y2oI5P7NlBiqpAfzsn2CIl7pSsaIZsCD1adItRT5rG1TQnvtV/0n/sQf91x5N2 AsUzt6uUX6glfn2XRaXETBhxNwuGnY9+BgceVywMtV0Ni34IFj3Z6Ms47pGssQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ff32a055542f0bbe835205a261350d9c0b6c553a commit ff32a055542f0bbe835205a261350d9c0b6c553a Author: Konstantin Belousov AuthorDate: 2022-08-21 01:47:11 +0000 Commit: Konstantin Belousov CommitDate: 2022-08-24 19:12:45 +0000 x86: improve machdep.uprintf_signal Print %eax/%rax. Use better format strings, like %#x. Reviewed by: jhb Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36302 --- sys/amd64/amd64/trap.c | 6 +++--- sys/i386/i386/trap.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 42fb19819111..a94722851ce1 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -628,11 +628,11 @@ trap(struct trapframe *frame) ksi.ksi_trapno = type; ksi.ksi_addr = (void *)addr; if (uprintf_signal) { - uprintf("pid %d comm %s: signal %d err %lx code %d type %d " - "addr 0x%lx rsp 0x%lx rip 0x%lx " + uprintf("pid %d comm %s: signal %d err %#lx code %d type %d " + "addr %#lx rsp %#lx rip %#lx rax %#lx" "<%02x %02x %02x %02x %02x %02x %02x %02x>\n", p->p_pid, p->p_comm, signo, frame->tf_err, ucode, type, - addr, frame->tf_rsp, frame->tf_rip, + addr, frame->tf_rsp, frame->tf_rip, frame->tf_rax, fubyte((void *)(frame->tf_rip + 0)), fubyte((void *)(frame->tf_rip + 1)), fubyte((void *)(frame->tf_rip + 2)), diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 5a247a36d2e9..cf7b45b8cd85 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -693,12 +693,12 @@ kernel_trctrap: ksi.ksi_addr = (void *)addr; ksi.ksi_trapno = type; if (uprintf_signal) { - uprintf("pid %d comm %s: signal %d err %x code %d type %d " - "addr 0x%x ss 0x%04x esp 0x%08x cs 0x%04x eip 0x%08x " + uprintf("pid %d comm %s: signal %d err %#x code %d type %d " + "addr %#x ss %#04x esp %#08x cs %#04x eip %#08x eax %#08x" "<%02x %02x %02x %02x %02x %02x %02x %02x>\n", p->p_pid, p->p_comm, signo, frame->tf_err, ucode, type, addr, frame->tf_ss, frame->tf_esp, frame->tf_cs, - frame->tf_eip, + frame->tf_eip, frame->tf_eax, fubyte((void *)(frame->tf_eip + 0)), fubyte((void *)(frame->tf_eip + 1)), fubyte((void *)(frame->tf_eip + 2)),