[lldb/api] Improve error reporting in SBBreakpoint::AddName (NFCI)
authorMed Ismail Bennani <medismail.bennani@gmail.com>
Tue, 30 Jun 2020 14:37:48 +0000 (16:37 +0200)
committerMed Ismail Bennani <medismail.bennani@gmail.com>
Wed, 1 Jul 2020 10:37:00 +0000 (12:37 +0200)
commit56bb1d1755ae38b4e7a67f775978b18a601f215f
tree3489f6b4ad6bda25318044d3207f743db46b8ce0
parent070acb1d1e51ffd289a46b8f93e993635d0053b7
[lldb/api] Improve error reporting in SBBreakpoint::AddName (NFCI)

This patch improves the error reporting for SBBreakpoint::AddName by
adding a new method `SBBreakpoint::AddNameWithErrorHandling` that returns
a SBError instead of a boolean.

This way, if the breakpoint naming failed in the backend, the client
(i.e. Xcode), will be able to report the reason of that failure to the
user.

rdar://64765461

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
lldb/bindings/interface/SBBreakpoint.i
lldb/include/lldb/API/SBBreakpoint.h
lldb/source/API/SBBreakpoint.cpp
lldb/test/API/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py