From ab121f379a3cff458c90e6f480ba4bb68c8733dd Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Sat, 27 Nov 2010 07:49:17 +0100 Subject: Linux Device Drivers 3 examples --- misc-progs/gdbline | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 misc-progs/gdbline (limited to 'misc-progs/gdbline') diff --git a/misc-progs/gdbline b/misc-progs/gdbline new file mode 100644 index 0000000..d66572e --- /dev/null +++ b/misc-progs/gdbline @@ -0,0 +1,19 @@ +#!/bin/bash +# +# $Id: gdbline,v 1.1 2004/08/02 16:27:55 corbet Exp $ +# +# gdbline module image +# +# Outputs an add-symbol-file line suitable for pasting into gdb to examine +# a loaded module. +# +cd /sys/module/$1/sections +echo -n add-symbol-file $2 `/bin/cat .text` + +for section in .[a-z]* *; do + if [ $section != ".text" ]; then + echo " \\" + echo -n " -s" $section `/bin/cat $section` + fi +done +echo -- cgit v1.2.1-18-gbd029