mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
sweep up -Wformat warnings from gcc
This is a purely mechanical change explicitly casting any parameters for printf style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux. llvm-svn: 205607
This commit is contained in:
@@ -552,10 +552,9 @@ SBTarget::GetProcess ()
|
||||
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::GetProcess () => SBProcess(%p)",
|
||||
target_sp.get(), process_sp.get());
|
||||
}
|
||||
log->Printf ("SBTarget(%p)::GetProcess () => SBProcess(%p)",
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<void*>(process_sp.get()));
|
||||
|
||||
return sb_process;
|
||||
}
|
||||
@@ -652,19 +651,15 @@ SBTarget::Launch
|
||||
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))...",
|
||||
target_sp.get(),
|
||||
argv,
|
||||
envp,
|
||||
stdin_path ? stdin_path : "NULL",
|
||||
stdout_path ? stdout_path : "NULL",
|
||||
stderr_path ? stderr_path : "NULL",
|
||||
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,
|
||||
error.get());
|
||||
}
|
||||
launch_flags, stop_at_entry,
|
||||
static_cast<void*>(error.get()));
|
||||
|
||||
if (target_sp)
|
||||
{
|
||||
@@ -678,17 +673,17 @@ SBTarget::Launch
|
||||
if (process_sp)
|
||||
{
|
||||
state = process_sp->GetState();
|
||||
|
||||
|
||||
if (process_sp->IsAlive() && state != eStateConnected)
|
||||
{
|
||||
{
|
||||
if (state == eStateAttaching)
|
||||
error.SetErrorString ("process attach is in progress");
|
||||
else
|
||||
error.SetErrorString ("a process is already being debugged");
|
||||
return sb_process;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (state == eStateConnected)
|
||||
{
|
||||
// If we are already connected, then we have already specified the
|
||||
@@ -705,7 +700,7 @@ SBTarget::Launch
|
||||
launch_flags |= eLaunchFlagDisableSTDIO;
|
||||
|
||||
ProcessLaunchInfo launch_info (stdin_path, stdout_path, stderr_path, working_directory, launch_flags);
|
||||
|
||||
|
||||
Module *exe_module = target_sp->GetExecutableModulePointer();
|
||||
if (exe_module)
|
||||
launch_info.SetExecutableFile(exe_module->GetPlatformFileSpec(), true);
|
||||
@@ -728,10 +723,9 @@ SBTarget::Launch
|
||||
|
||||
log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::Launch (...) => SBProcess(%p)",
|
||||
target_sp.get(), sb_process.GetSP().get());
|
||||
}
|
||||
log->Printf ("SBTarget(%p)::Launch (...) => SBProcess(%p)",
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<void*>(sb_process.GetSP().get()));
|
||||
|
||||
return sb_process;
|
||||
}
|
||||
@@ -740,15 +734,14 @@ SBProcess
|
||||
SBTarget::Launch (SBLaunchInfo &sb_launch_info, SBError& 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)...", target_sp.get());
|
||||
}
|
||||
|
||||
log->Printf ("SBTarget(%p)::Launch (launch_info, error)...",
|
||||
static_cast<void*>(target_sp.get()));
|
||||
|
||||
if (target_sp)
|
||||
{
|
||||
Mutex::Locker api_locker (target_sp->GetAPIMutex());
|
||||
@@ -758,15 +751,15 @@ SBTarget::Launch (SBLaunchInfo &sb_launch_info, SBError& error)
|
||||
if (process_sp)
|
||||
{
|
||||
state = process_sp->GetState();
|
||||
|
||||
|
||||
if (process_sp->IsAlive() && state != eStateConnected)
|
||||
{
|
||||
{
|
||||
if (state == eStateAttaching)
|
||||
error.SetErrorString ("process attach is in progress");
|
||||
else
|
||||
error.SetErrorString ("a process is already being debugged");
|
||||
return sb_process;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -779,7 +772,7 @@ SBTarget::Launch (SBLaunchInfo &sb_launch_info, SBError& error)
|
||||
const ArchSpec &arch_spec = target_sp->GetArchitecture();
|
||||
if (arch_spec.IsValid())
|
||||
launch_info.GetArchitecture () = arch_spec;
|
||||
|
||||
|
||||
error.SetError (target_sp->Launch (target_sp->GetDebugger().GetListener(), launch_info));
|
||||
sb_process.SetSP(target_sp->GetProcessSP());
|
||||
}
|
||||
@@ -787,14 +780,13 @@ 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)",
|
||||
target_sp.get(), sb_process.GetSP().get());
|
||||
}
|
||||
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<void*>(sb_process.GetSP().get()));
|
||||
|
||||
return sb_process;
|
||||
}
|
||||
|
||||
@@ -802,41 +794,39 @@ lldb::SBProcess
|
||||
SBTarget::Attach (SBAttachInfo &sb_attach_info, SBError& 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)::Attach (sb_attach_info, error)...", target_sp.get());
|
||||
}
|
||||
|
||||
log->Printf ("SBTarget(%p)::Attach (sb_attach_info, error)...",
|
||||
static_cast<void*>(target_sp.get()));
|
||||
|
||||
if (target_sp)
|
||||
{
|
||||
Mutex::Locker api_locker (target_sp->GetAPIMutex());
|
||||
|
||||
|
||||
StateType state = eStateInvalid;
|
||||
process_sp = target_sp->GetProcessSP();
|
||||
if (process_sp)
|
||||
{
|
||||
state = process_sp->GetState();
|
||||
|
||||
|
||||
if (process_sp->IsAlive() && state != eStateConnected)
|
||||
{
|
||||
{
|
||||
if (state == eStateAttaching)
|
||||
error.SetErrorString ("process attach is in progress");
|
||||
else
|
||||
error.SetErrorString ("a process is already being debugged");
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::Attach (...) => error %s",
|
||||
target_sp.get(), error.GetCString());
|
||||
}
|
||||
static_cast<void*>(target_sp.get()),
|
||||
error.GetCString());
|
||||
return sb_process;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (state != eStateConnected)
|
||||
process_sp = target_sp->CreateProcess (target_sp->GetDebugger().GetListener(), NULL, NULL);
|
||||
|
||||
@@ -861,7 +851,7 @@ SBTarget::Attach (SBAttachInfo &sb_attach_info, SBError& error)
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::Attach (...) => error %s",
|
||||
target_sp.get(), error.GetCString());
|
||||
static_cast<void*>(target_sp.get()), error.GetCString());
|
||||
}
|
||||
return sb_process;
|
||||
}
|
||||
@@ -886,13 +876,12 @@ SBTarget::Attach (SBAttachInfo &sb_attach_info, SBError& error)
|
||||
{
|
||||
error.SetErrorString ("SBTarget is invalid");
|
||||
}
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::Attach (...) => SBProcess(%p)",
|
||||
target_sp.get(), process_sp.get());
|
||||
}
|
||||
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<void*>(process_sp.get()));
|
||||
|
||||
return sb_process;
|
||||
}
|
||||
|
||||
@@ -924,10 +913,9 @@ SBTarget::AttachToProcessWithID
|
||||
TargetSP target_sp(GetSP());
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::AttachToProcessWithID (listener, pid=%" PRId64 ", error)...", target_sp.get(), pid);
|
||||
}
|
||||
|
||||
log->Printf ("SBTarget(%p)::AttachToProcessWithID (listener, pid=%" PRId64 ", error)...",
|
||||
static_cast<void*>(target_sp.get()), pid);
|
||||
|
||||
if (target_sp)
|
||||
{
|
||||
Mutex::Locker api_locker (target_sp->GetAPIMutex());
|
||||
@@ -937,15 +925,15 @@ SBTarget::AttachToProcessWithID
|
||||
if (process_sp)
|
||||
{
|
||||
state = process_sp->GetState();
|
||||
|
||||
|
||||
if (process_sp->IsAlive() && state != eStateConnected)
|
||||
{
|
||||
{
|
||||
if (state == eStateAttaching)
|
||||
error.SetErrorString ("process attach is in progress");
|
||||
else
|
||||
error.SetErrorString ("a process is already being debugged");
|
||||
return sb_process;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state == eStateConnected)
|
||||
@@ -969,10 +957,10 @@ SBTarget::AttachToProcessWithID
|
||||
if (process_sp)
|
||||
{
|
||||
sb_process.SetSP (process_sp);
|
||||
|
||||
|
||||
ProcessAttachInfo attach_info;
|
||||
attach_info.SetProcessID (pid);
|
||||
|
||||
|
||||
PlatformSP platform_sp = target_sp->GetPlatform();
|
||||
ProcessInstanceInfo instance_info;
|
||||
if (platform_sp->GetProcessInfo(pid, instance_info))
|
||||
@@ -997,12 +985,11 @@ SBTarget::AttachToProcessWithID
|
||||
{
|
||||
error.SetErrorString ("SBTarget is invalid");
|
||||
}
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::AttachToProcessWithID (...) => SBProcess(%p)",
|
||||
target_sp.get(), process_sp.get());
|
||||
}
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<void*>(process_sp.get()));
|
||||
return sb_process;
|
||||
}
|
||||
|
||||
@@ -1016,16 +1003,16 @@ SBTarget::AttachToProcessWithName
|
||||
)
|
||||
{
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
|
||||
|
||||
SBProcess sb_process;
|
||||
ProcessSP process_sp;
|
||||
TargetSP target_sp(GetSP());
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::AttachToProcessWithName (listener, name=%s, wait_for=%s, error)...", target_sp.get(), name, wait_for ? "true" : "false");
|
||||
}
|
||||
|
||||
log->Printf ("SBTarget(%p)::AttachToProcessWithName (listener, name=%s, wait_for=%s, error)...",
|
||||
static_cast<void*>(target_sp.get()), name,
|
||||
wait_for ? "true" : "false");
|
||||
|
||||
if (name && target_sp)
|
||||
{
|
||||
Mutex::Locker api_locker (target_sp->GetAPIMutex());
|
||||
@@ -1035,17 +1022,17 @@ SBTarget::AttachToProcessWithName
|
||||
if (process_sp)
|
||||
{
|
||||
state = process_sp->GetState();
|
||||
|
||||
|
||||
if (process_sp->IsAlive() && state != eStateConnected)
|
||||
{
|
||||
{
|
||||
if (state == eStateAttaching)
|
||||
error.SetErrorString ("process attach is in progress");
|
||||
else
|
||||
error.SetErrorString ("a process is already being debugged");
|
||||
return sb_process;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (state == eStateConnected)
|
||||
{
|
||||
// If we are already connected, then we have already specified the
|
||||
@@ -1089,12 +1076,11 @@ SBTarget::AttachToProcessWithName
|
||||
{
|
||||
error.SetErrorString ("SBTarget is invalid");
|
||||
}
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::AttachToPorcessWithName (...) => SBProcess(%p)",
|
||||
target_sp.get(), process_sp.get());
|
||||
}
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<void*>(process_sp.get()));
|
||||
return sb_process;
|
||||
}
|
||||
|
||||
@@ -1112,12 +1098,11 @@ SBTarget::ConnectRemote
|
||||
SBProcess sb_process;
|
||||
ProcessSP process_sp;
|
||||
TargetSP target_sp(GetSP());
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::ConnectRemote (listener, url=%s, plugin_name=%s, error)...", target_sp.get(), url, plugin_name);
|
||||
}
|
||||
|
||||
log->Printf ("SBTarget(%p)::ConnectRemote (listener, url=%s, plugin_name=%s, error)...",
|
||||
static_cast<void*>(target_sp.get()), url, plugin_name);
|
||||
|
||||
if (target_sp)
|
||||
{
|
||||
Mutex::Locker api_locker (target_sp->GetAPIMutex());
|
||||
@@ -1125,8 +1110,7 @@ SBTarget::ConnectRemote
|
||||
process_sp = target_sp->CreateProcess (listener.ref(), plugin_name, NULL);
|
||||
else
|
||||
process_sp = target_sp->CreateProcess (target_sp->GetDebugger().GetListener(), plugin_name, NULL);
|
||||
|
||||
|
||||
|
||||
if (process_sp)
|
||||
{
|
||||
sb_process.SetSP (process_sp);
|
||||
@@ -1141,12 +1125,11 @@ SBTarget::ConnectRemote
|
||||
{
|
||||
error.SetErrorString ("SBTarget is invalid");
|
||||
}
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::ConnectRemote (...) => SBProcess(%p)",
|
||||
target_sp.get(), process_sp.get());
|
||||
}
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<void*>(process_sp.get()));
|
||||
return sb_process;
|
||||
}
|
||||
|
||||
@@ -1166,8 +1149,9 @@ SBTarget::GetExecutable ()
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::GetExecutable () => SBFileSpec(%p)",
|
||||
target_sp.get(), exe_file_spec.get());
|
||||
log->Printf ("SBTarget(%p)::GetExecutable () => SBFileSpec(%p)",
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<const void*>(exe_file_spec.get()));
|
||||
}
|
||||
|
||||
return exe_file_spec;
|
||||
@@ -1269,7 +1253,7 @@ SBTarget::BreakpointCreateByLocation (const SBFileSpec &sb_file_spec,
|
||||
if (target_sp && line != 0)
|
||||
{
|
||||
Mutex::Locker api_locker (target_sp->GetAPIMutex());
|
||||
|
||||
|
||||
const LazyBool check_inlines = eLazyBoolCalculate;
|
||||
const LazyBool skip_prologue = eLazyBoolCalculate;
|
||||
const bool internal = false;
|
||||
@@ -1283,12 +1267,9 @@ SBTarget::BreakpointCreateByLocation (const SBFileSpec &sb_file_spec,
|
||||
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",
|
||||
target_sp.get(),
|
||||
path,
|
||||
line,
|
||||
sb_bp.get(),
|
||||
sstr.GetData());
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByLocation ( %s:%u ) => SBBreakpoint(%p): %s",
|
||||
static_cast<void*>(target_sp.get()), path, line,
|
||||
static_cast<void*>(sb_bp.get()), sstr.GetData());
|
||||
}
|
||||
|
||||
return sb_bp;
|
||||
@@ -1305,7 +1286,7 @@ SBTarget::BreakpointCreateByName (const char *symbol_name,
|
||||
if (target_sp.get())
|
||||
{
|
||||
Mutex::Locker api_locker (target_sp->GetAPIMutex());
|
||||
|
||||
|
||||
const bool internal = false;
|
||||
const bool hardware = false;
|
||||
const LazyBool skip_prologue = eLazyBoolCalculate;
|
||||
@@ -1320,12 +1301,11 @@ SBTarget::BreakpointCreateByName (const char *symbol_name,
|
||||
*sb_bp = target_sp->CreateBreakpoint (NULL, NULL, symbol_name, eFunctionNameTypeAuto, skip_prologue, internal, hardware);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByName (symbol=\"%s\", module=\"%s\") => SBBreakpoint(%p)",
|
||||
target_sp.get(), symbol_name, module_name, sb_bp.get());
|
||||
}
|
||||
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.get()));
|
||||
|
||||
return sb_bp;
|
||||
}
|
||||
@@ -1363,12 +1343,11 @@ SBTarget::BreakpointCreateByName (const char *symbol_name,
|
||||
internal,
|
||||
hardware);
|
||||
}
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByName (symbol=\"%s\", name_type: %d) => SBBreakpoint(%p)",
|
||||
target_sp.get(), symbol_name, name_type_mask, sb_bp.get());
|
||||
}
|
||||
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.get()));
|
||||
|
||||
return sb_bp;
|
||||
}
|
||||
@@ -1399,10 +1378,11 @@ SBTarget::BreakpointCreateByNames (const char *symbol_names[],
|
||||
internal,
|
||||
hardware);
|
||||
}
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByName (symbols={", target_sp.get());
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByName (symbols={",
|
||||
static_cast<void*>(target_sp.get()));
|
||||
for (uint32_t i = 0 ; i < num_names; i++)
|
||||
{
|
||||
char sep;
|
||||
@@ -1414,9 +1394,9 @@ SBTarget::BreakpointCreateByNames (const char *symbol_names[],
|
||||
log->Printf ("\"%s\"%c ", symbol_names[i], sep);
|
||||
else
|
||||
log->Printf ("\"<NULL>\"%c ", sep);
|
||||
|
||||
}
|
||||
log->Printf ("name_type: %d) => SBBreakpoint(%p)", name_type_mask, sb_bp.get());
|
||||
log->Printf ("name_type: %d) => SBBreakpoint(%p)", name_type_mask,
|
||||
static_cast<void*>(sb_bp.get()));
|
||||
}
|
||||
|
||||
return sb_bp;
|
||||
@@ -1437,12 +1417,12 @@ SBTarget::BreakpointCreateByRegex (const char *symbol_name_regex,
|
||||
const bool internal = false;
|
||||
const bool hardware = false;
|
||||
const LazyBool skip_prologue = eLazyBoolCalculate;
|
||||
|
||||
|
||||
if (module_name && module_name[0])
|
||||
{
|
||||
FileSpecList module_spec_list;
|
||||
module_spec_list.Append (FileSpec (module_name, false));
|
||||
|
||||
|
||||
*sb_bp = target_sp->CreateFuncRegexBreakpoint (&module_spec_list, NULL, regexp, skip_prologue, internal, hardware);
|
||||
}
|
||||
else
|
||||
@@ -1452,10 +1432,9 @@ SBTarget::BreakpointCreateByRegex (const char *symbol_name_regex,
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (symbol_regex=\"%s\", module_name=\"%s\") => SBBreakpoint(%p)",
|
||||
target_sp.get(), symbol_name_regex, module_name, sb_bp.get());
|
||||
}
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (symbol_regex=\"%s\", module_name=\"%s\") => SBBreakpoint(%p)",
|
||||
static_cast<void*>(target_sp.get()), symbol_name_regex,
|
||||
module_name, static_cast<void*>(sb_bp.get()));
|
||||
|
||||
return sb_bp;
|
||||
}
|
||||
@@ -1476,15 +1455,14 @@ SBTarget::BreakpointCreateByRegex (const char *symbol_name_regex,
|
||||
const bool internal = false;
|
||||
const bool hardware = false;
|
||||
const LazyBool skip_prologue = eLazyBoolCalculate;
|
||||
|
||||
|
||||
*sb_bp = target_sp->CreateFuncRegexBreakpoint (module_list.get(), comp_unit_list.get(), regexp, skip_prologue, internal, hardware);
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (symbol_regex=\"%s\") => SBBreakpoint(%p)",
|
||||
target_sp.get(), symbol_name_regex, sb_bp.get());
|
||||
}
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (symbol_regex=\"%s\") => SBBreakpoint(%p)",
|
||||
static_cast<void*>(target_sp.get()), symbol_name_regex,
|
||||
static_cast<void*>(sb_bp.get()));
|
||||
|
||||
return sb_bp;
|
||||
}
|
||||
@@ -1502,11 +1480,12 @@ SBTarget::BreakpointCreateByAddress (addr_t address)
|
||||
const bool hardware = false;
|
||||
*sb_bp = target_sp->CreateBreakpoint (address, false, hardware);
|
||||
}
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByAddress (address=%" PRIu64 ") => SBBreakpoint(%p)", target_sp.get(), (uint64_t) address, sb_bp.get());
|
||||
}
|
||||
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.get()));
|
||||
|
||||
return sb_bp;
|
||||
}
|
||||
@@ -1527,12 +1506,12 @@ SBTarget::BreakpointCreateBySourceRegex (const char *source_regex,
|
||||
FileSpecList source_file_spec_list;
|
||||
const bool hardware = false;
|
||||
source_file_spec_list.Append (source_file.ref());
|
||||
|
||||
|
||||
if (module_name && module_name[0])
|
||||
{
|
||||
FileSpecList module_spec_list;
|
||||
module_spec_list.Append (FileSpec (module_name, false));
|
||||
|
||||
|
||||
*sb_bp = target_sp->CreateSourceRegexBreakpoint (&module_spec_list, &source_file_spec_list, regexp, false, hardware);
|
||||
}
|
||||
else
|
||||
@@ -1545,8 +1524,9 @@ SBTarget::BreakpointCreateBySourceRegex (const char *source_regex,
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
source_file->GetPath (path, sizeof(path));
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (source_regex=\"%s\", file=\"%s\", module_name=\"%s\") => SBBreakpoint(%p)",
|
||||
target_sp.get(), source_regex, path, module_name, sb_bp.get());
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (source_regex=\"%s\", file=\"%s\", module_name=\"%s\") => SBBreakpoint(%p)",
|
||||
static_cast<void*>(target_sp.get()), source_regex, path,
|
||||
module_name, static_cast<void*>(sb_bp.get()));
|
||||
}
|
||||
|
||||
return sb_bp;
|
||||
@@ -1570,10 +1550,9 @@ SBTarget::BreakpointCreateBySourceRegex (const char *source_regex,
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (source_regex=\"%s\") => SBBreakpoint(%p)",
|
||||
target_sp.get(), source_regex, sb_bp.get());
|
||||
}
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (source_regex=\"%s\") => SBBreakpoint(%p)",
|
||||
static_cast<void*>(target_sp.get()), source_regex,
|
||||
static_cast<void*>(sb_bp.get()));
|
||||
|
||||
return sb_bp;
|
||||
}
|
||||
@@ -1595,14 +1574,11 @@ SBTarget::BreakpointCreateForException (lldb::LanguageType language,
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (Language: %s, catch: %s throw: %s) => SBBreakpoint(%p)",
|
||||
target_sp.get(),
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (Language: %s, catch: %s throw: %s) => SBBreakpoint(%p)",
|
||||
static_cast<void*>(target_sp.get()),
|
||||
LanguageRuntime::GetNameForLanguageType(language),
|
||||
catch_bp ? "on" : "off",
|
||||
throw_bp ? "on" : "off",
|
||||
sb_bp.get());
|
||||
}
|
||||
catch_bp ? "on" : "off", throw_bp ? "on" : "off",
|
||||
static_cast<void*>(sb_bp.get()));
|
||||
|
||||
return sb_bp;
|
||||
}
|
||||
@@ -1646,9 +1622,9 @@ SBTarget::BreakpointDelete (break_id_t bp_id)
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::BreakpointDelete (bp_id=%d) => %i", target_sp.get(), (uint32_t) bp_id, result);
|
||||
}
|
||||
log->Printf ("SBTarget(%p)::BreakpointDelete (bp_id=%d) => %i",
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<uint32_t>(bp_id), result);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -1667,10 +1643,10 @@ SBTarget::FindBreakpointByID (break_id_t bp_id)
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::FindBreakpointByID (bp_id=%d) => SBBreakpoint(%p)",
|
||||
target_sp.get(), (uint32_t) bp_id, sb_breakpoint.get());
|
||||
}
|
||||
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.get()));
|
||||
|
||||
return sb_breakpoint;
|
||||
}
|
||||
@@ -1755,9 +1731,9 @@ SBTarget::DeleteWatchpoint (watch_id_t wp_id)
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::WatchpointDelete (wp_id=%d) => %i", target_sp.get(), (uint32_t) wp_id, result);
|
||||
}
|
||||
log->Printf ("SBTarget(%p)::WatchpointDelete (wp_id=%d) => %i",
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<uint32_t>(wp_id), result);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -1780,10 +1756,10 @@ SBTarget::FindWatchpointByID (lldb::watch_id_t wp_id)
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::FindWatchpointByID (bp_id=%d) => SBWatchpoint(%p)",
|
||||
target_sp.get(), (uint32_t) wp_id, watchpoint_sp.get());
|
||||
}
|
||||
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 sb_watchpoint;
|
||||
}
|
||||
@@ -1792,7 +1768,7 @@ lldb::SBWatchpoint
|
||||
SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write, SBError &error)
|
||||
{
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
|
||||
|
||||
SBWatchpoint sb_watchpoint;
|
||||
lldb::WatchpointSP watchpoint_sp;
|
||||
TargetSP target_sp(GetSP());
|
||||
@@ -1809,7 +1785,7 @@ SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write, S
|
||||
error.SetErrorString("Can't create a watchpoint that is neither read nor write.");
|
||||
return sb_watchpoint;
|
||||
}
|
||||
|
||||
|
||||
// Target::CreateWatchpoint() is thread safe.
|
||||
Error cw_error;
|
||||
// This API doesn't take in a type, so we can't figure out what it is.
|
||||
@@ -1818,13 +1794,13 @@ SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write, S
|
||||
error.SetError(cw_error);
|
||||
sb_watchpoint.SetSP (watchpoint_sp);
|
||||
}
|
||||
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::WatchAddress (addr=0x%" PRIx64 ", 0x%u) => SBWatchpoint(%p)",
|
||||
target_sp.get(), addr, (uint32_t) size, watchpoint_sp.get());
|
||||
}
|
||||
|
||||
static_cast<void*>(target_sp.get()), addr,
|
||||
static_cast<uint32_t>(size),
|
||||
static_cast<void*>(watchpoint_sp.get()));
|
||||
|
||||
return sb_watchpoint;
|
||||
}
|
||||
|
||||
@@ -1871,7 +1847,7 @@ SBTarget::CreateValueFromAddress (const char *name, SBAddress addr, SBType type)
|
||||
if (pointer_ast_type)
|
||||
{
|
||||
lldb::DataBufferSP buffer(new lldb_private::DataBufferHeap(&address,sizeof(lldb::addr_t)));
|
||||
|
||||
|
||||
ExecutionContext exe_ctx (ExecutionContextRef(ExecutionContext(m_opaque_sp.get(),false)));
|
||||
ValueObjectSP ptr_result_valobj_sp(ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(),
|
||||
pointer_ast_type,
|
||||
@@ -1879,7 +1855,7 @@ SBTarget::CreateValueFromAddress (const char *name, SBAddress addr, SBType type)
|
||||
buffer,
|
||||
exe_ctx.GetByteOrder(),
|
||||
exe_ctx.GetAddressByteSize()));
|
||||
|
||||
|
||||
if (ptr_result_valobj_sp)
|
||||
{
|
||||
ptr_result_valobj_sp->GetValue().SetValueType(Value::eValueTypeLoadAddress);
|
||||
@@ -1895,9 +1871,12 @@ SBTarget::CreateValueFromAddress (const char *name, SBAddress addr, SBType type)
|
||||
if (log)
|
||||
{
|
||||
if (new_value_sp)
|
||||
log->Printf ("SBTarget(%p)::CreateValueFromAddress => \"%s\"", m_opaque_sp.get(), new_value_sp->GetName().AsCString());
|
||||
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", m_opaque_sp.get());
|
||||
log->Printf ("SBTarget(%p)::CreateValueFromAddress => NULL",
|
||||
static_cast<void*>(m_opaque_sp.get()));
|
||||
}
|
||||
return sb_value;
|
||||
}
|
||||
@@ -1992,7 +1971,8 @@ SBTarget::GetNumModules () const
|
||||
}
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBTarget(%p)::GetNumModules () => %d", target_sp.get(), num);
|
||||
log->Printf ("SBTarget(%p)::GetNumModules () => %d",
|
||||
static_cast<void*>(target_sp.get()), num);
|
||||
|
||||
return num;
|
||||
}
|
||||
@@ -2003,7 +1983,8 @@ SBTarget::Clear ()
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBTarget(%p)::Clear ()", m_opaque_sp.get());
|
||||
log->Printf ("SBTarget(%p)::Clear ()",
|
||||
static_cast<void*>(m_opaque_sp.get()));
|
||||
|
||||
m_opaque_sp.reset();
|
||||
}
|
||||
@@ -2074,10 +2055,9 @@ SBTarget::GetModuleAtIndex (uint32_t idx)
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::GetModuleAtIndex (idx=%d) => SBModule(%p)",
|
||||
target_sp.get(), idx, module_sp.get());
|
||||
}
|
||||
log->Printf ("SBTarget(%p)::GetModuleAtIndex (idx=%d) => SBModule(%p)",
|
||||
static_cast<void*>(target_sp.get()), idx,
|
||||
static_cast<void*>(module_sp.get()));
|
||||
|
||||
return sb_module;
|
||||
}
|
||||
@@ -2099,10 +2079,11 @@ SBTarget::GetBroadcaster () const
|
||||
|
||||
TargetSP target_sp(GetSP());
|
||||
SBBroadcaster broadcaster(target_sp.get(), false);
|
||||
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBTarget(%p)::GetBroadcaster () => SBBroadcaster(%p)",
|
||||
target_sp.get(), broadcaster.get());
|
||||
log->Printf ("SBTarget(%p)::GetBroadcaster () => SBBroadcaster(%p)",
|
||||
static_cast<void*>(target_sp.get()),
|
||||
static_cast<void*>(broadcaster.get()));
|
||||
|
||||
return broadcaster;
|
||||
}
|
||||
@@ -2642,16 +2623,16 @@ SBTarget::EvaluateExpression (const char *expr, const SBExpressionOptions &optio
|
||||
log->Printf ("SBTarget::EvaluateExpression called with an empty expression");
|
||||
return expr_result;
|
||||
}
|
||||
|
||||
|
||||
Mutex::Locker api_locker (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();
|
||||
|
||||
|
||||
if (target)
|
||||
{
|
||||
#ifdef LLDB_CONFIGURATION_DEBUG
|
||||
@@ -2680,17 +2661,14 @@ SBTarget::EvaluateExpression (const char *expr, const SBExpressionOptions &optio
|
||||
#ifndef LLDB_DISABLE_PYTHON
|
||||
if (expr_log)
|
||||
expr_log->Printf("** [SBTarget::EvaluateExpression] Expression result is %s, summary %s **",
|
||||
expr_result.GetValue(),
|
||||
expr_result.GetSummary());
|
||||
|
||||
expr_result.GetValue(), expr_result.GetSummary());
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBTarget(%p)::EvaluateExpression (expr=\"%s\") => SBValue(%p) (execution result=%d)",
|
||||
frame,
|
||||
expr,
|
||||
expr_value_sp.get(),
|
||||
exe_results);
|
||||
static_cast<void*>(frame), expr,
|
||||
static_cast<void*>(expr_value_sp.get()), exe_results);
|
||||
#endif
|
||||
|
||||
|
||||
return expr_result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user