[lldb-dev] Getting the file and line location of a break point via lldb python api

Tom Weaver via lldb-dev lldb-dev at lists.llvm.org
Wed Apr 8 10:15:41 PDT 2020


I've been trying to get at the file path, line and column information of a
break point via the python API but have been struggling.

given the following method :

def do_thing_with_bp_in_file_on_line(file_path, line_no):
  ... do something with breakpoints on line_no in file at file_path

what would be the best way to find the break points that match the
file_path and line number so I can act on them?

I've tried iterating through them and checking the file path and line
number of one of a break points SBBreakpointLocation and drilling down the
file spec and line entry information to compare with the parameters, but
this seems long winded and has a bunch of assumptions baked into it.

Is there a more canonical way of doing this?

thanks in advance,
Tom W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20200408/f29955fb/attachment.html>


More information about the lldb-dev mailing list