File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,16 @@ def __lldb_init_module(debugger, internal_dict): # pyright: ignore
2727 wShowWindow = subprocess .SW_HIDE ) # type: ignore
2828 sysroot = subprocess .check_output (command , startupinfo = si , encoding = 'utf-8' ).strip ()
2929 etc = path .join (sysroot , 'lib/rustlib/etc' )
30- log .info ('Loading Rust formatters from {}' .format (etc ))
31- debugger .HandleCommand ("command script import '{}'" .format (path .join (etc , 'lldb_lookup.py' )))
32- debugger .HandleCommand ("command source -s true '{}'" .format (path .join (etc , 'lldb_commands' )))
30+
31+ codelldb .debugger_message ('Loading Rust formatters from {}' .format (etc ))
32+ lldb_lookup = path .join (etc , 'lldb_lookup.py' )
33+ lldb_commands = path .join (etc , 'lldb_commands' )
34+ if path .isfile (lldb_lookup ):
35+ debugger .HandleCommand ("command script import '{}'" .format (lldb_lookup ))
36+ debugger .HandleCommand ("command source -s true '{}'" .format (lldb_commands ))
37+ else :
38+ if '-msvc' in sysroot :
39+ codelldb .debugger_message (
40+ 'Could not find LLDB data formatters in your Rust toolchain. ' +
41+ 'Consider installing the x86_64-pc-windows-gnu target by running `rustup target add x86_64-pc-windows-gnu`.' ,
42+ category = 'stderr' )
You can’t perform that action at this time.
0 commit comments