def __init__(self,
gdb_path='gdb',
gdb_args=['--nx', '--quiet', '--interpreter=mi2'],
time_to_check_for_additional_output_sec=DEFAULT_TIME_TO_CHECK_FOR_ADDITIONAL_OUTPUT_SEC,
verbose=False):
self.verbose = verbose
self.abs_gdb_path = None # abs path to gdb executable
self.cmd = [] # the shell command to run gdb
self.time_to_check_for_additional_output_sec = time_to_check_for_additional_output_sec
self.gdb_process = None
self._allow_overwrite_timeout_times = self.time_to_check_for_additional_output_sec > 0
if not gdb_path:
raise ValueError('a valid path to gdb must be specified')
else:
abs_gdb_path = find_executable(gdb_path)
if abs_gdb_path is None:
raise ValueError('gdb executable could not be resolved from "%s"' % gdb_path)
else:
self.abs_gdb_path = abs_gdb_path
self.cmd = [self.abs_gdb_path] + gdb_args
self.spawn_new_gdb_subprocess()
评论列表
文章目录