From patchwork Fri Oct 5 03:42:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rashmica Gupta X-Patchwork-Id: 979269 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42RFyT6dhnz9s8J for ; Fri, 5 Oct 2018 13:45:21 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dLzrT0Mx"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42RFyT4rb7zF3J0 for ; Fri, 5 Oct 2018 13:45:21 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dLzrT0Mx"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::541; helo=mail-pg1-x541.google.com; envelope-from=rashmica.g@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dLzrT0Mx"; dkim-atps=neutral Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42RFw43wC7zF3F5 for ; Fri, 5 Oct 2018 13:43:16 +1000 (AEST) Received: by mail-pg1-x541.google.com with SMTP id r9-v6so4099289pgv.6 for ; Thu, 04 Oct 2018 20:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xZjNRCDcQXklAz8+IMOOIGVH7F5zdmpuGp8/KKvQEAE=; b=dLzrT0MxvVHd9RZ+PlXSF08LlIHELopSy7w5F4VXzooTmaHN6ZTd50bDgKWigwqBU4 qg6xLleSybdvKkDa5WQTxYZeGw9l4th6eCzsXc39eNVaeV8rX0iL0WT+V5Mvn3JtEjFo GDjIcvtyQG0eZ9dl4u7hHsHS6bgFwFPPAHUd5EUL0kt2Hb9OyJicmBTaptaAnAQ1PLZw rIRUtnDzsRQmzmW0HceD3KizueS9Ncg+qrP9QI/s4jGik5OJdDRaMYDbNJmfjMLEiCuj GUE7CG5fXskcm3HdF+Q9VYvD3HR2ke9CjQhtUIfqunxyGVyD8pD1XVMWYI8cTXxryHSB YJtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xZjNRCDcQXklAz8+IMOOIGVH7F5zdmpuGp8/KKvQEAE=; b=H066VNmDg24htUuX/q/oBt4a2ZjF4Y22gR0/H6TJ7nj4CtR33jQKXH4ILYuShYmj0K vlfXHjrAmB/ZaoAvmARP6aMO9PNS06zhOKVcvLT9e3XhsBE5gKzfjZFzVRvD4lNrC+N3 N6wjlaFfGR+ryHJj6YxGdJ/6GAB/t23WZVhx2+WCClFk3EyeCbpDIHHbn/2+G1yNcRIJ vgJbVOr+K4cLA5bfIEz1FmhvK/XAmCT0uIbkh0LlNfemv++t9OLuxfRkTvguJA0XI3p1 g0g9OUgxxpwzP3D/MAgYUvaXWvjP8uN4kQ49DL7lIAeYHT2Ytk4t0UWIZcMNk4RdXGPV j21w== X-Gm-Message-State: ABuFfohDhZY0HfCmqehFxD/k7MlzriZ563gFLn0MActH9TNQRMLloQ3a ueT+cMe1gBYztLOIg7d882xayKM9kbg= X-Google-Smtp-Source: ACcGV63lOzXg5bWJwlAAfB09Za3P2ZrDSLeXyf9ljXsUfbiiIrSWIYcU5/LM5/NaV+A3Fqa7qiuM9A== X-Received: by 2002:a63:4343:: with SMTP id q64-v6mr8585251pga.276.1538710994497; Thu, 04 Oct 2018 20:43:14 -0700 (PDT) Received: from rashmica.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id b62-v6sm9328180pfa.159.2018.10.04.20.43.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Oct 2018 20:43:14 -0700 (PDT) From: Rashmica Gupta To: pdbg@lists.ozlabs.org Date: Fri, 5 Oct 2018 13:42:54 +1000 Message-Id: <20181005034254.890-5-rashmica.g@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20181005034254.890-1-rashmica.g@gmail.com> References: <20181005034254.890-1-rashmica.g@gmail.com> Subject: [Pdbg] [PATCH v3 4/4] README: Add some gdbserver info X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: npiggin@gmail.com MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Rashmica Gupta --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 878e6d3..dcbbbe3 100644 --- a/README.md +++ b/README.md @@ -365,3 +365,29 @@ There are also low level htm commands which can also be used: - `stop` will still stop the trace and de-configure the hardware. - `dump` will dump the trace to a file. +### GDBSERVER +At the moment gdbserver is only supported on P8 while the cores are in the +kernel. + +To run a gdbserver on a P8 machine from a BMC running openbmc: + +Stop all the cores of the host +$ ./pdbg -d p8 -a stop + +Run gdbserver on thread 0 of core 11, accessible through port 44 +$ ./pdbg -d p8 -p0 -c11 -t0 gdbserver 44 + +On your local machine: +$ gdb +(gdb) set architecture powerpc:common64 +(gdb) target remote palm5-bmc:44 + +Debugging info: +(gdb) set debug remote 10 + + +Notes: +1. DON'T RUN PDBG OVER FSI WHILE HOSTBOOT IS RUNNING. Weird things seem to +happen. +2. If you want to view the kernel call trace then run gdb on the vmlinux that +the host is running (the kernel needs to be compiled with debug symbols).