[Lldb-commits] [lldb] r109226 - in /lldb/trunk: include/lldb/Host/ include/lldb/Interpreter/ source/Core/ source/Host/macosx/cfcpp/ source/Plugins/Process/MacOSX-User/source/ source/Plugins/Process/MacOSX-User/source/MacOSX/ source/Plugins/Process/Utility/libunwind/src/ source/Symbol/ source/Target/

Greg Clayton gclayton at apple.com
Fri Jul 23 08:37:46 PDT 2010


Author: gclayton
Date: Fri Jul 23 10:37:46 2010
New Revision: 109226

URL: http://llvm.org/viewvc/llvm-project?rev=109226&view=rev
Log:
Warnings cleanup patch from Jean-Daniel Dupas.


Modified:
    lldb/trunk/include/lldb/Host/Predicate.h
    lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h
    lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
    lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp
    lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp
    lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
    lldb/trunk/source/Plugins/Process/Utility/libunwind/src/AssemblyParser.hpp
    lldb/trunk/source/Plugins/Process/Utility/libunwind/src/DwarfParser.hpp
    lldb/trunk/source/Plugins/Process/Utility/libunwind/src/RemoteProcInfo.hpp
    lldb/trunk/source/Plugins/Process/Utility/libunwind/src/RemoteRegisterMap.hpp
    lldb/trunk/source/Plugins/Process/Utility/libunwind/src/UnwindCursor.hpp
    lldb/trunk/source/Symbol/ClangASTContext.cpp
    lldb/trunk/source/Symbol/Type.cpp
    lldb/trunk/source/Target/Thread.cpp

Modified: lldb/trunk/include/lldb/Host/Predicate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Predicate.h?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Predicate.h (original)
+++ lldb/trunk/include/lldb/Host/Predicate.h Fri Jul 23 10:37:46 2010
@@ -262,7 +262,7 @@
 #ifdef DB_PTHREAD_LOG_EVENTS
         printf("%s (bits = 0x%8.8x, abstime = %p), m_value = 0x%8.8x", __FUNCTION__, bits, abstime, m_value);
 #endif
-        while (err == 0 && (m_value & bits != 0))
+        while (err == 0 && ((m_value & bits) != 0))
         {
             err = m_condition.Wait (m_mutex.GetMutex(), abstime);
         }

Modified: lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h Fri Jul 23 10:37:46 2010
@@ -52,7 +52,7 @@
     AddRegexCommand (const char *re_cstr, const char *command_cstr);
 
 protected:
-    typedef struct Entry
+    struct Entry
     {
         RegularExpression regex;
         std::string command;

Modified: lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConnectionFileDescriptor.cpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConnectionFileDescriptor.cpp (original)
+++ lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Fri Jul 23 10:37:46 2010
@@ -406,7 +406,7 @@
                                  "%p ConnectionFileDescriptor::SocketListen (port = %i)",
                                  this, listen_port_num);
 
-    Close (m_fd, false);
+    Close (m_fd, NULL);
     m_is_socket = true;
     int listen_port = ::socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
     if (listen_port == -1)
@@ -470,7 +470,7 @@
     lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION,
                                  "%p ConnectionFileDescriptor::SocketConnect (host/port = %s)",
                                  this, host_and_port);
-    Close (m_fd, false);
+    Close (m_fd, NULL);
     m_is_socket = true;
 
     RegularExpression regex ("([^:]+):([0-9]+)");
@@ -534,7 +534,7 @@
                 else
                     error_ptr->SetErrorStringWithFormat("Invalid host string: '%s'.\n", host_str.c_str());
             }
-            Close (m_fd, false);
+            Close (m_fd, NULL);
             return eConnectionStatusError;
         }
     }
@@ -543,7 +543,7 @@
     {
         if (error_ptr)
             error_ptr->SetErrorToErrno();
-        Close (m_fd, false);
+        Close (m_fd, NULL);
         return eConnectionStatusError;
     }
 

Modified: lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp (original)
+++ lldb/trunk/source/Host/macosx/cfcpp/CFCMutableSet.cpp Fri Jul 23 10:37:46 2010
@@ -84,7 +84,7 @@
     if (set == NULL)
     {
         if (can_create == false)
-            return false;
+            return NULL;
         set = ::CFSetCreateMutable(kCFAllocatorDefault, 0, &kCFTypeSetCallBacks);
         reset ( set );
     }

Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp Fri Jul 23 10:37:46 2010
@@ -39,9 +39,9 @@
     m_process (process),
     m_task (TASK_NULL),
     m_vm_memory (),
+    m_exc_port_info(),
     m_exception_thread (0),
-    m_exception_port (MACH_PORT_NULL),
-    m_exc_port_info()
+    m_exception_port (MACH_PORT_NULL)
 {
     memset(&m_exc_port_info, 0, sizeof(m_exc_port_info));
 

Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp Fri Jul 23 10:37:46 2010
@@ -219,9 +219,6 @@
 //----------------------------------------------------------------------
 ProcessMacOSX::ProcessMacOSX(Target& target, Listener &listener) :
     Process (target, listener),
-    m_dynamic_loader_ap (),
-//    m_wait_thread (LLDB_INVALID_HOST_THREAD),
-    m_byte_order (eByteOrderHost),
     m_stdio_ours (false),
     m_child_stdin (-1),
     m_child_stdout (-1),
@@ -233,7 +230,10 @@
     m_stdout_data (),
     m_exception_messages (),
     m_exception_messages_mutex (Mutex::eMutexTypeRecursive),
-    m_arch_spec ()
+    m_arch_spec (),
+    m_dynamic_loader_ap (),
+//    m_wait_thread (LLDB_INVALID_HOST_THREAD),
+    m_byte_order (eByteOrderHost)
 {
 }
 

Modified: lldb/trunk/source/Plugins/Process/Utility/libunwind/src/AssemblyParser.hpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/libunwind/src/AssemblyParser.hpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/libunwind/src/AssemblyParser.hpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/libunwind/src/AssemblyParser.hpp Fri Jul 23 10:37:46 2010
@@ -46,7 +46,7 @@
 public:
     enum { kMaxInstructionByteSize = 32 };
 
-    AssemblyParse_x86 (RemoteProcInfo& procinfo, unw_accessors_t *acc, unw_addr_space_t as, void *arg) : fArg(arg), fAccessors(acc), fAs(as), fRemoteProcInfo(procinfo) {
+    AssemblyParse_x86 (RemoteProcInfo& procinfo, unw_accessors_t *acc, unw_addr_space_t as, void *arg) : fArg(arg), fRemoteProcInfo(procinfo), fAccessors(acc), fAs(as) {
         fRegisterMap = fRemoteProcInfo.getRegisterMap();
         if (fRemoteProcInfo.getTargetArch() == UNW_TARGET_X86_64) {
             fStackPointerRegnum = UNW_X86_64_RSP;

Modified: lldb/trunk/source/Plugins/Process/Utility/libunwind/src/DwarfParser.hpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/libunwind/src/DwarfParser.hpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/libunwind/src/DwarfParser.hpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/libunwind/src/DwarfParser.hpp Fri Jul 23 10:37:46 2010
@@ -390,7 +390,7 @@
 		cieContentEnd = p + cieLength;
 	}
 	if ( cieLength == 0 ) 
-		return false;	
+		return NULL;	
 	// CIE ID is always 0
 	if ( addressSpace.get32(p) != 0 ) 
 		return "CIE ID is not zero";

Modified: lldb/trunk/source/Plugins/Process/Utility/libunwind/src/RemoteProcInfo.hpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/libunwind/src/RemoteProcInfo.hpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/libunwind/src/RemoteProcInfo.hpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/libunwind/src/RemoteProcInfo.hpp Fri Jul 23 10:37:46 2010
@@ -77,7 +77,7 @@
 
   RemoteMemoryBlob (uint8_t *buf, free_callback_with_arg to_free, 
                  uint64_t startaddr, uint64_t len, uint64_t mh, void *arg) : 
-                    fBuf(buf), fToFreeWithArg(to_free), fToFree(NULL), 
+                    fBuf(buf), fToFree(NULL), fToFreeWithArg(to_free),
                     fStartAddr(startaddr), fLen(len), fMachHeader(mh),
                     fArg(arg) { }
   RemoteMemoryBlob (uint8_t *buf, free_callback to_free, uint64_t startaddr, 
@@ -88,9 +88,9 @@
 
   // the following is to create a dummy RMB object for lower_bound's use in
   // searching.
-  RemoteMemoryBlob (uint64_t startaddr) : fStartAddr(startaddr), fToFree(NULL),
-                    fBuf(NULL), fToFreeWithArg(NULL), fArg(NULL), fMachHeader(-1),
-                    fLen(0) { }
+  RemoteMemoryBlob (uint64_t startaddr) : fBuf(NULL), fToFree(NULL),
+                    fToFreeWithArg(NULL), fStartAddr(startaddr), fLen(0),
+                    fMachHeader(-1), fArg(NULL) { }
   ~RemoteMemoryBlob () {
     if (fToFreeWithArg)
       fToFreeWithArg(fBuf, fArg);
@@ -417,7 +417,7 @@
         img = &i->second;
       }
     else
-      return false;
+      return NULL;
     std::map<uint64_t, RemoteUnwindProfile *>::iterator j;
     j = img->profiles.lower_bound (pc);
     if (j == img->profiles.begin() && j == img->profiles.end())

Modified: lldb/trunk/source/Plugins/Process/Utility/libunwind/src/RemoteRegisterMap.hpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/libunwind/src/RemoteRegisterMap.hpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/libunwind/src/RemoteRegisterMap.hpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/libunwind/src/RemoteRegisterMap.hpp Fri Jul 23 10:37:46 2010
@@ -65,8 +65,8 @@
         int machine_regno;   // What the actual bits/bytes are in instructions
         char *name;
         unw_regtype_t type;
-        reg () : unwind_regno(-1), machine_regno(-1), caller_regno(-1), 
-                 eh_frame_regno(-1), name(NULL), type(UNW_NOT_A_REG) { }
+        reg () : unwind_regno(-1), caller_regno(-1), eh_frame_regno(-1),
+                 machine_regno(-1), name(NULL), type(UNW_NOT_A_REG) { }
     };
 
     unw_accessors_t fAccessors;

Modified: lldb/trunk/source/Plugins/Process/Utility/libunwind/src/UnwindCursor.hpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/libunwind/src/UnwindCursor.hpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/libunwind/src/UnwindCursor.hpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/libunwind/src/UnwindCursor.hpp Fri Jul 23 10:37:46 2010
@@ -933,7 +933,7 @@
 
 template <typename A, typename R>
 RemoteUnwindCursor<A,R>::RemoteUnwindCursor(A& as, unw_context_t* regs, void* arg)
-   : UnwindCursor<A,R>::UnwindCursor(regs, as), fIsFirstFrame (false), fIsLeafFrame(false), fArg(arg)
+   : UnwindCursor<A,R>::UnwindCursor(regs, as), fIsLeafFrame(false), fIsFirstFrame (false), fArg(arg)
 {
     COMPILE_TIME_ASSERT( sizeof(RemoteUnwindCursor<A,R>) < sizeof(unw_cursor_t) );
 }

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Jul 23 10:37:46 2010
@@ -1428,7 +1428,7 @@
             break;
         }
     }
-    return false;
+    return NULL;
 }
 
 static inline bool

Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Fri Jul 23 10:37:46 2010
@@ -599,7 +599,7 @@
 )
 {
     if (!ResolveClangType())
-        return false;
+        return NULL;
 
     std::string name_str;
     void *child_qual_type = GetClangASTContext().GetChildClangTypeAtIndex (

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=109226&r1=109225&r2=109226&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Fri Jul 23 10:37:46 2010
@@ -938,7 +938,7 @@
     {
         thread_plan_sp.reset(new ThreadPlanStepThrough (*this, stop_other_threads));
         if (thread_plan_sp && !thread_plan_sp->ValidatePlan (NULL))
-            return false;
+            return NULL;
     }
     QueueThreadPlan (thread_plan_sp, abort_other_plans);
     return thread_plan_sp.get();





More information about the lldb-commits mailing list