Update declarations for all functions/methods that accept printf-style
stdarg formats to use __attribute__ format so the compiler can flag
incorrect uses.  Fix all incorrect uses.  Most of these are innocuous,
a few were resulting in crashes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140185 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBData.cpp b/source/API/SBData.cpp
index cee6316..5859341 100644
--- a/source/API/SBData.cpp
+++ b/source/API/SBData.cpp
@@ -108,7 +108,7 @@
         value = m_opaque_sp->GetByteSize();
     if (log)
         log->Printf ("SBData::GetByteSize () => "
-                     "(%i)", value);
+                     "(%lu)", value);
     return value;
 }
 
@@ -187,7 +187,7 @@
     }
     if (log)
         log->Printf ("SBData::GetLongDouble (error=%p,offset=%d) => "
-                     "(%lf)", error.get(), offset, value);
+                     "(%Lf)", error.get(), offset, value);
     return value;
 }
 
@@ -297,7 +297,7 @@
     }
     if (log)
         log->Printf ("SBData::GetUnsignedInt64 (error=%p,offset=%d) => "
-                     "(%q)", error.get(), offset, value);
+                     "(%lld)", error.get(), offset, value);
     return value;
 }
 
@@ -385,7 +385,7 @@
     }
     if (log)
         log->Printf ("SBData::GetSignedInt64 (error=%p,offset=%d) => "
-                     "(%q)", error.get(), offset, value);
+                     "(%lld)", error.get(), offset, value);
     return value;
 }
 
@@ -453,7 +453,7 @@
             error.SetErrorString("unable to read data");
     }
     if (log)
-        log->Printf ("SBData::ReadRawData (error=%p,offset=%d,buf=%p,size=%d) => "
+        log->Printf ("SBData::ReadRawData (error=%p,offset=%d,buf=%p,size=%lu) => "
                      "(%p)", error.get(), offset, buf, size, ok);
     return ok ? size : 0;
 }
@@ -471,7 +471,7 @@
     else
         m_opaque_sp->SetData(buf, size, endian);
     if (log)
-        log->Printf ("SBData::SetData (error=%p,buf=%p,size=%d,endian=%d,addr_size=%c) => "
+        log->Printf ("SBData::SetData (error=%p,buf=%p,size=%lu,endian=%d,addr_size=%c) => "
                      "(%p)", error.get(), buf, size, endian, addr_size, m_opaque_sp.get());
 }
 
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp
index 180a5af..c9062bd 100644
--- a/source/API/SBProcess.cpp
+++ b/source/API/SBProcess.cpp
@@ -246,7 +246,7 @@
     }
     
     if (log)
-        log->Printf ("SBProcess(%p)::PutSTDIN (src=\"%s\", src_len=%d) => %d", 
+        log->Printf ("SBProcess(%p)::PutSTDIN (src=\"%s\", src_len=%d) => %lu", 
                      m_opaque_sp.get(), 
                      src, 
                      (uint32_t) src_len, 
diff --git a/source/API/SBTarget.cpp b/source/API/SBTarget.cpp
index 3343b48..5f3716c 100644
--- a/source/API/SBTarget.cpp
+++ b/source/API/SBTarget.cpp
@@ -646,7 +646,7 @@
     
     if (log)
     {
-        log->Printf ("SBTarget(%p)::BreakpointCreateByAddress (%p, address=%p) => SBBreakpoint(%p)", m_opaque_sp.get(), address, sb_bp.get());
+        log->Printf ("SBTarget(%p)::BreakpointCreateByAddress (address=%llu) => SBBreakpoint(%p)", m_opaque_sp.get(), (uint64_t) address, sb_bp.get());
     }
 
     return sb_bp;
diff --git a/source/API/SBThread.cpp b/source/API/SBThread.cpp
index 3f6a751..6b498c1 100644
--- a/source/API/SBThread.cpp
+++ b/source/API/SBThread.cpp
@@ -729,7 +729,7 @@
             if (all_in_function)
             {
                 step_file_spec.GetPath (path, sizeof(path));
-                sb_error.SetErrorStringWithFormat("No line entries for %s:u", path, line);
+                sb_error.SetErrorStringWithFormat("No line entries for %s:%u", path, line);
             }
             else
                 sb_error.SetErrorString ("Step until target not in current function.\n");
diff --git a/source/API/SBValue.cpp b/source/API/SBValue.cpp
index 6fba661..f190585 100644
--- a/source/API/SBValue.cpp
+++ b/source/API/SBValue.cpp
@@ -106,7 +106,7 @@
         if (name)
             log->Printf ("SBValue(%p)::GetName () => \"%s\"", m_opaque_sp.get(), name);
         else
-            log->Printf ("SBValue(%p)::GetName () => NULL", m_opaque_sp.get(), name);
+            log->Printf ("SBValue(%p)::GetName () => NULL", m_opaque_sp.get());
     }
 
     return name;
@@ -357,7 +357,7 @@
     if (log)
     {
         if (result.IsValid())
-            log->Printf ("SBValue(%p)::GetChildAtOffset => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp.get());
+            log->Printf ("SBValue(%p)::GetChildAtOffset => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp->GetName().AsCString());
         else
             log->Printf ("SBValue(%p)::GetChildAtOffset => NULL", m_opaque_sp.get());
     }
@@ -391,7 +391,7 @@
     if (log)
     {
         if (result.IsValid())
-            log->Printf ("SBValue(%p)::GetChildFromExpression => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp.get());
+            log->Printf ("SBValue(%p)::GetChildFromExpression => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp->GetName().AsCString());
         else
             log->Printf ("SBValue(%p)::GetChildFromExpression => NULL", m_opaque_sp.get());
     }
@@ -433,7 +433,7 @@
     if (log)
     {
         if (result.IsValid())
-            log->Printf ("SBValue(%p)::GetChildFromAddress => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp.get());
+            log->Printf ("SBValue(%p)::GetChildFromAddress => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp->GetName().AsCString());
         else
             log->Printf ("SBValue(%p)::GetChildFromAddress => NULL", m_opaque_sp.get());
     }
@@ -463,7 +463,7 @@
     if (log)
     {
         if (result.IsValid())
-            log->Printf ("SBValue(%p)::GetChildFromExpression => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp.get());
+            log->Printf ("SBValue(%p)::GetChildFromExpression => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp->GetName().AsCString());
         else
             log->Printf ("SBValue(%p)::GetChildFromExpression => NULL", m_opaque_sp.get());
     }
@@ -541,7 +541,7 @@
     if (log)
     {
         if (idx == UINT32_MAX)
-            log->Printf ("SBValue(%p)::GetIndexOfChildWithName (name=\"%s\") => NOT FOUND", m_opaque_sp.get(), name, idx);
+            log->Printf ("SBValue(%p)::GetIndexOfChildWithName (name=\"%s\") => NOT FOUND", m_opaque_sp.get(), name);
         else
             log->Printf ("SBValue(%p)::GetIndexOfChildWithName (name=\"%s\") => %u", m_opaque_sp.get(), name, idx);
     }