From nobody Mon Oct 03 16:56:45 2022 X-Original-To: dev-commits-src-all@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 4Mh6SG19yCz4dgxy; Mon, 3 Oct 2022 16:56:46 +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 4Mh6SG0Wblz3SLm; Mon, 3 Oct 2022 16:56:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664816206; 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=FkTd2DlLI5RH0gGVWxD5w4HywbXBCA/0LWCWE8Tgknk=; b=iRF2csScHqBdXiZcex8kXlESfE3uHjIO8OIspVpYPlX6MsVo95rovJURyxVJU4XtH/gM0/ 3fGBFgxOvnqwSQ9YKy0BUtzmO3ZowoYrSyl5AOBwXtOhs5olU6s2FsOkPomwDbEXrt+jj7 Fz2riwZDUKVjG8G9n7NWxBG59i1YXkO0vz3ckcLlWAixgjPb7vWKcs2vvuqWUnkhiY/Cyg lEjW7iZRVCnY1THxvYVQnMQEUYHCa+JX0Kl+oA/IPvtUY8w5PY2Dqc37FBWvCDIPjLQQeg u0UuclOuVSWJlUg5zlfTXER/RuxFsoDvplalKWWU6kTXVaK3lheH7B4fQ/GaAA== 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 4Mh6SF6gvfzGs9; Mon, 3 Oct 2022 16:56:45 +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 293Guj1H085005; Mon, 3 Oct 2022 16:56:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 293Gujp2085004; Mon, 3 Oct 2022 16:56:45 GMT (envelope-from git) Date: Mon, 3 Oct 2022 16:56:45 GMT Message-Id: <202210031656.293Gujp2085004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 791bfa60e8ac - main - riscv: decode syscall in ddb backtrace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 791bfa60e8ac85381d449bae5caa0999950a7039 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664816206; 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=FkTd2DlLI5RH0gGVWxD5w4HywbXBCA/0LWCWE8Tgknk=; b=yCXa3BnxFwqSA1fnp6HGfgETsfcilDrSAHLMdYBmFqBS0Uy3sfj4DIA4MjjjCQ7oa7Kkyv xoFVYuqxH3hiAioKgo2OrNIKj/6DEWi53cekeeoL+3Vc30iaL01/ofKLu2HN/GBkCw6lcq o3BVlSqqKDMc8ptuqZ4Ba1n2Ca52/VaOczSp5/x81L9E7DxgHPpAPHu77NK0yYoOVHsAOG XxbyrAIJGBYYnfYPASNU5Xwk1PyGdKUc2N56hHz7Js5LObt50ZxqgaHs9PItOvNyJ3Lo1/ lQHEEAB9sY+HVKIZBoaU61uijt+mN3ngFPYY4toQcwVEiH+yGNSk/UBfLlHySw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664816206; a=rsa-sha256; cv=none; b=rmBGf2s+p2Y5WODqRR6dgKdUEnw1XM+o+HbC7kH5+4sTDq/GVMJirTVY3MRB+KQVhTgu8T 0ZAtiN25SbOhLL/f1Z+vMOhW+X4wpKEvtMN9m7ZvFfeY+516y9kak1MBY6dorrvfP0N5Q8 z+NYA8w1Q656Dr+gXxzkEEinsx3H0imrqENAUtGiRJJdkXcpDiBm9XsS1GBbaJfVIYIX3+ Zt80w1clSES9g5wOsSNZWGgsUKJ4Wl4s2jmwrPiT7sJ0/wTGk90TAH9v67BxJk22kkagmS o0hFhwRx+khwXgSNfrscqOwK0R5AYhfDShmaTsetFqUiE6njIEj890vOEt/P2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=791bfa60e8ac85381d449bae5caa0999950a7039 commit 791bfa60e8ac85381d449bae5caa0999950a7039 Author: Mitchell Horne AuthorDate: 2022-10-02 22:47:24 +0000 Commit: Mitchell Horne CommitDate: 2022-10-03 16:49:54 +0000 riscv: decode syscall in ddb backtrace This presents the existing information in a slightly more readable way. Reviewed by: jrtc27, markj, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D36565 --- sys/riscv/riscv/db_trace.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/riscv/riscv/db_trace.c b/sys/riscv/riscv/db_trace.c index 56508464e7c6..ef8698917021 100644 --- a/sys/riscv/riscv/db_trace.c +++ b/sys/riscv/riscv/db_trace.c @@ -92,13 +92,18 @@ db_stack_trace_cmd(struct thread *td, struct unwind_state *frame) break; } - if ((tf->tf_scause & SCAUSE_INTR) != 0) + if ((tf->tf_scause & SCAUSE_INTR) != 0) { db_printf("--- interrupt %ld\n", tf->tf_scause & SCAUSE_CODE); - else + } else if (tf->tf_scause == SCAUSE_ECALL_USER) { + db_printf("--- syscall"); + db_decode_syscall(td->td_sa.code, td); + db_printf("\n"); + } else { db_printf("--- exception %ld, tval = %#lx\n", tf->tf_scause & SCAUSE_CODE, tf->tf_stval); + } frame->sp = tf->tf_sp; frame->fp = tf->tf_s[0]; frame->pc = tf->tf_sepc;