[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:45:05 +0000 (12:45 +0200)
commitf70cad26121543c0a29b9a2c400b02c659210d71
tree1bb800c2ace0eead6f51ff9cdf7ca7bde75d321b
parenta61f62a7b605a9077672b4f49021d84ed0cf12d9
[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

Differential Revision: https://reviews.llvm.org/D82879

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