aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-03 14:10:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-03 14:10:23 +0000
commit145449b1e420787bb99721a429341fa6be3adfb6 (patch)
tree1d56ae694a6de602e348dd80165cf881a36600ed /lldb/source/API/SBTarget.cpp
parentecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (diff)
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp19
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());