From patchwork Thu Jan 7 12:52:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 59277 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp530568lbb; Thu, 7 Jan 2016 04:53:12 -0800 (PST) X-Received: by 10.67.14.74 with SMTP id fe10mr152527140pad.151.1452171192287; Thu, 07 Jan 2016 04:53:12 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si7700272pas.67.2016.01.07.04.53.11; Thu, 07 Jan 2016 04:53:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753673AbcAGMxK (ORCPT + 29 others); Thu, 7 Jan 2016 07:53:10 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37731 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753390AbcAGMw3 (ORCPT ); Thu, 7 Jan 2016 07:52:29 -0500 Received: by mail-wm0-f46.google.com with SMTP id f206so121805684wmf.0 for ; Thu, 07 Jan 2016 04:52:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ac7AF+wpbIRgLK4b1mfU7JmoN8nQaqttP1/QB0DNyXY=; b=QzIOGgcbCdhgWE5zX6F1yr9kLGLtov0RRVT4lKN+t41ezJgSuu+Iw5R6qLgjUUMjBK giZftsNssipsaNrmDDR/uC6TFTzrx5g2itnvNqeFCYEW4Sa44O1nxpGsHpYfdl3YAFyP K/Pmlb5BEHl9xFwCZ17xoLbNmMWHnkH8unInc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ac7AF+wpbIRgLK4b1mfU7JmoN8nQaqttP1/QB0DNyXY=; b=Vq0q5BGhcLjyRL9BcHGpzteG0TwKyPf8NNHUf2BXQcTQ4FhwJ57Cq+42mTtCfGlQjE boWrN1EYgSj5U9D+jQ/0uQzENkh0okkv67+vlxlMg/wIvxuK5IudMueSB6VQH9v8FsFC CaWK4Nt781/EKpE2QV7/sB850XUz466q4BwSP69VgQYQYbmBlJVonpHXKQX3C6RTHQFL oPFRC1ATcmffMQcbLLwLyB/4MZXg5QXf9wwW31SjjG26k+RqOy/ZJuAkyZN+fzYa9erT AvmirlDr7y+2B3ekPi85zVAvwXfcEouQCVvpLIks2OFyXW+yS1t1gyEJ06i6fEBRrWkD hEgA== X-Gm-Message-State: ALoCoQmBQW0Aqb2NDHpIM59Mm8tW66EODgparqG27Q63e2wblz74TwzQPaBfl3wwhfsbjIhw73gVuiwBiH1DTXd1AyPj2jtQAA== X-Received: by 10.28.54.209 with SMTP id y78mr17388195wmh.26.1452171148678; Thu, 07 Jan 2016 04:52:28 -0800 (PST) Received: from localhost.localdomain (cpc87017-aztw30-2-0-cust65.18-1.cable.virginm.net. [92.232.232.66]) by smtp.gmail.com with ESMTPSA id w23sm13543870wmd.1.2016.01.07.04.52.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jan 2016 04:52:28 -0800 (PST) From: Kieran Bingham To: jan.kiszka@siemens.com, linux-kernel@vger.kernel.org Cc: peter.griffin@linaro.org, lee.jones@linaro.org, maxime.coquelin@st.com, Kieran Bingham Subject: [PATCH 2/2] scripts/gdb: Add cmdline reader command Date: Thu, 7 Jan 2016 12:52:18 +0000 Message-Id: <1452171138-22691-3-git-send-email-kieran.bingham@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452171138-22691-1-git-send-email-kieran.bingham@linaro.org> References: <1452171138-22691-1-git-send-email-kieran.bingham@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org lx-cmdline Report the Linux Commandline used in the current kernel Signed-off-by: Kieran Bingham --- scripts/gdb/linux/proc.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 7a2afe60416a..4063ef65e160 100644 --- a/scripts/gdb/linux/proc.py +++ b/scripts/gdb/linux/proc.py @@ -13,6 +13,19 @@ import gdb +class LxCmdLine(gdb.Command): + """ Report the Linux Commandline used in the current kernel. + Equivalent to cat /proc/cmdline on a running target + """ + + def __init__(self): + super(LxCmdLine, self).__init__("lx-cmdline", gdb.COMMAND_DATA) + + def invoke(self, arg, from_tty): + gdb.write(gdb.parse_and_eval("saved_command_line").string() + "\n") + +LxCmdLine() + class LxVersion(gdb.Command): """ Report the Linux Version of the current kernel. Equivalent to cat /proc/version on a running target