This is an archive of the discontinued LLVM Phabricator instance.

[lldb-vscode] Emit the breakpoint changed event on location resolved
ClosedPublic

Authored by aadsm on Feb 14 2021, 6:44 PM.

Details

Summary

VSCode was not being informed whenever a location had been resolved (after being initated as non-resolved), so even though it was actually resolved, the IDE would show a hollow dot (instead of a red dot) because it didn't know about the change.

Diff Detail

Event Timeline

aadsm requested review of this revision.Feb 14 2021, 6:44 PM
aadsm created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2021, 6:44 PM
clayborg requested changes to this revision.Feb 17 2021, 3:16 PM

needs a test. Just make a test app with a shared library that gets dlopen'ed in the main function. At first the breakpoint in the shared library will be unresolved, then after stepping over the dlopen call, it should get resolved.

This revision now requires changes to proceed.Feb 17 2021, 3:16 PM
aadsm updated this revision to Diff 324864.Feb 18 2021, 8:25 PM

Add api test

aadsm updated this revision to Diff 324865.Feb 18 2021, 8:29 PM

revert last amend: added the test to the wrong diff

aadsm updated this revision to Diff 325117.Feb 19 2021, 4:51 PM

Add test

aadsm updated this revision to Diff 325118.Feb 19 2021, 4:52 PM

Removed unnecessary comment

clayborg accepted this revision.Feb 19 2021, 5:02 PM
This revision is now accepted and ready to land.Feb 19 2021, 5:02 PM
This revision was landed with ongoing or failed builds.Feb 21 2021, 9:46 AM
This revision was automatically updated to reflect the committed changes.

This new testcase broke buildbots as it is failing after a revert of D96637:
http://lab.llvm.org:8014/#/workers/29
http://lab.llvm.org:8011/#/workers/1
They are now failing on:
lldb-api :: tools/lldb-vscode/breakpoint-events/TestVSCode_breakpointLocationResolvedEvent.py
This testcase you newly checked-in after the patch being reverted.

commit b19d3b092d4ea019dfc52501bb96b0008d4e01d2 (HEAD)
Author: António Afonso <antonio.afonso@gmail.com>
Date:   Sun Feb 21 10:38:25 2021 -0800
    Revert "Make sure the interpreter module was loaded before making checks against it"
    This reverts commit a83a825e9902b54b315870e9ed85723525208f09.
commit 1f21d488bd79a06c9cf405cc5db985fcd71c4f70
Author: António Afonso <antonio.afonso@gmail.com>
Date:   Fri Feb 19 09:43:38 2021 -0800
    [lldb-vscode] Emit the breakpoint changed event on location resolved
    Differential Revision: https://reviews.llvm.org/D96680
commit a83a825e9902b54b315870e9ed85723525208f09
Author: António Afonso <antonio.afonso@gmail.com>
Date:   Thu Feb 18 20:31:55 2021 -0800
    Make sure the interpreter module was loaded before making checks against it
    Differential Revision: https://reviews.llvm.org/D96637