[debuginfo-tests][Dexter] Fix some Windows-unfriendly Dexter behaviours
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
diff --git a/debuginfo-tests/lit.cfg.py b/debuginfo-tests/lit.cfg.py
index 837c930..2d93b8d 100644
--- a/debuginfo-tests/lit.cfg.py
+++ b/debuginfo-tests/lit.cfg.py
@@ -104,7 +104,7 @@
'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,