[Lldb-commits] [PATCH] D82477: [lldb-vscode] Add Support for Module Event
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 25 01:56:59 PDT 2020
labath added inline comments.
================
Comment at: lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py:27-29
+ self.assertTrue('a.out' in self.vscode.get_active_modules(),
+ 'Module: a.out is loaded')
+ self.assertTrue('symbolFilePath' in self.vscode.get_active_modules()['a.out'],
----------------
replace `assertTrue(needle in haystack)` with `assertIn(needle, haystack)`
================
Comment at: lldb/tools/lldb-vscode/JSONUtils.cpp:336
+ object.try_emplace("name", std::string(module.GetFileSpec().GetFilename())); // Path in remote
+ std::string module_path = std::string(module.GetFileSpec().GetDirectory()) + "/" + std::string(module.GetFileSpec().GetFilename());
+ object.try_emplace("path", module_path);
----------------
You should use `SBFileSpec::GetPath` to get the file and dir components separated by the correct directory separator. (It's usage is somewhat clunky due to the SB API restrictions).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82477/new/
https://reviews.llvm.org/D82477
More information about the lldb-commits
mailing list