From patchwork Sat Nov 29 07:59:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 776 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764403277; bh=k5Fhn7S/BvbLOdlQga/R5iX6nZ5Uj4bb5t1fV32DR3o=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=B6b9KigVynQoBY/2NWHsNq2noXw+DCVwgxTiV7oR0e4+X1h9S+R1kebajWsMlnUfr CVQj3viPbTCY0G/nGns/UYvQWAUZMv+Bx0TBDGmvavO9uC4f034SVIUnhT4FzQcWbS tu99uP2Y9GUezTIPZhDcCC0BHHkzQMcE7zsW/3VBvZz5nSWRN3eObiydtFrfwOBRXn r6kNytRnlIiFNNr0k3awa1j61OzcwsH6M7h6L11ETGZQYneLS3ur+aA1B7gBe3R7qz wYiCMW5S8wik6zz4Y/6qGeZI44Fl37zner1FcK8+Y/cRYTTgqmeDeXmYim1jmiZaHf /cNepOsb/6kSw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C8F9D68835 for ; Sat, 29 Nov 2025 01:01:17 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id G8hGz510Y0s5 for ; Sat, 29 Nov 2025 01:01:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764403277; bh=k5Fhn7S/BvbLOdlQga/R5iX6nZ5Uj4bb5t1fV32DR3o=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=B6b9KigVynQoBY/2NWHsNq2noXw+DCVwgxTiV7oR0e4+X1h9S+R1kebajWsMlnUfr CVQj3viPbTCY0G/nGns/UYvQWAUZMv+Bx0TBDGmvavO9uC4f034SVIUnhT4FzQcWbS tu99uP2Y9GUezTIPZhDcCC0BHHkzQMcE7zsW/3VBvZz5nSWRN3eObiydtFrfwOBRXn r6kNytRnlIiFNNr0k3awa1j61OzcwsH6M7h6L11ETGZQYneLS3ur+aA1B7gBe3R7qz wYiCMW5S8wik6zz4Y/6qGeZI44Fl37zner1FcK8+Y/cRYTTgqmeDeXmYim1jmiZaHf /cNepOsb/6kSw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B866B687D3 for ; Sat, 29 Nov 2025 01:01:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764403276; bh=SN2jn9l4rZvanD7cTiIO7T4Lyo9ylcY0ihyjVF4Ug/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fiWLMRhnDtr14XdxMiuhiWyqDIjs44sstigNIy9CYggPZf99WAeFrO4ItV87RQHCs 4g3/M7lF0FfRuuoGuCoQ87b4Uy2LPl+jhzv+xpExKz2Fe0o/C0lviLsaVXnSnyhIlz MiYRNKdwGghgSESM/aEXwDyC4YN5uOckyWEWkk6fWLZyDx7XaHdmoRb5cWtt5X+VaO NCacK0hH+31/gdkd44rCW65cOq7yocRhe6sV4DhlN8I/pDQVnOeqTnl7dWk8yrYRJ6 LBmoxklc/7mzD4cDQrpDZ87pb3IjhZSfAo4Z0uWhBi7s/t1pusYgOQt663BXLdXCfa f9uVpVAwgwEgQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1415D687B5; Sat, 29 Nov 2025 01:01:16 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id G2NZAa2CSG0L; Sat, 29 Nov 2025 01:01:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764403275; bh=9Ht7pSYJbW/mPRhyR1LV6bx9B4V/hNqI9rQFRbBWa2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eZwnzpKQ1IZ1U8mbvbx3ocOELlVmPdGYLulv1063vyuWXlsEQL9IfwtVwoVmx0CXQ Nud7C9kR0EMDOhT+3862lTdo5YmvJ91RhGicLJtQ+OlOFIgU8lJ3jrLFNfRfAYdEzA R9kKNcnLx1gnTYqJ0STZgSTD37T/8bk4u/FaXo2fkXgU3QZ6u9RLson1HwHpC0Yjdb VfkNBnif2BXzNiAY0FYuhPKsf4C+aAP1k/iCnbHZhNjPEjhEc1d2ra8kGHpL2qvrfR rvHFiZ9du45w6Qy5+6XTISosJuNdbsjAMS73SGN2fZehGV9EWLHCyuckEqBpmZRG3Z mhxK1SXxJfEsQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 727756876F; Sat, 29 Nov 2025 01:01:15 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 29 Nov 2025 00:59:54 -0700 Message-ID: <20251129080014.758001-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251129080014.758001-1-sjg@u-boot.org> References: <20251129080014.758001-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: KL7R46ON7JH4ZRUHH6GK5CCBDLHXEVQB X-Message-ID-Hash: KL7R46ON7JH4ZRUHH6GK5CCBDLHXEVQB X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 09/10] backtrace: doc: Mention the feature List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Add a short section about the backtrace feature to the sandbox docs. Co-developed-by: Claude Signed-off-by: Simon Glass --- doc/arch/sandbox/sandbox.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/arch/sandbox/sandbox.rst b/doc/arch/sandbox/sandbox.rst index fc2b7c482f4..9e9b027be8b 100644 --- a/doc/arch/sandbox/sandbox.rst +++ b/doc/arch/sandbox/sandbox.rst @@ -616,6 +616,23 @@ Here is an example trace:: Hit any key to stop autoboot: 1 +Backtrace Support +----------------- + +Sandbox supports printing a backtrace of the current call stack, which can be +useful for debugging. The :doc:`backtrace <../../usage/cmd/backtrace>` command +prints a backtrace showing function names, source files, and line numbers. + +This uses the libbacktrace library (bundled with GCC) to provide detailed symbol +information, including for static functions. + +To use it, simply run:: + + => backtrace + +This command is enabled with ``CONFIG_CMD_BACKTRACE``. + + Debugging the init sequence ---------------------------