diff options
-rw-r--r-- | tools/debugscripts/kgdb | 4 | ||||
-rw-r--r-- | tools/debugscripts/kld_deb.py | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tools/debugscripts/kgdb b/tools/debugscripts/kgdb index 2293c5b..ae580b3 100644 --- a/tools/debugscripts/kgdb +++ b/tools/debugscripts/kgdb @@ -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" diff --git a/tools/debugscripts/kld_deb.py b/tools/debugscripts/kld_deb.py index 3d8e01d..0ea12ab 100644 --- a/tools/debugscripts/kld_deb.py +++ b/tools/debugscripts/kld_deb.py @@ -31,7 +31,7 @@ import os 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 @@ if i == -1: 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) |