diff options
Diffstat (limited to 'tools/debugscripts/kld_deb.py')
-rw-r--r-- | tools/debugscripts/kld_deb.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/debugscripts/kld_deb.py b/tools/debugscripts/kld_deb.py index 5cf0167..167b3dc 100644 --- a/tools/debugscripts/kld_deb.py +++ b/tools/debugscripts/kld_deb.py @@ -26,6 +26,7 @@ # # $FreeBSD$ +from __future__ import print_function import sys import os import popen2 @@ -42,7 +43,7 @@ printre = re.compile(r'\$\d+\s+=\s+') kld_debug_paths = [] if len(sys.argv[1:]) < 2: - print 'Usage: prog <kerncomp> <core> [<paths>]' + print('Usage: prog <kerncomp> <core> [<paths>]') sys.exit(1) #Get the base modules path @@ -129,7 +130,7 @@ for i in addr[1:]: #Tell our user that we couldn't find it. a = i[1] sys.stderr.write("Can't find module: %s (addr: %d + header)\n" % (i[0], a)) - print '#add-symbol-file <file>', a, '#add header' + print('#add-symbol-file <file>', a, '#add header') continue #j = popen2.popen4('objdump --section-headers /boot/kernel/%s | grep "\.text"' % i[0])[0].read().strip().split() @@ -137,6 +138,6 @@ for i in addr[1:]: j = popen2.popen4('objdump --section-headers "%s" | grep "\.text"' % p)[0].read().strip().split() try: a = int(j[5], 16) - print 'add-symbol-file', p, i[1] + a + print('add-symbol-file', p, i[1] + a) except IndexError: sys.stderr.write('Bad file: %s, address: %d\n' % (i[0], i[1])) |