summaryrefslogtreecommitdiffstats
path: root/misc-progs/gdbline
diff options
context:
space:
mode:
Diffstat (limited to 'misc-progs/gdbline')
-rw-r--r--misc-progs/gdbline19
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