Skip to content
  • Jan Kiszka's avatar
    scripts/gdb: add lx-symbols command · 66051720
    Jan Kiszka authored
    
    
    This is probably the most useful helper when debugging kernel modules:
    lx-symbols first reloads vmlinux.  Then it searches recursively for *.ko
    files in the specified paths and the current directory.  Finally it walks
    the kernel's module list, issuing the necessary add-symbol-file command
    for each loaded module so that gdb knows which module symbol corresponds
    to which address.  It also looks up variable sections (bss, data, rodata)
    and appends their address to the add-symbole-file command line.  This
    allows to access global module variables just like any other variable.
    
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Jason Wessel <jason.wessel@windriver.com>
    Cc: Andi Kleen <andi@firstfloor.org>
    Cc: Ben Widawsky <ben@bwidawsk.net>
    Cc: Borislav Petkov <bp@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    66051720