Page MenuHomePhabricator

[lldb/API] Add Breakpoint::SerializeToStructuredData to SBAPI

Authored by mib on Sep 10 2020, 9:44 PM.



This patch adds a way to fetch breakpoint metadatas as a serialized
Structured Data format (JSON). This can be used by IDEs to update
their UI when a breakpoint is set or modified from the console.


Signed-off-by: Med Ismail Bennani <>

Diff Detail

Event Timeline

mib created this revision.Sep 10 2020, 9:44 PM
mib requested review of this revision.Sep 10 2020, 9:44 PM
mib edited the summary of this revision. (Show Details)Sep 10 2020, 9:47 PM
DavidSpickett added inline comments.

How many other fields does a breakpoint contain? Might be worth adding one test showing the full result.

Unless Breakpoint::SerializeToStructuredData already has test coverage, just want to check that new fields don't get missed from this output.


Can you also check what happens if you serialize an invalid breakpoint?

mib marked an inline comment as done.Sep 11 2020, 7:09 AM
mib added inline comments.

This feature exists since 2016 and has been used to export breakpoints to a file using the breakpoint write command. If you look at the rest of the test file, the API is pretty well tested.

mib updated this revision to Diff 291209.Sep 11 2020, 7:10 AM

Add invalid breakpoint test case.

This LGTM but I don't know the API standards very well. Some else should give a final review.

The reproducer instrumentation part LGTM.

This revision is now accepted and ready to land.Sep 11 2020, 11:02 AM
This revision was landed with ongoing or failed builds.Sep 11 2020, 11:10 AM
This revision was automatically updated to reflect the committed changes.