summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBFrame.cpp')
-rw-r--r--lldb/source/API/SBFrame.cpp356
1 files changed, 6 insertions, 350 deletions
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index 5ab2af37cf1..24bea7a4967 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -38,7 +38,6 @@
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Log.h"
#include "lldb/Utility/Stream.h"
#include "lldb/API/SBAddress.h"
@@ -63,16 +62,6 @@ SBFrame::SBFrame(const StackFrameSP &lldb_object_sp)
: m_opaque_sp(new ExecutionContextRef(lldb_object_sp)) {
LLDB_RECORD_CONSTRUCTOR(SBFrame, (const lldb::StackFrameSP &),
lldb_object_sp);
-
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
- if (log) {
- SBStream sstr;
- GetDescription(sstr);
- log->Printf("SBFrame::SBFrame (sp=%p) => SBFrame(%p): %s",
- static_cast<void *>(lldb_object_sp.get()),
- static_cast<void *>(lldb_object_sp.get()), sstr.GetData());
- }
}
SBFrame::SBFrame(const SBFrame &rhs) : m_opaque_sp() {
@@ -122,7 +111,6 @@ SBSymbolContext SBFrame::GetSymbolContext(uint32_t resolve_scope) const {
LLDB_RECORD_METHOD_CONST(lldb::SBSymbolContext, SBFrame, GetSymbolContext,
(uint32_t), resolve_scope);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBSymbolContext sb_sym_ctx;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -134,33 +122,17 @@ SBSymbolContext SBFrame::GetSymbolContext(uint32_t resolve_scope) const {
Process::StopLocker stop_locker;
if (stop_locker.TryLock(&process->GetRunLock())) {
frame = exe_ctx.GetFramePtr();
- if (frame) {
+ if (frame)
sb_sym_ctx.SetSymbolContext(&frame->GetSymbolContext(scope));
- } else {
- if (log)
- log->Printf("SBFrame::GetVariables () => error: could not "
- "reconstruct frame object for this SBFrame.");
- }
- } else {
- if (log)
- log->Printf(
- "SBFrame::GetSymbolContext () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetSymbolContext (resolve_scope=0x%8.8x) => "
- "SBSymbolContext(%p)",
- static_cast<void *>(frame), resolve_scope,
- static_cast<void *>(sb_sym_ctx.get()));
-
return LLDB_RECORD_RESULT(sb_sym_ctx);
}
SBModule SBFrame::GetModule() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBModule, SBFrame, GetModule);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBModule sb_module;
ModuleSP module_sp;
std::unique_lock<std::recursive_mutex> lock;
@@ -176,22 +148,10 @@ SBModule SBFrame::GetModule() const {
if (frame) {
module_sp = frame->GetSymbolContext(eSymbolContextModule).module_sp;
sb_module.SetSP(module_sp);
- } else {
- if (log)
- log->Printf("SBFrame::GetModule () => error: could not reconstruct "
- "frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetModule () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetModule () => SBModule(%p)",
- static_cast<void *>(frame),
- static_cast<void *>(module_sp.get()));
-
return LLDB_RECORD_RESULT(sb_module);
}
@@ -199,7 +159,6 @@ SBCompileUnit SBFrame::GetCompileUnit() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBCompileUnit, SBFrame,
GetCompileUnit);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBCompileUnit sb_comp_unit;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -214,20 +173,9 @@ SBCompileUnit SBFrame::GetCompileUnit() const {
if (frame) {
sb_comp_unit.reset(
frame->GetSymbolContext(eSymbolContextCompUnit).comp_unit);
- } else {
- if (log)
- log->Printf("SBFrame::GetCompileUnit () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetCompileUnit () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetCompileUnit () => SBCompileUnit(%p)",
- static_cast<void *>(frame),
- static_cast<void *>(sb_comp_unit.get()));
return LLDB_RECORD_RESULT(sb_comp_unit);
}
@@ -235,7 +183,6 @@ SBCompileUnit SBFrame::GetCompileUnit() const {
SBFunction SBFrame::GetFunction() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFunction, SBFrame, GetFunction);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBFunction sb_function;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -250,20 +197,9 @@ SBFunction SBFrame::GetFunction() const {
if (frame) {
sb_function.reset(
frame->GetSymbolContext(eSymbolContextFunction).function);
- } else {
- if (log)
- log->Printf("SBFrame::GetFunction () => error: could not reconstruct "
- "frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetFunction () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetFunction () => SBFunction(%p)",
- static_cast<void *>(frame),
- static_cast<void *>(sb_function.get()));
return LLDB_RECORD_RESULT(sb_function);
}
@@ -271,7 +207,6 @@ SBFunction SBFrame::GetFunction() const {
SBSymbol SBFrame::GetSymbol() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBSymbol, SBFrame, GetSymbol);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBSymbol sb_symbol;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -285,27 +220,16 @@ SBSymbol SBFrame::GetSymbol() const {
frame = exe_ctx.GetFramePtr();
if (frame) {
sb_symbol.reset(frame->GetSymbolContext(eSymbolContextSymbol).symbol);
- } else {
- if (log)
- log->Printf("SBFrame::GetSymbol () => error: could not reconstruct "
- "frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetSymbol () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetSymbol () => SBSymbol(%p)",
- static_cast<void *>(frame),
- static_cast<void *>(sb_symbol.get()));
+
return LLDB_RECORD_RESULT(sb_symbol);
}
SBBlock SBFrame::GetBlock() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBlock, SBFrame, GetBlock);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBBlock sb_block;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -317,23 +241,10 @@ SBBlock SBFrame::GetBlock() const {
Process::StopLocker stop_locker;
if (stop_locker.TryLock(&process->GetRunLock())) {
frame = exe_ctx.GetFramePtr();
- if (frame) {
+ if (frame)
sb_block.SetPtr(frame->GetSymbolContext(eSymbolContextBlock).block);
- } else {
- if (log)
- log->Printf("SBFrame::GetBlock () => error: could not reconstruct "
- "frame object for this SBFrame.");
- }
- } else {
- if (log)
- log->Printf("SBFrame(%p)::GetBlock () => error: process is running",
- static_cast<void *>(frame));
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetBlock () => SBBlock(%p)",
- static_cast<void *>(frame),
- static_cast<void *>(sb_block.GetPtr()));
return LLDB_RECORD_RESULT(sb_block);
}
@@ -346,35 +257,21 @@ SBBlock SBFrame::GetFrameBlock() const {
StackFrame *frame = nullptr;
Target *target = exe_ctx.GetTargetPtr();
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
Process *process = exe_ctx.GetProcessPtr();
if (target && process) {
Process::StopLocker stop_locker;
if (stop_locker.TryLock(&process->GetRunLock())) {
frame = exe_ctx.GetFramePtr();
- if (frame) {
+ if (frame)
sb_block.SetPtr(frame->GetFrameBlock());
- } else {
- if (log)
- log->Printf("SBFrame::GetFrameBlock () => error: could not "
- "reconstruct frame object for this SBFrame.");
- }
- } else {
- if (log)
- log->Printf("SBFrame::GetFrameBlock () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetFrameBlock () => SBBlock(%p)",
- static_cast<void *>(frame),
- static_cast<void *>(sb_block.GetPtr()));
return LLDB_RECORD_RESULT(sb_block);
}
SBLineEntry SBFrame::GetLineEntry() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBLineEntry, SBFrame, GetLineEntry);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBLineEntry sb_line_entry;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -389,20 +286,9 @@ SBLineEntry SBFrame::GetLineEntry() const {
if (frame) {
sb_line_entry.SetLineEntry(
frame->GetSymbolContext(eSymbolContextLineEntry).line_entry);
- } else {
- if (log)
- log->Printf("SBFrame::GetLineEntry () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetLineEntry () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetLineEntry () => SBLineEntry(%p)",
- static_cast<void *>(frame),
- static_cast<void *>(sb_line_entry.get()));
return LLDB_RECORD_RESULT(sb_line_entry);
}
@@ -418,10 +304,6 @@ uint32_t SBFrame::GetFrameID() const {
if (frame)
frame_idx = frame->GetFrameIndex();
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- if (log)
- log->Printf("SBFrame(%p)::GetFrameID () => %u", static_cast<void *>(frame),
- frame_idx);
return frame_idx;
}
@@ -440,7 +322,6 @@ lldb::addr_t SBFrame::GetCFA() const {
addr_t SBFrame::GetPC() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetPC);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
addr_t addr = LLDB_INVALID_ADDRESS;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -455,28 +336,16 @@ addr_t SBFrame::GetPC() const {
if (frame) {
addr = frame->GetFrameCodeAddress().GetOpcodeLoadAddress(
target, AddressClass::eCode);
- } else {
- if (log)
- log->Printf("SBFrame::GetPC () => error: could not reconstruct frame "
- "object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetPC () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetPC () => 0x%" PRIx64,
- static_cast<void *>(frame), addr);
-
return addr;
}
bool SBFrame::SetPC(addr_t new_pc) {
LLDB_RECORD_METHOD(bool, SBFrame, SetPC, (lldb::addr_t), new_pc);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
bool ret_val = false;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -490,28 +359,16 @@ bool SBFrame::SetPC(addr_t new_pc) {
frame = exe_ctx.GetFramePtr();
if (frame) {
ret_val = frame->GetRegisterContext()->SetPC(new_pc);
- } else {
- if (log)
- log->Printf("SBFrame::SetPC () => error: could not reconstruct frame "
- "object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::SetPC () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::SetPC (new_pc=0x%" PRIx64 ") => %i",
- static_cast<void *>(frame), new_pc, ret_val);
-
return ret_val;
}
addr_t SBFrame::GetSP() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetSP);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
addr_t addr = LLDB_INVALID_ADDRESS;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -525,19 +382,9 @@ addr_t SBFrame::GetSP() const {
frame = exe_ctx.GetFramePtr();
if (frame) {
addr = frame->GetRegisterContext()->GetSP();
- } else {
- if (log)
- log->Printf("SBFrame::GetSP () => error: could not reconstruct frame "
- "object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetSP () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetSP () => 0x%" PRIx64,
- static_cast<void *>(frame), addr);
return addr;
}
@@ -545,7 +392,6 @@ addr_t SBFrame::GetSP() const {
addr_t SBFrame::GetFP() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetFP);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
addr_t addr = LLDB_INVALID_ADDRESS;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -557,29 +403,17 @@ addr_t SBFrame::GetFP() const {
Process::StopLocker stop_locker;
if (stop_locker.TryLock(&process->GetRunLock())) {
frame = exe_ctx.GetFramePtr();
- if (frame) {
+ if (frame)
addr = frame->GetRegisterContext()->GetFP();
- } else {
- if (log)
- log->Printf("SBFrame::GetFP () => error: could not reconstruct frame "
- "object for this SBFrame.");
- }
- } else {
- if (log)
- log->Printf("SBFrame::GetFP () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetFP () => 0x%" PRIx64,
- static_cast<void *>(frame), addr);
return addr;
}
SBAddress SBFrame::GetPCAddress() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBAddress, SBFrame, GetPCAddress);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBAddress sb_addr;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -591,21 +425,10 @@ SBAddress SBFrame::GetPCAddress() const {
Process::StopLocker stop_locker;
if (stop_locker.TryLock(&process->GetRunLock())) {
frame = exe_ctx.GetFramePtr();
- if (frame) {
+ if (frame)
sb_addr.SetAddress(&frame->GetFrameCodeAddress());
- } else {
- if (log)
- log->Printf("SBFrame::GetPCAddress () => error: could not "
- "reconstruct frame object for this SBFrame.");
- }
- } else {
- if (log)
- log->Printf("SBFrame::GetPCAddress () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetPCAddress () => SBAddress(%p)",
- static_cast<void *>(frame), static_cast<void *>(sb_addr.get()));
return LLDB_RECORD_RESULT(sb_addr);
}
@@ -640,11 +463,7 @@ lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path,
use_dynamic);
SBValue sb_value;
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
if (var_path == nullptr || var_path[0] == '\0') {
- if (log)
- log->Printf(
- "SBFrame::GetValueForVariablePath called with empty variable path.");
return LLDB_RECORD_RESULT(sb_value);
}
@@ -667,15 +486,7 @@ lldb::SBValue SBFrame::GetValueForVariablePath(const char *var_path,
StackFrame::eExpressionPathOptionsAllowDirectIVarAccess,
var_sp, error));
sb_value.SetSP(value_sp, use_dynamic);
- } else {
- if (log)
- log->Printf("SBFrame::GetValueForVariablePath () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf(
- "SBFrame::GetValueForVariablePath () => error: process is running");
}
}
return LLDB_RECORD_RESULT(sb_value);
@@ -704,13 +515,10 @@ SBValue SBFrame::FindVariable(const char *name,
LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, FindVariable,
(const char *, lldb::DynamicValueType), name, use_dynamic);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
VariableSP var_sp;
SBValue sb_value;
if (name == nullptr || name[0] == '\0') {
- if (log)
- log->Printf("SBFrame::FindVariable called with empty name");
return LLDB_RECORD_RESULT(sb_value);
}
@@ -730,22 +538,10 @@ SBValue SBFrame::FindVariable(const char *name,
if (value_sp)
sb_value.SetSP(value_sp, use_dynamic);
- } else {
- if (log)
- log->Printf("SBFrame::FindVariable () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::FindVariable () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::FindVariable (name=\"%s\") => SBValue(%p)",
- static_cast<void *>(frame), name,
- static_cast<void *>(value_sp.get()));
-
return LLDB_RECORD_RESULT(sb_value);
}
@@ -773,12 +569,9 @@ SBValue SBFrame::FindValue(const char *name, ValueType value_type,
(const char *, lldb::ValueType, lldb::DynamicValueType),
name, value_type, use_dynamic);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBValue sb_value;
if (name == nullptr || name[0] == '\0') {
- if (log)
- log->Printf("SBFrame::FindValue called with empty name.");
return LLDB_RECORD_RESULT(sb_value);
}
@@ -886,23 +679,10 @@ SBValue SBFrame::FindValue(const char *name, ValueType value_type,
default:
break;
}
- } else {
- if (log)
- log->Printf("SBFrame::FindValue () => error: could not reconstruct "
- "frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::FindValue () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::FindVariableInScope (name=\"%s\", value_type=%i) "
- "=> SBValue(%p)",
- static_cast<void *>(frame), name, value_type,
- static_cast<void *>(value_sp.get()));
-
return LLDB_RECORD_RESULT(sb_value);
}
@@ -932,29 +712,18 @@ bool SBFrame::operator!=(const SBFrame &rhs) const {
SBThread SBFrame::GetThread() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBThread, SBFrame, GetThread);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
ThreadSP thread_sp(exe_ctx.GetThreadSP());
SBThread sb_thread(thread_sp);
- if (log) {
- SBStream sstr;
- sb_thread.GetDescription(sstr);
- log->Printf("SBFrame(%p)::GetThread () => SBThread(%p): %s",
- static_cast<void *>(exe_ctx.GetFramePtr()),
- static_cast<void *>(thread_sp.get()), sstr.GetData());
- }
-
return LLDB_RECORD_RESULT(sb_thread);
}
const char *SBFrame::Disassemble() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFrame, Disassemble);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
const char *disassembly = nullptr;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -968,21 +737,10 @@ const char *SBFrame::Disassemble() const {
frame = exe_ctx.GetFramePtr();
if (frame) {
disassembly = frame->Disassemble();
- } else {
- if (log)
- log->Printf("SBFrame::Disassemble () => error: could not reconstruct "
- "frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::Disassemble () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::Disassemble () => %s", static_cast<void *>(frame),
- disassembly);
-
return disassembly;
}
@@ -1044,8 +802,6 @@ SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) {
LLDB_RECORD_METHOD(lldb::SBValueList, SBFrame, GetVariables,
(const lldb::SBVariablesOptions &), options);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBValueList value_list;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1063,12 +819,6 @@ SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) {
options.GetIncludeRuntimeSupportValues();
const lldb::DynamicValueType use_dynamic = options.GetUseDynamic();
- if (log)
- log->Printf(
- "SBFrame::GetVariables (arguments=%i, recognized_arguments=%i, "
- "locals=%i, statics=%i, in_scope_only=%i runtime=%i dynamic=%i)",
- arguments, recognized_arguments, locals, statics, in_scope_only,
- include_runtime_support_values, use_dynamic);
std::set<VariableSP> variable_set;
Process *process = exe_ctx.GetProcessPtr();
@@ -1144,30 +894,16 @@ SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) {
}
}
}
- } else {
- if (log)
- log->Printf("SBFrame::GetVariables () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetVariables () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetVariables (...) => SBValueList(%p)",
- static_cast<void *>(frame),
- static_cast<void *>(value_list.opaque_ptr()));
-
return LLDB_RECORD_RESULT(value_list);
}
SBValueList SBFrame::GetRegisters() {
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBValueList, SBFrame, GetRegisters);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBValueList value_list;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1188,22 +924,10 @@ SBValueList SBFrame::GetRegisters() {
ValueObjectRegisterSet::Create(frame, reg_ctx, set_idx));
}
}
- } else {
- if (log)
- log->Printf("SBFrame::GetRegisters () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetRegisters () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::GetRegisters () => SBValueList(%p)",
- static_cast<void *>(frame),
- static_cast<void *>(value_list.opaque_ptr()));
-
return LLDB_RECORD_RESULT(value_list);
}
@@ -1211,8 +935,6 @@ SBValue SBFrame::FindRegister(const char *name) {
LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, FindRegister, (const char *),
name);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBValue result;
ValueObjectSP value_sp;
std::unique_lock<std::recursive_mutex> lock;
@@ -1242,22 +964,10 @@ SBValue SBFrame::FindRegister(const char *name) {
}
}
}
- } else {
- if (log)
- log->Printf("SBFrame::FindRegister () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::FindRegister () => error: process is running");
}
}
- if (log)
- log->Printf("SBFrame(%p)::FindRegister () => SBValue(%p)",
- static_cast<void *>(frame),
- static_cast<void *>(value_sp.get()));
-
return LLDB_RECORD_RESULT(result);
}
@@ -1265,7 +975,6 @@ bool SBFrame::GetDescription(SBStream &description) {
LLDB_RECORD_METHOD(bool, SBFrame, GetDescription, (lldb::SBStream &),
description);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
Stream &strm = description.ref();
std::unique_lock<std::recursive_mutex> lock;
@@ -1280,14 +989,7 @@ bool SBFrame::GetDescription(SBStream &description) {
frame = exe_ctx.GetFramePtr();
if (frame) {
frame->DumpUsingSettingsFormat(&strm);
- } else {
- if (log)
- log->Printf("SBFrame::GetDescription () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetDescription () => error: process is running");
}
} else
@@ -1374,8 +1076,6 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
(const char *, const lldb::SBExpressionOptions &), expr,
options);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
#ifndef LLDB_DISABLE_PYTHON
Log *expr_log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
#endif
@@ -1384,9 +1084,6 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
SBValue expr_result;
if (expr == nullptr || expr[0] == '\0') {
- if (log)
- log->Printf(
- "SBFrame::EvaluateExpression called with an empty expression");
return LLDB_RECORD_RESULT(expr_result);
}
@@ -1395,8 +1092,6 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
- if (log)
- log->Printf("SBFrame()::EvaluateExpression (expr=\"%s\")...", expr);
StackFrame *frame = nullptr;
Target *target = exe_ctx.GetTargetPtr();
@@ -1421,15 +1116,7 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
exe_results = target->EvaluateExpression(expr, frame, expr_value_sp,
options.ref());
expr_result.SetSP(expr_value_sp, options.GetFetchDynamicValue());
- } else {
- if (log)
- log->Printf("SBFrame::EvaluateExpression () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf(
- "SBFrame::EvaluateExpression () => error: process is running");
}
}
@@ -1438,12 +1125,6 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
expr_log->Printf("** [SBFrame::EvaluateExpression] Expression result is "
"%s, summary %s **",
expr_result.GetValue(), expr_result.GetSummary());
-
- if (log)
- log->Printf("SBFrame(%p)::EvaluateExpression (expr=\"%s\") => SBValue(%p) "
- "(execution result=%d)",
- static_cast<void *>(frame), expr,
- static_cast<void *>(expr_value_sp.get()), exe_results);
#endif
return LLDB_RECORD_RESULT(expr_result);
@@ -1458,7 +1139,6 @@ bool SBFrame::IsInlined() {
bool SBFrame::IsInlined() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, IsInlined);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1474,14 +1154,7 @@ bool SBFrame::IsInlined() const {
Block *block = frame->GetSymbolContext(eSymbolContextBlock).block;
if (block)
return block->GetContainingInlinedBlock() != nullptr;
- } else {
- if (log)
- log->Printf("SBFrame::IsInlined () => error: could not reconstruct "
- "frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::IsInlined () => error: process is running");
}
}
return false;
@@ -1536,7 +1209,6 @@ lldb::LanguageType SBFrame::GuessLanguage() const {
const char *SBFrame::GetFunctionName() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFrame, GetFunctionName);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
const char *name = nullptr;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1571,14 +1243,7 @@ const char *SBFrame::GetFunctionName() const {
if (sc.symbol)
name = sc.symbol->GetName().GetCString();
}
- } else {
- if (log)
- log->Printf("SBFrame::GetFunctionName () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf("SBFrame::GetFunctionName() => error: process is running");
}
}
return name;
@@ -1587,7 +1252,6 @@ const char *SBFrame::GetFunctionName() const {
const char *SBFrame::GetDisplayFunctionName() {
LLDB_RECORD_METHOD_NO_ARGS(const char *, SBFrame, GetDisplayFunctionName);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
const char *name = nullptr;
std::unique_lock<std::recursive_mutex> lock;
@@ -1623,15 +1287,7 @@ const char *SBFrame::GetDisplayFunctionName() {
if (sc.symbol)
name = sc.symbol->GetDisplayName().GetCString();
}
- } else {
- if (log)
- log->Printf("SBFrame::GetDisplayFunctionName () => error: could not "
- "reconstruct frame object for this SBFrame.");
}
- } else {
- if (log)
- log->Printf(
- "SBFrame::GetDisplayFunctionName() => error: process is running");
}
}
return name;
OpenPOWER on IntegriCloud