[Lldb-commits] [PATCH] D70847: [lldb] Set executable module when adding modules to the Target

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 4 10:40:08 PST 2020


clayborg added a comment.

We can do this in lldb-vscode.cpp. When I first made the lldb-vscode plug-in I was sending the "initialized" notification back to the IDE too early. This resulted in breakpoint packets being sent _before_ "launch" or "attach" packets. A good change would be to default construct the g_vscode.target, and set the target in "launch" and "attach". Now that the "initialized" packet is being sent after the "launch" or "attach" packets, we can make the target in "launch" or "attach" handler functions with no issues.

This will also allow us to add "triple" and "platform" as new key/value pairs for "launch" and "attach" so they can be correctly set before the executable is set in the target. Why is this important? Because many ELF files don't have enough info in them to properly set the vendor and OS fields of a triple correctly. So often we need to manually specify the triple and platform (more than one platform can use ARM elf files: remote-linux, remote-android for example. And if we just create a target with an ELF file that doesn't have any ELF notes, we might set things up incorrectly. So I believe this would also fix your problem.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70847/new/

https://reviews.llvm.org/D70847





More information about the lldb-commits mailing list