Page MenuHomePhabricator

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

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

Details

Summary

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.

rdar://11013798

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

Diff Detail

Event Timeline

mib created this revision.Thu, Sep 10, 9:44 PM
mib requested review of this revision.Thu, Sep 10, 9:44 PM
mib edited the summary of this revision. (Show Details)Thu, Sep 10, 9:47 PM
DavidSpickett added inline comments.
lldb/test/API/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
77

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.

88

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

mib marked an inline comment as done.Fri, Sep 11, 7:09 AM
mib added inline comments.
lldb/test/API/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
77

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.Fri, Sep 11, 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.Fri, Sep 11, 11:02 AM
This revision was landed with ongoing or failed builds.Fri, Sep 11, 11:10 AM
This revision was automatically updated to reflect the committed changes.