1 """ debug utilities """
7 gdb_path = '/usr/bin/gdb'
10 def spawn_gdb(binary_path, core_path):
11 if os.path.isfile(gdb_path) and os.access(gdb_path, os.X_OK):
12 # automatically attach gdb
13 gdb_cmdline = "%s %s %s" % (gdb_path, binary_path, core_path)
14 gdb = pexpect.spawn(gdb_cmdline)
21 raise Exception("GDB refused to die...")
23 sys.stderr.write("Debugger '%s' does not exist or is not "
24 "an executable..\n" % gdb_path)