[Lldb-commits] [PATCH] D125148: Add an example command that runs to one of a set of breakpoints
Dave Lee via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri May 6 18:59:15 PDT 2022
kastiglione added inline comments.
================
Comment at: lldb/examples/python/cont_to_bkpt.py:21
+
+ if len(bkpt_ids) == 0:
+ result.SetError("No breakpoint to run to")
----------------
can also be `if not bkpt_ids:`
================
Comment at: lldb/examples/python/cont_to_bkpt.py:31-32
+ if not exe_ctx.process.IsValid():
+ result.SetError("Need a valid process")
+ result.SetStatus(lldb.eReturnStatusFailed)
+ return
----------------
these `SetStatus` lines aren't necessary since `SetError(…)` internally calls `SetStatus(eReturnStatusFailed)`.
================
Comment at: lldb/examples/python/cont_to_bkpt.py:39
+ bkpt_id = bkpt.GetID()
+ if not bkpt_id in bkpt_ids:
+ if bkpt.enabled:
----------------
can also be `if bkpt_id not in bkpt_ids:`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125148/new/
https://reviews.llvm.org/D125148
More information about the lldb-commits
mailing list