diff options
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
| -rw-r--r-- | lldb/source/API/SBTarget.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index 75534b2343d4..bf64bb342aaf 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -8,7 +8,7 @@ #include "lldb/API/SBTarget.h" #include "lldb/Utility/Instrumentation.h" - +#include "lldb/Utility/LLDBLog.h" #include "lldb/lldb-public.h" #include "lldb/API/SBBreakpoint.h" @@ -1116,8 +1116,7 @@ bool SBTarget::FindBreakpointsByName(const char *name, llvm::Expected<std::vector<BreakpointSP>> expected_vector = target_sp->GetBreakpointList().FindBreakpointsByName(name); if (!expected_vector) { - LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS), - "invalid breakpoint name: {}", + LLDB_LOG(GetLog(LLDBLog::Breakpoints), "invalid breakpoint name: {}", llvm::toString(expected_vector.takeError())); return false; } @@ -1589,6 +1588,18 @@ const char *SBTarget::GetTriple() { return nullptr; } +const char *SBTarget::GetABIName() { + LLDB_INSTRUMENT_VA(this); + + TargetSP target_sp(GetSP()); + if (target_sp) { + std::string abi_name(target_sp->GetABIName().str()); + ConstString const_name(abi_name.c_str()); + return const_name.GetCString(); + } + return nullptr; +} + uint32_t SBTarget::GetDataByteSize() { LLDB_INSTRUMENT_VA(this); @@ -2195,7 +2206,7 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr, const SBExpressionOptions &options) { LLDB_INSTRUMENT_VA(this, expr, options); - Log *expr_log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); + Log *expr_log = GetLog(LLDBLog::Expressions); SBValue expr_result; ValueObjectSP expr_value_sp; TargetSP target_sp(GetSP()); |
