[Lldb-commits] [PATCH] D48049: Add a new SBTarget::LoadCore() overload which surfaces errors if the load fails
Leonard Mosescu via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 13 10:40:03 PDT 2018
lemo added a comment.
The intention in the scope of this change is just to check that the new
overload is exposed correctly through the Python API.
In general, guaranteeing specific error codes (messages?) is likely
1. It's not always easy to do the proper checks (ex. for 'file-not-found'
you'd actually get a null process, nothing more - see SBTarget::LoadCore()).
2. It's unlikely that many clients need or want to check for specific
3. Such a strict contract would be very fragile (ex. adding more specific
error condition detection would likely break the contract)
Perhaps ironically, I could take advantage of very specific error codes for
my scenario, but I don't think it's feasible. So for LoadCore() I'd like to
aim for more of a middle ground: accurate success/fail status + an
informative error content that can be used for diagnostics (logging) and
maybe as a weak hint.
What do you think?
More information about the lldb-commits