These are some minor things that I've run into on Windows, largely in
error handling paths:
* Giving --lldb-executable on Windows triggers a "useless option" code
path, which touches an attribute that only exists in the
list_debuggers tool. Switch this to use hasattr, which will work in
all subtools.
* We were over-decoding some text reporting errors, but only in an
exception path
* The path to lldb on Windows needs to be quoted (even though dexter
isn't making use of it).
Differential Revision: https://reviews.llvm.org/D74546
def _warn_meaningless_option(context, option):
- if context.options.list_debuggers:
+ if hasattr(context.options, 'list_debuggers'):
return
warn(context,
if self.error:
script_error = (' : {}'.format(
- self.error.script_error.splitlines()[0].decode()) if getattr(
+ self.error.script_error.splitlines()[0]) if getattr(
self.error, 'script_error', None) else '')
error = ' [{}{}]'.format(
'dexter', 'dexter.py')
dexter_test_cmd = '"{}" "{}" test'.format(config.python3_executable, dexter_path)
if lldb_path is not None:
- dexter_test_cmd += ' --lldb-executable {}'.format(lldb_path)
+ dexter_test_cmd += ' --lldb-executable "{}"'.format(lldb_path)
tools.append(ToolSubst('%dexter', dexter_test_cmd))
# For testing other bits of dexter that aren't under the "test" subcommand,