From patchwork Fri Sep 7 06:40:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rashmica Gupta X-Patchwork-Id: 967229 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 4267C13yBbz9s4Z for ; Fri, 7 Sep 2018 16:41:49 +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="slC1nJ0R"; dkim-atps=neutral Received: from lists.ozlabs.org (unknown [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4267C122xhzF3Sg for ; Fri, 7 Sep 2018 16:41:49 +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="slC1nJ0R"; 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=209.85.210.196; helo=mail-pf1-f196.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="slC1nJ0R"; dkim-atps=neutral Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) (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 4267Bc5xfnzF3ST for ; Fri, 7 Sep 2018 16:41:28 +1000 (AEST) Received: by mail-pf1-f196.google.com with SMTP id j26-v6so6522105pfi.10 for ; Thu, 06 Sep 2018 23:41:28 -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=slC1nJ0RKhUHS4PN51YrFjdZdfdFVIcObrFW8iLfrI85rA73sCZ2iyuGq8s86sinxv x/C13vuXNCjyRAb/by8Yjx5VT3g29wcbk6y0YuJQ/4PrKall7mjcztvRXruHBzfk2Re4 TuMGvctVxMQgiUzCetqianUK39eqpBjq6Mc624WYLjINPNpxMt2BrauBPHk0wsWQj73M b9czLHZC50QabKTB+Koohy7FbwN1GpNpeZkOyWf/Fi99cAuGoKvzPd0r0Gsv9j705VD+ fU2bqWy8FnfQRj+Xraxd8iNvvthGBX+MXtZC8GVe65aRwY9t+QHJGcrp14tUGjw3AH4s pR+Q== 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=kYaCDXFybHsMn4Fe3+G5HYxV/SD2FqeKHd2ma/qzWseLLDZptCndYpHtfuvN80QooF TYvu3O6+bFjiJvoC7oe2gXRdLcFXPeZ5fq/L7ywv5wrkELZih0bCyIBk1pvPaSsDL+hc pUnTKswDrMFuVWfVM4R/DEXikS0YaQ52MyJ/R46043YhhKoInWxfhr0paTX2cCZlVYeW FMwwCpF4pjeoARPeqbc5PZTVxaTYfYCXzNQofnEOY1fnyGgOw51J8/Ql5pT/0Z+fXvpC u2qGf/Dvstc650hUmejpkmSK6ZewdU1MmBdwa64fqG6Bi16hxpTVV5vOzKq5ImEPdQ1K ClJw== X-Gm-Message-State: APzg51BR97/UMClgM9+HAWTPFDsSTsGGsRwXXo21IIox/tbXO0u0iifH WejXRKieFUpfluy9hIS8DTqDSF+B5N0= X-Google-Smtp-Source: ANB0VdYHuf5XN4GQ45V3UoDrjhklnEbdsAZvLpvnwdzEzY53G2XNs1Y3Sea7cgh8FIyxDEB1kMB4Vg== X-Received: by 2002:a63:f:: with SMTP id 15-v6mr6750602pga.430.1536302487126; Thu, 06 Sep 2018 23:41:27 -0700 (PDT) Received: from rashmica.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id y69-v6sm14958108pfd.36.2018.09.06.23.41.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Sep 2018 23:41:26 -0700 (PDT) From: Rashmica Gupta To: pdbg@lists.ozlabs.org Date: Fri, 7 Sep 2018 16:40:15 +1000 Message-Id: <20180907064015.1058-17-rashmica.g@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180907064015.1058-1-rashmica.g@gmail.com> References: <20180907064015.1058-1-rashmica.g@gmail.com> Subject: [Pdbg] [PATCH v2 16/16] README: Add some gdbserver info X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.27 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).