aboutsummaryrefslogtreecommitdiffstats
path: root/source/Target/ThreadPlanTracer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Target/ThreadPlanTracer.cpp')
-rw-r--r--source/Target/ThreadPlanTracer.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/source/Target/ThreadPlanTracer.cpp b/source/Target/ThreadPlanTracer.cpp
index 4e79b6b1e59d..5782fe8e6443 100644
--- a/source/Target/ThreadPlanTracer.cpp
+++ b/source/Target/ThreadPlanTracer.cpp
@@ -46,7 +46,7 @@ Stream *ThreadPlanTracer::GetLogStream() {
else {
TargetSP target_sp(m_thread.CalculateTarget());
if (target_sp)
- return target_sp->GetDebugger().GetOutputFile().get();
+ return &(target_sp->GetDebugger().GetOutputStream());
}
return nullptr;
}
@@ -93,15 +93,20 @@ Disassembler *ThreadPlanAssemblyTracer::GetDisassembler() {
TypeFromUser ThreadPlanAssemblyTracer::GetIntPointerType() {
if (!m_intptr_type.IsValid()) {
- TargetSP target_sp(m_thread.CalculateTarget());
- if (target_sp) {
- TypeSystem *type_system =
- target_sp->GetScratchTypeSystemForLanguage(nullptr, eLanguageTypeC);
- if (type_system)
- m_intptr_type =
- TypeFromUser(type_system->GetBuiltinTypeForEncodingAndBitSize(
+ if (auto target_sp = m_thread.CalculateTarget()) {
+ auto type_system_or_err =
+ target_sp->GetScratchTypeSystemForLanguage(eLanguageTypeC);
+ if (auto err = type_system_or_err.takeError()) {
+ LLDB_LOG_ERROR(
+ lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TYPES),
+ std::move(err),
+ "Unable to get integer pointer type from TypeSystem");
+ } else {
+ m_intptr_type = TypeFromUser(
+ type_system_or_err->GetBuiltinTypeForEncodingAndBitSize(
eEncodingUint,
target_sp->GetArchitecture().GetAddressByteSize() * 8));
+ }
}
}
return m_intptr_type;