lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Aug 2011 13:45:27 +0800
From:	Hui Zhu <teawater@...il.com>
To:	linux-kernel@...r.kernel.org, gdb@...rceware.org
Subject: A script that used by GDB to load the symbols from Linux kernel modules

Hi,

When use GDB to debug or trace your kernel with KGDB, QEMU debug
interface or KGTP.  You must get some trouble with LKM symbols.  For
example:
(gdb) target remote localhost:12345
Remote debugging using localhost:12345
native_safe_halt () at
/home/teawater/big/kernel/linux-2.6/arch/x86/include/asm/irqflags.h:50
50	}
(gdb) b e100_poll
Function "e100_poll" not defined.
Make breakpoint pending on future shared library load? (y or [n])
This is because GDB didn't get the LKM symbols.  You can do it with
your hand.  But if you have a lot of LKMs, it will need some time.

Now, GDB support python script.  The attachment is a script to load
all symbols from Linux kernel modules to GDB.
For example:
(gdb) target remote localhost:12345
Remote debugging using localhost:12345
native_safe_halt () at
/home/teawater/big/kernel/linux-2.6/arch/x86/include/asm/irqflags.h:50
50	}
(gdb) so ~/kernel/svn/branches/teawater/getmod.py
(gdb) b e100_poll
Breakpoint 1 at 0xc889db40: file
/home/teawater/big/kernel/linux-2.6/drivers/net/e100.c, line 2165.

This script will include in KGTP(https://code.google.com/p/kgtp/) source.

Thanks,
Hui

View attachment "getmod.py" of type "text/x-python" (3056 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ