summaryrefslogtreecommitdiffstats
path: root/misc-progs/gdbline
blob: d66572e7cf07fdd3bcf750d3040fe272605b7a50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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