Reputation: 101
I am attempting to write a python command extension for lldb which can export the current set of breakpoints to a plist file, and restore the exported breakpoints from the file complete with conditions and commands (presumably in a new session.)
I looked over the lldb python API and searched the web (and stack overflow) but have not found answers to the following issues:
Upvotes: 1
Views: 324
Reputation: 27110
There isn't a good way to do #1. It does seem gross to have to parse the output of break list...
You can sort of do #2 by making a python method callback with a bunch of "HandleCommand" lines in it.
It wouldn't be hard to add SB API methods that do either of these tasks. We already have SBStringList as a convenient container for the command text either coming in or going out. If you want to try your hand at lldb hacking, a patch to this effect would be warmly accepted.
Otherwise, file a bug with the lldb.llvm.org bugzilla, and somebody will get around to it when they have a free moment.
Upvotes: 1