diff options
author | Javier Martinez Canillas <martinez.javier@gmail.com> | 2010-11-27 07:49:17 +0100 |
---|---|---|
committer | Javier Martinez Canillas <martinez.javier@gmail.com> | 2010-11-27 07:49:17 +0100 |
commit | ab121f379a3cff458c90e6f480ba4bb68c8733dd (patch) | |
tree | a9851af109ee83646d108bc247d03b131461b764 /misc-progs/gdbline | |
download | ldd3-ab121f379a3cff458c90e6f480ba4bb68c8733dd.tar.gz |
Linux Device Drivers 3 examples
Diffstat (limited to 'misc-progs/gdbline')
-rw-r--r-- | misc-progs/gdbline | 19 |
1 files changed, 19 insertions, 0 deletions
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 |