summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp313
1 files changed, 1 insertions, 312 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 7719764631f..9fcd2e51c56 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -61,7 +61,6 @@
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/Args.h"
#include "lldb/Utility/FileSpec.h"
-#include "lldb/Utility/Log.h"
#include "lldb/Utility/ProcessInfo.h"
#include "lldb/Utility/RegularExpression.h"
@@ -186,12 +185,6 @@ SBProcess SBTarget::GetProcess() {
sb_process.SetSP(process_sp);
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- if (log)
- log->Printf("SBTarget(%p)::GetProcess () => SBProcess(%p)",
- static_cast<void *>(target_sp.get()),
- static_cast<void *>(process_sp.get()));
-
return LLDB_RECORD_RESULT(sb_process);
}
@@ -332,23 +325,10 @@ SBProcess SBTarget::Launch(SBListener &listener, char const **argv,
listener, argv, envp, stdin_path, stdout_path, stderr_path,
working_directory, launch_flags, stop_at_entry, error);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBProcess sb_process;
ProcessSP process_sp;
TargetSP target_sp(GetSP());
- if (log)
- log->Printf("SBTarget(%p)::Launch (argv=%p, envp=%p, stdin=%s, stdout=%s, "
- "stderr=%s, working-dir=%s, launch_flags=0x%x, "
- "stop_at_entry=%i, &error (%p))...",
- static_cast<void *>(target_sp.get()), static_cast<void *>(argv),
- static_cast<void *>(envp), stdin_path ? stdin_path : "NULL",
- stdout_path ? stdout_path : "NULL",
- stderr_path ? stderr_path : "NULL",
- working_directory ? working_directory : "NULL", launch_flags,
- stop_at_entry, static_cast<void *>(error.get()));
-
if (target_sp) {
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
@@ -408,13 +388,6 @@ SBProcess SBTarget::Launch(SBListener &listener, char const **argv,
error.SetErrorString("SBTarget is invalid");
}
- log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API);
- if (log)
- log->Printf("SBTarget(%p)::Launch (...) => SBProcess(%p), SBError(%s)",
- static_cast<void *>(target_sp.get()),
- static_cast<void *>(sb_process.GetSP().get()),
- error.GetCString());
-
return LLDB_RECORD_RESULT(sb_process);
}
@@ -423,15 +396,10 @@ SBProcess SBTarget::Launch(SBLaunchInfo &sb_launch_info, SBError &error) {
(lldb::SBLaunchInfo &, lldb::SBError &), sb_launch_info,
error);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBProcess sb_process;
TargetSP target_sp(GetSP());
- if (log)
- log->Printf("SBTarget(%p)::Launch (launch_info, error)...",
- static_cast<void *>(target_sp.get()));
-
if (target_sp) {
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
StateType state = eStateInvalid;
@@ -469,12 +437,6 @@ SBProcess SBTarget::Launch(SBLaunchInfo &sb_launch_info, SBError &error) {
error.SetErrorString("SBTarget is invalid");
}
- log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API);
- if (log)
- log->Printf("SBTarget(%p)::Launch (...) => SBProcess(%p)",
- static_cast<void *>(target_sp.get()),
- static_cast<void *>(sb_process.GetSP().get()));
-
return LLDB_RECORD_RESULT(sb_process);
}
@@ -483,15 +445,9 @@ lldb::SBProcess SBTarget::Attach(SBAttachInfo &sb_attach_info, SBError &error) {
(lldb::SBAttachInfo &, lldb::SBError &), sb_attach_info,
error);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBProcess sb_process;
TargetSP target_sp(GetSP());
- if (log)
- log->Printf("SBTarget(%p)::Attach (sb_attach_info, error)...",
- static_cast<void *>(target_sp.get()));
-
if (target_sp) {
ProcessAttachInfo &attach_info = sb_attach_info.ref();
if (attach_info.ProcessIDIsValid() && !attach_info.UserIDIsValid()) {
@@ -505,11 +461,6 @@ lldb::SBProcess SBTarget::Attach(SBAttachInfo &sb_attach_info, SBError &error) {
} else {
error.ref().SetErrorStringWithFormat(
"no process found with process ID %" PRIu64, attach_pid);
- if (log) {
- log->Printf("SBTarget(%p)::Attach (...) => error %s",
- static_cast<void *>(target_sp.get()),
- error.GetCString());
- }
return LLDB_RECORD_RESULT(sb_process);
}
}
@@ -521,11 +472,6 @@ lldb::SBProcess SBTarget::Attach(SBAttachInfo &sb_attach_info, SBError &error) {
error.SetErrorString("SBTarget is invalid");
}
- if (log)
- log->Printf("SBTarget(%p)::Attach (...) => SBProcess(%p)",
- static_cast<void *>(target_sp.get()),
- static_cast<void *>(sb_process.GetSP().get()));
-
return LLDB_RECORD_RESULT(sb_process);
}
@@ -538,15 +484,9 @@ lldb::SBProcess SBTarget::AttachToProcessWithID(
(lldb::SBListener &, lldb::pid_t, lldb::SBError &),
listener, pid, error);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBProcess sb_process;
TargetSP target_sp(GetSP());
- if (log)
- log->Printf("SBTarget(%p)::%s (listener, pid=%" PRId64 ", error)...",
- static_cast<void *>(target_sp.get()), __FUNCTION__, pid);
-
if (target_sp) {
ProcessAttachInfo attach_info;
attach_info.SetProcessID(pid);
@@ -563,10 +503,6 @@ lldb::SBProcess SBTarget::AttachToProcessWithID(
} else
error.SetErrorString("SBTarget is invalid");
- if (log)
- log->Printf("SBTarget(%p)::%s (...) => SBProcess(%p)",
- static_cast<void *>(target_sp.get()), __FUNCTION__,
- static_cast<void *>(sb_process.GetSP().get()));
return LLDB_RECORD_RESULT(sb_process);
}
@@ -580,16 +516,9 @@ lldb::SBProcess SBTarget::AttachToProcessWithName(
(lldb::SBListener &, const char *, bool, lldb::SBError &),
listener, name, wait_for, error);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBProcess sb_process;
TargetSP target_sp(GetSP());
- if (log)
- log->Printf("SBTarget(%p)::%s (listener, name=%s, wait_for=%s, error)...",
- static_cast<void *>(target_sp.get()), __FUNCTION__, name,
- wait_for ? "true" : "false");
-
if (name && target_sp) {
ProcessAttachInfo attach_info;
attach_info.GetExecutableFile().SetFile(name, FileSpec::Style::native);
@@ -603,10 +532,6 @@ lldb::SBProcess SBTarget::AttachToProcessWithName(
} else
error.SetErrorString("SBTarget is invalid");
- if (log)
- log->Printf("SBTarget(%p)::%s (...) => SBProcess(%p)",
- static_cast<void *>(target_sp.get()), __FUNCTION__,
- static_cast<void *>(sb_process.GetSP().get()));
return LLDB_RECORD_RESULT(sb_process);
}
@@ -618,17 +543,10 @@ lldb::SBProcess SBTarget::ConnectRemote(SBListener &listener, const char *url,
(lldb::SBListener &, const char *, const char *, lldb::SBError &),
listener, url, plugin_name, error);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBProcess sb_process;
ProcessSP process_sp;
TargetSP target_sp(GetSP());
- if (log)
- log->Printf("SBTarget(%p)::ConnectRemote (listener, url=%s, "
- "plugin_name=%s, error)...",
- static_cast<void *>(target_sp.get()), url, plugin_name);
-
if (target_sp) {
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
if (listener.IsValid())
@@ -648,10 +566,6 @@ lldb::SBProcess SBTarget::ConnectRemote(SBListener &listener, const char *url,
error.SetErrorString("SBTarget is invalid");
}
- if (log)
- log->Printf("SBTarget(%p)::ConnectRemote (...) => SBProcess(%p)",
- static_cast<void *>(target_sp.get()),
- static_cast<void *>(process_sp.get()));
return LLDB_RECORD_RESULT(sb_process);
}
@@ -666,13 +580,6 @@ SBFileSpec SBTarget::GetExecutable() {
exe_file_spec.SetFileSpec(exe_module->GetFileSpec());
}
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- if (log) {
- log->Printf("SBTarget(%p)::GetExecutable () => SBFileSpec(%p)",
- static_cast<void *>(target_sp.get()),
- static_cast<const void *>(exe_file_spec.get()));
- }
-
return LLDB_RECORD_RESULT(exe_file_spec);
}
@@ -837,8 +744,6 @@ SBBreakpoint SBTarget::BreakpointCreateByLocation(
lldb::addr_t, lldb::SBFileSpecList &),
sb_file_spec, line, column, offset, sb_module_list);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
if (target_sp && line != 0) {
@@ -858,17 +763,6 @@ SBBreakpoint SBTarget::BreakpointCreateByLocation(
skip_prologue, internal, hardware, move_to_nearest_code);
}
- if (log) {
- SBStream sstr;
- sb_bp.GetDescription(sstr);
- char path[PATH_MAX];
- sb_file_spec->GetPath(path, sizeof(path));
- log->Printf("SBTarget(%p)::BreakpointCreateByLocation ( %s:%u ) => "
- "SBBreakpoint(%p): %s",
- static_cast<void *>(target_sp.get()), path, line,
- static_cast<void *>(sb_bp.GetSP().get()), sstr.GetData());
- }
-
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -877,8 +771,6 @@ SBBreakpoint SBTarget::BreakpointCreateByName(const char *symbol_name,
LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName,
(const char *, const char *), symbol_name, module_name);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
if (target_sp.get()) {
@@ -901,12 +793,6 @@ SBBreakpoint SBTarget::BreakpointCreateByName(const char *symbol_name,
}
}
- if (log)
- log->Printf("SBTarget(%p)::BreakpointCreateByName (symbol=\"%s\", "
- "module=\"%s\") => SBBreakpoint(%p)",
- static_cast<void *>(target_sp.get()), symbol_name, module_name,
- static_cast<void *>(sb_bp.GetSP().get()));
-
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -949,8 +835,6 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByName(
symbol_name, name_type_mask, symbol_language, module_list,
comp_unit_list);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
if (target_sp && symbol_name && symbol_name[0]) {
@@ -964,12 +848,6 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByName(
skip_prologue, internal, hardware);
}
- if (log)
- log->Printf("SBTarget(%p)::BreakpointCreateByName (symbol=\"%s\", "
- "name_type: %d) => SBBreakpoint(%p)",
- static_cast<void *>(target_sp.get()), symbol_name,
- name_type_mask, static_cast<void *>(sb_bp.GetSP().get()));
-
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -1014,8 +892,6 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByNames(
symbol_names, num_names, name_type_mask, symbol_language,
offset, module_list, comp_unit_list);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
if (target_sp && num_names > 0) {
@@ -1029,24 +905,6 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByNames(
symbol_language, offset, skip_prologue, internal, hardware);
}
- if (log) {
- log->Printf("SBTarget(%p)::BreakpointCreateByName (symbols={",
- static_cast<void *>(target_sp.get()));
- for (uint32_t i = 0; i < num_names; i++) {
- char sep;
- if (i < num_names - 1)
- sep = ',';
- else
- sep = '}';
- if (symbol_names[i] != NULL)
- log->Printf("\"%s\"%c ", symbol_names[i], sep);
- else
- log->Printf("\"<NULL>\"%c ", sep);
- }
- log->Printf("name_type: %d) => SBBreakpoint(%p)", name_type_mask,
- static_cast<void *>(sb_bp.GetSP().get()));
- }
-
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -1088,7 +946,6 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByRegex(
const lldb::SBFileSpecList &),
symbol_name_regex, symbol_language, module_list, comp_unit_list);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
@@ -1104,12 +961,6 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateByRegex(
skip_prologue, internal, hardware);
}
- if (log)
- log->Printf("SBTarget(%p)::BreakpointCreateByRegex (symbol_regex=\"%s\") "
- "=> SBBreakpoint(%p)",
- static_cast<void *>(target_sp.get()), symbol_name_regex,
- static_cast<void *>(sb_bp.GetSP().get()));
-
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -1117,8 +968,6 @@ SBBreakpoint SBTarget::BreakpointCreateByAddress(addr_t address) {
LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByAddress,
(lldb::addr_t), address);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
if (target_sp) {
@@ -1127,13 +976,6 @@ SBBreakpoint SBTarget::BreakpointCreateByAddress(addr_t address) {
sb_bp = target_sp->CreateBreakpoint(address, false, hardware);
}
- if (log)
- log->Printf("SBTarget(%p)::BreakpointCreateByAddress (address=%" PRIu64
- ") => SBBreakpoint(%p)",
- static_cast<void *>(target_sp.get()),
- static_cast<uint64_t>(address),
- static_cast<void *>(sb_bp.GetSP().get()));
-
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -1141,15 +983,9 @@ SBBreakpoint SBTarget::BreakpointCreateBySBAddress(SBAddress &sb_address) {
LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateBySBAddress,
(lldb::SBAddress &), sb_address);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
if (!sb_address.IsValid()) {
- if (log)
- log->Printf("SBTarget(%p)::BreakpointCreateBySBAddress called with "
- "invalid address",
- static_cast<void *>(target_sp.get()));
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -1159,15 +995,6 @@ SBBreakpoint SBTarget::BreakpointCreateBySBAddress(SBAddress &sb_address) {
sb_bp = target_sp->CreateBreakpoint(sb_address.ref(), false, hardware);
}
- if (log) {
- SBStream s;
- sb_address.GetDescription(s);
- log->Printf("SBTarget(%p)::BreakpointCreateBySBAddress (address=%s) => "
- "SBBreakpoint(%p)",
- static_cast<void *>(target_sp.get()), s.GetData(),
- static_cast<void *>(sb_bp.GetSP().get()));
- }
-
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -1218,8 +1045,6 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateBySourceRegex(
const lldb::SBFileSpecList &, const lldb::SBStringList &),
source_regex, module_list, source_file_list, func_names);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
if (target_sp && source_regex && source_regex[0]) {
@@ -1237,12 +1062,6 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateBySourceRegex(
false, hardware, move_to_nearest_code);
}
- if (log)
- log->Printf("SBTarget(%p)::BreakpointCreateByRegex (source_regex=\"%s\") "
- "=> SBBreakpoint(%p)",
- static_cast<void *>(target_sp.get()), source_regex,
- static_cast<void *>(sb_bp.GetSP().get()));
-
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -1253,8 +1072,6 @@ SBTarget::BreakpointCreateForException(lldb::LanguageType language,
(lldb::LanguageType, bool, bool), language, catch_bp,
throw_bp);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
if (target_sp) {
@@ -1264,14 +1081,6 @@ SBTarget::BreakpointCreateForException(lldb::LanguageType language,
hardware);
}
- if (log)
- log->Printf("SBTarget(%p)::BreakpointCreateForException (Language: %s, catch: "
- "%s throw: %s) => SBBreakpoint(%p)",
- static_cast<void *>(target_sp.get()),
- Language::GetNameForLanguageType(language),
- catch_bp ? "on" : "off", throw_bp ? "on" : "off",
- static_cast<void *>(sb_bp.GetSP().get()));
-
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -1285,14 +1094,12 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateFromScript(
const lldb::SBFileSpecList &, bool),
class_name, extra_args, module_list, file_list, request_hardware);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBBreakpoint sb_bp;
TargetSP target_sp(GetSP());
if (target_sp) {
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
Status error;
-
+
StructuredData::ObjectSP obj_sp = extra_args.m_impl_up->GetObjectSP();
sb_bp =
target_sp->CreateScriptedBreakpoint(class_name,
@@ -1303,12 +1110,6 @@ lldb::SBBreakpoint SBTarget::BreakpointCreateFromScript(
obj_sp,
&error);
}
- if (log)
- log->Printf("SBTarget(%p)::BreakpointCreateFromScript (class name: %s) "
- " => SBBreakpoint(%p)",
- static_cast<void *>(target_sp.get()),
- class_name,
- static_cast<void *>(sb_bp.GetSP().get()));
return LLDB_RECORD_RESULT(sb_bp);
}
@@ -1341,8 +1142,6 @@ bool SBTarget::BreakpointDelete(break_id_t bp_id) {
LLDB_RECORD_METHOD(bool, SBTarget, BreakpointDelete, (lldb::break_id_t),
bp_id);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
bool result = false;
TargetSP target_sp(GetSP());
if (target_sp) {
@@ -1350,11 +1149,6 @@ bool SBTarget::BreakpointDelete(break_id_t bp_id) {
result = target_sp->RemoveBreakpointByID(bp_id);
}
- if (log)
- log->Printf("SBTarget(%p)::BreakpointDelete (bp_id=%d) => %i",
- static_cast<void *>(target_sp.get()),
- static_cast<uint32_t>(bp_id), result);
-
return result;
}
@@ -1362,8 +1156,6 @@ SBBreakpoint SBTarget::FindBreakpointByID(break_id_t bp_id) {
LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, FindBreakpointByID,
(lldb::break_id_t), bp_id);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBBreakpoint sb_breakpoint;
TargetSP target_sp(GetSP());
if (target_sp && bp_id != LLDB_INVALID_BREAK_ID) {
@@ -1371,12 +1163,6 @@ SBBreakpoint SBTarget::FindBreakpointByID(break_id_t bp_id) {
sb_breakpoint = target_sp->GetBreakpointByID(bp_id);
}
- if (log)
- log->Printf(
- "SBTarget(%p)::FindBreakpointByID (bp_id=%d) => SBBreakpoint(%p)",
- static_cast<void *>(target_sp.get()), static_cast<uint32_t>(bp_id),
- static_cast<void *>(sb_breakpoint.GetSP().get()));
-
return LLDB_RECORD_RESULT(sb_breakpoint);
}
@@ -1576,7 +1362,6 @@ bool SBTarget::DeleteWatchpoint(watch_id_t wp_id) {
LLDB_RECORD_METHOD(bool, SBTarget, DeleteWatchpoint, (lldb::watch_id_t),
wp_id);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
bool result = false;
TargetSP target_sp(GetSP());
@@ -1587,11 +1372,6 @@ bool SBTarget::DeleteWatchpoint(watch_id_t wp_id) {
result = target_sp->RemoveWatchpointByID(wp_id);
}
- if (log)
- log->Printf("SBTarget(%p)::WatchpointDelete (wp_id=%d) => %i",
- static_cast<void *>(target_sp.get()),
- static_cast<uint32_t>(wp_id), result);
-
return result;
}
@@ -1599,7 +1379,6 @@ SBWatchpoint SBTarget::FindWatchpointByID(lldb::watch_id_t wp_id) {
LLDB_RECORD_METHOD(lldb::SBWatchpoint, SBTarget, FindWatchpointByID,
(lldb::watch_id_t), wp_id);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBWatchpoint sb_watchpoint;
lldb::WatchpointSP watchpoint_sp;
@@ -1612,12 +1391,6 @@ SBWatchpoint SBTarget::FindWatchpointByID(lldb::watch_id_t wp_id) {
sb_watchpoint.SetSP(watchpoint_sp);
}
- if (log)
- log->Printf(
- "SBTarget(%p)::FindWatchpointByID (bp_id=%d) => SBWatchpoint(%p)",
- static_cast<void *>(target_sp.get()), static_cast<uint32_t>(wp_id),
- static_cast<void *>(watchpoint_sp.get()));
-
return LLDB_RECORD_RESULT(sb_watchpoint);
}
@@ -1628,8 +1401,6 @@ lldb::SBWatchpoint SBTarget::WatchAddress(lldb::addr_t addr, size_t size,
(lldb::addr_t, size_t, bool, bool, lldb::SBError &), addr,
size, read, write, error);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBWatchpoint sb_watchpoint;
lldb::WatchpointSP watchpoint_sp;
TargetSP target_sp(GetSP());
@@ -1657,13 +1428,6 @@ lldb::SBWatchpoint SBTarget::WatchAddress(lldb::addr_t addr, size_t size,
sb_watchpoint.SetSP(watchpoint_sp);
}
- if (log)
- log->Printf("SBTarget(%p)::WatchAddress (addr=0x%" PRIx64
- ", 0x%u) => SBWatchpoint(%p)",
- static_cast<void *>(target_sp.get()), addr,
- static_cast<uint32_t>(size),
- static_cast<void *>(watchpoint_sp.get()));
-
return LLDB_RECORD_RESULT(sb_watchpoint);
}
@@ -1712,16 +1476,6 @@ SBValue SBTarget::CreateValueFromAddress(const char *name, SBAddress addr,
exe_ctx, ast_type);
}
sb_value.SetSP(new_value_sp);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- if (log) {
- if (new_value_sp)
- log->Printf("SBTarget(%p)::CreateValueFromAddress => \"%s\"",
- static_cast<void *>(m_opaque_sp.get()),
- new_value_sp->GetName().AsCString());
- else
- log->Printf("SBTarget(%p)::CreateValueFromAddress => NULL",
- static_cast<void *>(m_opaque_sp.get()));
- }
return LLDB_RECORD_RESULT(sb_value);
}
@@ -1742,16 +1496,6 @@ lldb::SBValue SBTarget::CreateValueFromData(const char *name, lldb::SBData data,
exe_ctx, ast_type);
}
sb_value.SetSP(new_value_sp);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- if (log) {
- if (new_value_sp)
- log->Printf("SBTarget(%p)::CreateValueFromData => \"%s\"",
- static_cast<void *>(m_opaque_sp.get()),
- new_value_sp->GetName().AsCString());
- else
- log->Printf("SBTarget(%p)::CreateValueFromData => NULL",
- static_cast<void *>(m_opaque_sp.get()));
- }
return LLDB_RECORD_RESULT(sb_value);
}
@@ -1769,16 +1513,6 @@ lldb::SBValue SBTarget::CreateValueFromExpression(const char *name,
ValueObject::CreateValueObjectFromExpression(name, expr, exe_ctx);
}
sb_value.SetSP(new_value_sp);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- if (log) {
- if (new_value_sp)
- log->Printf("SBTarget(%p)::CreateValueFromExpression => \"%s\"",
- static_cast<void *>(m_opaque_sp.get()),
- new_value_sp->GetName().AsCString());
- else
- log->Printf("SBTarget(%p)::CreateValueFromExpression => NULL",
- static_cast<void *>(m_opaque_sp.get()));
- }
return LLDB_RECORD_RESULT(sb_value);
}
@@ -1812,11 +1546,6 @@ void SBTarget::AppendImageSearchPath(const char *from, const char *to,
if (!csTo)
return error.SetErrorString("<to> path can't be empty");
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
- if (log)
- log->Printf("SBTarget(%p)::%s: '%s' -> '%s'",
- static_cast<void *>(target_sp.get()), __FUNCTION__,
- from, to);
target_sp->GetImageSearchPathList().Append(csFrom, csTo, true);
}
@@ -1884,8 +1613,6 @@ bool SBTarget::AddModule(lldb::SBModule &module) {
uint32_t SBTarget::GetNumModules() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBTarget, GetNumModules);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
uint32_t num = 0;
TargetSP target_sp(GetSP());
if (target_sp) {
@@ -1893,22 +1620,12 @@ uint32_t SBTarget::GetNumModules() const {
num = target_sp->GetImages().GetSize();
}
- if (log)
- log->Printf("SBTarget(%p)::GetNumModules () => %d",
- static_cast<void *>(target_sp.get()), num);
-
return num;
}
void SBTarget::Clear() {
LLDB_RECORD_METHOD_NO_ARGS(void, SBTarget, Clear);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
- if (log)
- log->Printf("SBTarget(%p)::Clear ()",
- static_cast<void *>(m_opaque_sp.get()));
-
m_opaque_sp.reset();
}
@@ -1997,8 +1714,6 @@ SBModule SBTarget::GetModuleAtIndex(uint32_t idx) {
LLDB_RECORD_METHOD(lldb::SBModule, SBTarget, GetModuleAtIndex, (uint32_t),
idx);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
SBModule sb_module;
ModuleSP module_sp;
TargetSP target_sp(GetSP());
@@ -2008,11 +1723,6 @@ SBModule SBTarget::GetModuleAtIndex(uint32_t idx) {
sb_module.SetSP(module_sp);
}
- if (log)
- log->Printf("SBTarget(%p)::GetModuleAtIndex (idx=%d) => SBModule(%p)",
- static_cast<void *>(target_sp.get()), idx,
- static_cast<void *>(module_sp.get()));
-
return LLDB_RECORD_RESULT(sb_module);
}
@@ -2029,15 +1739,10 @@ SBBroadcaster SBTarget::GetBroadcaster() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBroadcaster, SBTarget,
GetBroadcaster);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
TargetSP target_sp(GetSP());
SBBroadcaster broadcaster(target_sp.get(), false);
- if (log)
- log->Printf("SBTarget(%p)::GetBroadcaster () => SBBroadcaster(%p)",
- static_cast<void *>(target_sp.get()),
- static_cast<void *>(broadcaster.get()));
return LLDB_RECORD_RESULT(broadcaster);
}
@@ -2622,7 +2327,6 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
(const char *, const lldb::SBExpressionOptions &), expr,
options);
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
#if !defined(LLDB_DISABLE_PYTHON)
Log *expr_log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
#endif
@@ -2633,17 +2337,12 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
StackFrame *frame = NULL;
if (target_sp) {
if (expr == NULL || expr[0] == '\0') {
- if (log)
- log->Printf(
- "SBTarget::EvaluateExpression called with an empty expression");
return LLDB_RECORD_RESULT(expr_result);
}
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
ExecutionContext exe_ctx(m_opaque_sp.get());
- if (log)
- log->Printf("SBTarget()::EvaluateExpression (expr=\"%s\")...", expr);
frame = exe_ctx.GetFramePtr();
Target *target = exe_ctx.GetTargetPtr();
@@ -2663,10 +2362,6 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
target->EvaluateExpression(expr, frame, expr_value_sp, options.ref());
expr_result.SetSP(expr_value_sp, options.GetFetchDynamicValue());
- } else {
- if (log)
- log->Printf("SBTarget::EvaluateExpression () => error: could not "
- "reconstruct frame object for this SBTarget.");
}
}
#ifndef LLDB_DISABLE_PYTHON
@@ -2674,12 +2369,6 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
expr_log->Printf("** [SBTarget::EvaluateExpression] Expression result is "
"%s, summary %s **",
expr_result.GetValue(), expr_result.GetSummary());
-
- if (log)
- log->Printf("SBTarget(%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);
OpenPOWER on IntegriCloud