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



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to