I forgot to commit this fix that is now kgdb aware...

This commit is contained in:
jmg 2005-03-20 02:08:21 +00:00
parent 2283a8840c
commit d4af181c4d
2 changed files with 5 additions and 4 deletions

View File

@ -61,5 +61,7 @@ tmpfile="/tmp/kgdb.asf.$$"
echo "Kernel Source: $kernsrc"
echo "Getting KLD information and locations..."
python $kld_debpy "$kernsrc" "$core" $@ > "$tmpfile" &&
gdb $cmd_file -x "$tmpfile" -k -cd "$kernsrc" -s "$kernsrc/kernel.debug" -e "$kernsrc/kernel" -c "$core"
echo "Please run the following command to load module symbols:"
echo "source $tmpfile"
(cd "$kernsrc"; kgdb "$kernsrc/kernel.debug" "$core")
rm "$tmpfile"

View File

@ -31,7 +31,7 @@
import popen2
import re
gdb_cmd = 'gdb -q -k -s %(p)s/kernel.debug -e %(p)s/kernel'
gdb_cmd = 'kgdb %(p)s/kernel.debug %(core)s | tee /tmp/gdb.log'
#GDB regex
filenamere = re.compile(r'filename\s+=\s+0x[0-9a-f]+\s("(?P<fn>[^"]+)"|(?P<error><[^>]*>))', re.M)
addressre = re.compile(r'address\s+=\s+(?P<ad>0x[0-9a-f]+)', re.M)
@ -61,8 +61,7 @@
kld_debug_paths.append('/'.join(pfs[:i] + ['modules']))
kld_debug_paths.append(sys.argv[1])
#kld_debug_paths.append(sys.argv[3:])
gdb_cmd = gdb_cmd % {'p': sys.argv[1] }
gdb_cmd += ' -c %s | tee /tmp/gdb.log' % sys.argv[2]
gdb_cmd = gdb_cmd % {'p': sys.argv[1], 'core': sys.argv[2] }
#Start gdb
gdb = popen2.popen4(gdb_cmd)