]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
scripts/gdb: add cmdline reader command
authorKieran Bingham <kieran.bingham@linaro.org>
Tue, 22 Mar 2016 21:27:36 +0000 (14:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2016 22:36:02 +0000 (15:36 -0700)
lx-cmdline Report the Linux Commandline used in the current kernel

[jan.kiszka@siemens.com: remove blank line from help output and fix pep8 warning]
Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/gdb/linux/proc.py

index 8a733dd99580835b60c6d8b7e7cde8fa25190d33..6e6709c1830c5945670b9604974bd0b4fa11b5ad 100644 (file)
 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"""