[Lldb-commits] [PATCH] D76968: [lldb-vscode] Correctly return source mapped breakpoints for setBreakpoints request

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 30 21:18:18 PDT 2020


wallace marked an inline comment as done.
wallace added inline comments.


================
Comment at: lldb/tools/lldb-vscode/JSONUtils.cpp:332
+
+  object.try_emplace("line", line);
+
----------------
clayborg wrote:
> This should do what it was doing before: grab the source line only from the address. Why? If you set a breakpoint on a line that has no code like:
> 
> ```
> 1 int main(int argc, ...)
> 2 {                              /// <-- set bp here
> 3   int foo = arg * 10; /// <-- bp will end up here
> ```
> 
> So we should still be looking up the line number from the Address of the first resolved location so that the source line does get adjusted in the IDE.
TIL


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76968





More information about the lldb-commits mailing list