[Lldb-commits] [lldb] r169444 - /lldb/trunk/source/Target/Target.cpp
Jason Molenda
jmolenda at apple.com
Wed Dec 5 15:07:34 PST 2012
Author: jmolenda
Date: Wed Dec 5 17:07:34 2012
New Revision: 169444
URL: http://llvm.org/viewvc/llvm-project?rev=169444&view=rev
Log:
Adding missing log->Printf instead of printf in Target::SetArchitecture
for target logging.
Modified:
lldb/trunk/source/Target/Target.cpp
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=169444&r1=169443&r2=169444&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Wed Dec 5 17:07:34 2012
@@ -584,10 +584,12 @@
}
}
- if (!wp_sp) {
+ if (!wp_sp)
+ {
Watchpoint *new_wp = new Watchpoint(*this, addr, size, type);
- if (!new_wp) {
- printf("Watchpoint ctor failed, out of memory?\n");
+ if (!new_wp)
+ {
+ error.SetErrorString("Watchpoint ctor failed, out of memory?");
return wp_sp;
}
new_wp->SetWatchpointType(kind);
@@ -597,12 +599,13 @@
error = m_process_sp->EnableWatchpoint(wp_sp.get());
if (log)
- log->Printf("Target::%s (creation of watchpoint %s with id = %u)\n",
- __FUNCTION__,
- error.Success() ? "succeeded" : "failed",
- wp_sp->GetID());
+ log->Printf("Target::%s (creation of watchpoint %s with id = %u)\n",
+ __FUNCTION__,
+ error.Success() ? "succeeded" : "failed",
+ wp_sp->GetID());
- if (error.Fail()) {
+ if (error.Fail())
+ {
// Enabling the watchpoint on the device side failed.
// Remove the said watchpoint from the list maintained by the target instance.
m_watchpoint_list.Remove(wp_sp->GetID());
@@ -1055,7 +1058,7 @@
{
// If we have an executable file, try to reset the executable to the desired architecture
if (log)
- printf ("Target::SetArchitecture changing architecture to %s (%s)", arch_spec.GetArchitectureName(), arch_spec.GetTriple().getTriple().c_str());
+ log->Printf ("Target::SetArchitecture changing architecture to %s (%s)", arch_spec.GetArchitectureName(), arch_spec.GetTriple().getTriple().c_str());
m_arch = arch_spec;
ModuleSP executable_sp = GetExecutableModule ();
m_images.Clear();
More information about the lldb-commits
mailing list