[Lldb-commits] [lldb] r145644 - in /lldb/trunk: include/lldb/ include/lldb/Target/ include/lldb/Utility/ source/API/ source/Breakpoint/ source/Commands/ source/Core/ source/Host/macosx/ source/Plugins/Process/gdb-remote/ source/Target/ tools/driver/

Greg Clayton gclayton at apple.com
Thu Dec 1 15:28:38 PST 2011


Author: gclayton
Date: Thu Dec  1 17:28:38 2011
New Revision: 145644

URL: http://llvm.org/viewvc/llvm-project?rev=145644&view=rev
Log:
Process IDs (lldb::pid_t) and thread IDs (lldb::tid_t) are now 64 bit. This 
will allow us to represent a process/thread ID using a pointer for the OS
plug-ins where they might want to represent the process or thread ID using
the address of the process or thread structure.


Modified:
    lldb/trunk/include/lldb/Target/ThreadList.h
    lldb/trunk/include/lldb/Utility/PseudoTerminal.h
    lldb/trunk/include/lldb/lldb-types.h
    lldb/trunk/source/API/SBBreakpoint.cpp
    lldb/trunk/source/API/SBProcess.cpp
    lldb/trunk/source/API/SBThread.cpp
    lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
    lldb/trunk/source/Commands/CommandObjectPlatform.cpp
    lldb/trunk/source/Commands/CommandObjectTarget.cpp
    lldb/trunk/source/Core/Log.cpp
    lldb/trunk/source/Host/macosx/Host.mm
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/trunk/source/Target/Process.cpp
    lldb/trunk/source/Target/ThreadSpec.cpp
    lldb/trunk/tools/driver/Driver.cpp

Modified: lldb/trunk/include/lldb/Target/ThreadList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadList.h?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadList.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadList.h Thu Dec  1 17:28:38 2011
@@ -69,7 +69,7 @@
     FindThreadByID (lldb::tid_t tid, bool can_update = true);
 
     lldb::ThreadSP
-    FindThreadByIndexID (lldb::tid_t index_id, bool can_update = true);
+    FindThreadByIndexID (uint32_t index_id, bool can_update = true);
 
     lldb::ThreadSP
     GetThreadSPForThreadPtr (Thread *thread_ptr);

Modified: lldb/trunk/include/lldb/Utility/PseudoTerminal.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/PseudoTerminal.h?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/PseudoTerminal.h (original)
+++ lldb/trunk/include/lldb/Utility/PseudoTerminal.h Thu Dec  1 17:28:38 2011
@@ -92,7 +92,7 @@
     ///         than zero, or -1 if the fork fails.
     ///     @li \b Child process: zero.
     //------------------------------------------------------------------
-    pid_t
+    lldb::pid_t
     Fork (char *error_str, size_t error_len);
 
     //------------------------------------------------------------------

Modified: lldb/trunk/include/lldb/lldb-types.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-types.h?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-types.h (original)
+++ lldb/trunk/include/lldb/lldb-types.h Thu Dec  1 17:28:38 2011
@@ -97,8 +97,8 @@
 {
     typedef uint64_t    addr_t;
     typedef uint64_t    user_id_t;
-    typedef int32_t     pid_t;
-    typedef uint32_t    tid_t;
+    typedef uint64_t    pid_t;
+    typedef uint64_t    tid_t;
     typedef int32_t     break_id_t;
     typedef int32_t     watch_id_t;
     typedef void *      clang_type_t;

Modified: lldb/trunk/source/API/SBBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpoint.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpoint.cpp (original)
+++ lldb/trunk/source/API/SBBreakpoint.cpp Thu Dec  1 17:28:38 2011
@@ -316,7 +316,7 @@
     }
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
-        log->Printf ("SBBreakpoint(%p)::SetThreadID (tid=0x%4.4x)", m_opaque_sp.get(), tid);
+        log->Printf ("SBBreakpoint(%p)::SetThreadID (tid=0x%4.4llx)", m_opaque_sp.get(), tid);
 
 }
 
@@ -332,7 +332,7 @@
 
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
-        log->Printf ("SBBreakpoint(%p)::GetThreadID () => 0x%4.4x", m_opaque_sp.get(), tid);
+        log->Printf ("SBBreakpoint(%p)::GetThreadID () => 0x%4.4llx", m_opaque_sp.get(), tid);
     return tid;
 }
 

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Thu Dec  1 17:28:38 2011
@@ -187,7 +187,7 @@
     if (log) {
         SBStream sstr;
         error.GetDescription (sstr);
-        log->Printf ("SBProcess(%p)::RemoteAttachToProcessWithID (%d) => SBError (%p): %s", m_opaque_sp.get(), pid, error.get(), sstr.GetData());
+        log->Printf ("SBProcess(%p)::RemoteAttachToProcessWithID (%llu) => SBError (%p): %s", m_opaque_sp.get(), pid, error.get(), sstr.GetData());
     }
 
     return error.Success();
@@ -459,7 +459,7 @@
 
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
-        log->Printf ("SBProcess(%p)::GetProcessID () => %d", m_opaque_sp.get(), ret_val);
+        log->Printf ("SBProcess(%p)::GetProcessID () => %llu", m_opaque_sp.get(), ret_val);
 
     return ret_val;
 }
@@ -662,7 +662,7 @@
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
     {
-        log->Printf ("SBProcess(%p)::GetThreadByID (tid=0x%4.4x) => SBThread (%p)", 
+        log->Printf ("SBProcess(%p)::GetThreadByID (tid=0x%4.4llx) => SBThread (%p)", 
                      m_opaque_sp.get(), 
                      tid,
                      sb_thread.get());

Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Thu Dec  1 17:28:38 2011
@@ -333,7 +333,7 @@
         tid = m_opaque_sp->GetID();
 
     if (log)
-        log->Printf ("SBThread(%p)::GetThreadID () => 0x%4.4x", m_opaque_sp.get(), tid);
+        log->Printf ("SBThread(%p)::GetThreadID () => 0x%4.4llx", m_opaque_sp.get(), tid);
 
     return tid;
 }

Modified: lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocation.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocation.cpp Thu Dec  1 17:28:38 2011
@@ -412,7 +412,7 @@
     if (s == NULL)
         return;
 
-    s->Printf("BreakpointLocation %u: tid = %4.4x  load addr = 0x%8.8llx  state = %s  type = %s breakpoint  "
+    s->Printf("BreakpointLocation %u: tid = %4.4llx  load addr = 0x%8.8llx  state = %s  type = %s breakpoint  "
               "hw_index = %i  hit_count = %-4u  ignore_count = %-4u",
             GetID(),
             GetOptionsNoCreate()->GetThreadSpecNoCreate()->GetTID(),

Modified: lldb/trunk/source/Commands/CommandObjectPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectPlatform.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectPlatform.cpp Thu Dec  1 17:28:38 2011
@@ -512,7 +512,7 @@
                         }
                         else
                         {
-                            result.AppendErrorWithFormat ("no process found with pid = %i\n", pid);
+                            result.AppendErrorWithFormat ("no process found with pid = %llu\n", pid);
                             result.SetStatus (eReturnStatusFailed);
                         }
                     }
@@ -796,12 +796,12 @@
                             ProcessInstanceInfo proc_info;
                             if (platform_sp->GetProcessInfo (pid, proc_info))
                             {
-                                ostrm.Printf ("Process information for process %i:\n", pid);
+                                ostrm.Printf ("Process information for process %llu:\n", pid);
                                 proc_info.Dump (ostrm, platform_sp.get());
                             }
                             else
                             {
-                                ostrm.Printf ("error: no process information is available for process %i\n", pid);
+                                ostrm.Printf ("error: no process information is available for process %llu\n", pid);
                             }
                             ostrm.EOL();
                         }

Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Thu Dec  1 17:28:38 2011
@@ -85,7 +85,7 @@
             show_process_status = StateIsStoppedState(state, true);
         const char *state_cstr = StateAsCString (state);
         if (pid != LLDB_INVALID_PROCESS_ID)
-            strm.Printf ("%spid=%i", properties++ > 0 ? ", " : " ( ", pid);
+            strm.Printf ("%spid=%llu", properties++ > 0 ? ", " : " ( ", pid);
         strm.Printf ("%sstate=%s", properties++ > 0 ? ", " : " ( ", state_cstr);
     }
     if (properties > 0)

Modified: lldb/trunk/source/Core/Log.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Log.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/Core/Log.cpp (original)
+++ lldb/trunk/source/Core/Log.cpp Thu Dec  1 17:28:38 2011
@@ -105,7 +105,7 @@
 
         // Add the process and thread if requested
         if (m_options.Test (LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD))
-            header.Printf ("[%4.4x/%4.4x]: ", getpid(), Host::GetCurrentThreadID());
+            header.Printf ("[%4.4x/%4.4llx]: ", getpid(), Host::GetCurrentThreadID());
 
         // Add the process and thread if requested
         if (m_options.Test (LLDB_LOG_OPTION_PREPEND_THREAD_NAME))

Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Thu Dec  1 17:28:38 2011
@@ -1306,7 +1306,7 @@
     }
     
 #endif
-    lldb::pid_t pid = LLDB_INVALID_PROCESS_ID;
+    ::pid_t pid = LLDB_INVALID_PROCESS_ID;
     const char *tmp_argv[2];
     char * const *argv = (char * const*)launch_info.GetArguments().GetConstArgumentVector();
     char * const *envp = (char * const*)launch_info.GetEnvironmentEntries().GetConstArgumentVector();
@@ -1493,7 +1493,7 @@
                 }
 
                 if (log)
-                    log->Printf ("::waitpid (pid = %i, &status, 0) => pid = %i, status = 0x%8.8x (%s), signal = %i, exit_status = %i",
+                    log->Printf ("::waitpid (pid = %llu, &status, 0) => pid = %i, status = 0x%8.8x (%s), signal = %i, exit_status = %i",
                                  pid,
                                  wait_pid,
                                  status,

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu Dec  1 17:28:38 2011
@@ -1019,7 +1019,7 @@
     if (pid != LLDB_INVALID_PROCESS_ID)
     {
         char packet[64];
-        const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%x", pid);
+        const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%llx", pid);
         assert (packet_len < sizeof(packet));
         if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
         {
@@ -1334,7 +1334,7 @@
     if (m_supports_qProcessInfoPID)
     {
         char packet[32];
-        const int packet_len = ::snprintf (packet, sizeof (packet), "qProcessInfoPID:%i", pid);
+        const int packet_len = ::snprintf (packet, sizeof (packet), "qProcessInfoPID:%llu", pid);
         assert (packet_len < sizeof(packet));
         StringExtractorGDBRemote response;
         if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
@@ -1404,9 +1404,9 @@
             }
             
             if (match_info.GetProcessInfo().ProcessIDIsValid())
-                packet.Printf("pid:%u;",match_info.GetProcessInfo().GetProcessID());
+                packet.Printf("pid:%llu;",match_info.GetProcessInfo().GetProcessID());
             if (match_info.GetProcessInfo().ParentProcessIDIsValid())
-                packet.Printf("parent_pid:%u;",match_info.GetProcessInfo().GetParentProcessID());
+                packet.Printf("parent_pid:%llu;",match_info.GetProcessInfo().GetParentProcessID());
             if (match_info.GetProcessInfo().UserIDIsValid())
                 packet.Printf("uid:%u;",match_info.GetProcessInfo().GetUserID());
             if (match_info.GetProcessInfo().GroupIDIsValid())

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp Thu Dec  1 17:28:38 2011
@@ -275,7 +275,7 @@
 static void
 CreateProcessInfoResponse (const ProcessInstanceInfo &proc_info, StreamString &response)
 {
-    response.Printf ("pid:%i;ppid:%i;uid:%i;gid:%i;euid:%i;egid:%i;", 
+    response.Printf ("pid:%llu;ppid:%llu;uid:%i;gid:%i;euid:%i;egid:%i;", 
                      proc_info.GetProcessID(),
                      proc_info.GetParentProcessID(),
                      proc_info.GetUserID(),
@@ -641,7 +641,7 @@
 {
     lldb::pid_t pid = m_process_launch_info.GetProcessID();
     StreamString response;
-    response.Printf("QC%x", pid);
+    response.Printf("QC%llx", pid);
     if (m_is_platform)
     {
         // If we launch a process and this GDB server is acting as a platform, 
@@ -707,7 +707,7 @@
                         {
                             uint16_t port = (intptr_t)accept_thread_result;
                             char response[256];
-                            const int response_len = ::snprintf (response, sizeof(response), "pid:%u;port:%u;", debugserver_pid, port);
+                            const int response_len = ::snprintf (response, sizeof(response), "pid:%llu;port:%u;", debugserver_pid, port);
                             assert (response_len < sizeof(response));
                             //m_port_to_pid_map[port] = debugserver_launch_info.GetProcessID();
                             success = SendPacket (response, response_len) > 0;

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Dec  1 17:28:38 2011
@@ -408,10 +408,10 @@
                 SetPrivateState (state);
             }
             else
-                error.SetErrorStringWithFormat ("Process %i was reported after connecting to '%s', but state was not stopped: %s", pid, remote_url, StateAsCString (state));
+                error.SetErrorStringWithFormat ("Process %llu was reported after connecting to '%s', but state was not stopped: %s", pid, remote_url, StateAsCString (state));
         }
         else
-            error.SetErrorStringWithFormat ("Process %i was reported after connecting to '%s', but no stop reply packet was received", pid, remote_url);
+            error.SetErrorStringWithFormat ("Process %llu was reported after connecting to '%s', but no stop reply packet was received", pid, remote_url);
     }
     return error;
 }
@@ -772,7 +772,7 @@
         if (error.Success())
         {
             char packet[64];
-            const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%x", attach_pid);
+            const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%llx", attach_pid);
             SetID (attach_pid);            
             m_async_broadcaster.BroadcastEvent (eBroadcastBitAsyncContinue, new EventDataBytes (packet, packet_len));
         }
@@ -890,7 +890,7 @@
                 if (m_gdb_comm.GetVContSupported ('c'))
                 {
                     for (tid_collection::const_iterator t_pos = m_continue_c_tids.begin(), t_end = m_continue_c_tids.end(); t_pos != t_end; ++t_pos)
-                        continue_packet.Printf(";c:%4.4x", *t_pos);
+                        continue_packet.Printf(";c:%4.4llx", *t_pos);
                 }
                 else 
                     continue_packet_error = true;
@@ -901,7 +901,7 @@
                 if (m_gdb_comm.GetVContSupported ('C'))
                 {
                     for (tid_sig_collection::const_iterator s_pos = m_continue_C_tids.begin(), s_end = m_continue_C_tids.end(); s_pos != s_end; ++s_pos)
-                        continue_packet.Printf(";C%2.2x:%4.4x", s_pos->second, s_pos->first);
+                        continue_packet.Printf(";C%2.2x:%4.4llx", s_pos->second, s_pos->first);
                 }
                 else 
                     continue_packet_error = true;
@@ -912,7 +912,7 @@
                 if (m_gdb_comm.GetVContSupported ('s'))
                 {
                     for (tid_collection::const_iterator t_pos = m_continue_s_tids.begin(), t_end = m_continue_s_tids.end(); t_pos != t_end; ++t_pos)
-                        continue_packet.Printf(";s:%4.4x", *t_pos);
+                        continue_packet.Printf(";s:%4.4llx", *t_pos);
                 }
                 else 
                     continue_packet_error = true;
@@ -923,7 +923,7 @@
                 if (m_gdb_comm.GetVContSupported ('S'))
                 {
                     for (tid_sig_collection::const_iterator s_pos = m_continue_S_tids.begin(), s_end = m_continue_S_tids.end(); s_pos != s_end; ++s_pos)
-                        continue_packet.Printf(";S%2.2x:%4.4x", s_pos->second, s_pos->first);
+                        continue_packet.Printf(";S%2.2x:%4.4llx", s_pos->second, s_pos->first);
                 }
                 else
                     continue_packet_error = true;
@@ -2131,7 +2131,7 @@
                 m_debugserver_pid = LLDB_INVALID_PROCESS_ID;
 
             if (error.Fail() || log)
-                error.PutToLog(log.get(), "Host::LaunchProcess (launch_info) => pid=%i, path='%s'", m_debugserver_pid, debugserver_path);
+                error.PutToLog(log.get(), "Host::LaunchProcess (launch_info) => pid=%llu, path='%s'", m_debugserver_pid, debugserver_path);
         }
         else
         {
@@ -2176,7 +2176,7 @@
     TargetSP target_sp (Debugger::FindTargetWithProcess(process));
 
     if (log)
-        log->Printf ("ProcessGDBRemote::MonitorDebugserverProcess (baton=%p, pid=%i, signo=%i (0x%x), exit_status=%i)", callback_baton, debugserver_pid, signo, signo, exit_status);
+        log->Printf ("ProcessGDBRemote::MonitorDebugserverProcess (baton=%p, pid=%llu, signo=%i (0x%x), exit_status=%i)", callback_baton, debugserver_pid, signo, signo, exit_status);
 
     if (target_sp)
     {

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu Dec  1 17:28:38 2011
@@ -45,10 +45,10 @@
 {
     const char *cstr;
     if (m_pid != LLDB_INVALID_PROCESS_ID)       
-        s.Printf ("    pid = %i\n", m_pid);
+        s.Printf ("    pid = %llu\n", m_pid);
 
     if (m_parent_pid != LLDB_INVALID_PROCESS_ID)
-        s.Printf (" parent = %i\n", m_parent_pid);
+        s.Printf (" parent = %llu\n", m_parent_pid);
 
     if (m_executable)
     {
@@ -135,7 +135,7 @@
     if (m_pid != LLDB_INVALID_PROCESS_ID)
     {
         const char *cstr;
-        s.Printf ("%-6u %-6u ", m_pid, m_parent_pid);
+        s.Printf ("%-6llu %-6llu ", m_pid, m_parent_pid);
 
     
         if (verbose)
@@ -1163,7 +1163,7 @@
 {
     LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_PROCESS));
     if (log)
-        log->Printf ("Process::SetProcessExitStatus (baton=%p, pid=%i, exited=%i, signal=%i, exit_status=%i)\n", 
+        log->Printf ("Process::SetProcessExitStatus (baton=%p, pid=%llu, exited=%i, signal=%i, exit_status=%i)\n", 
                      callback_baton,
                      pid,
                      exited,
@@ -3208,8 +3208,8 @@
     if (m_state == eStateStopped && ! m_restarted)
     {        
         ThreadList &curr_thread_list = m_process_sp->GetThreadList();
-        int num_threads = curr_thread_list.GetSize();
-        int idx;
+        uint32_t num_threads = curr_thread_list.GetSize();
+        uint32_t idx;
 
         // The actions might change one of the thread's stop_info's opinions about whether we should
         // stop the process, so we need to query that as we go.
@@ -3219,7 +3219,7 @@
         // that would cause our iteration here to crash.  We could make a copy of the thread list, but we'd really like
         // to also know if it has changed at all, so we make up a vector of the thread ID's and check what we get back 
         // against this list & bag out if anything differs.
-        std::vector<lldb::tid_t> thread_index_array(num_threads);
+        std::vector<uint32_t> thread_index_array(num_threads);
         for (idx = 0; idx < num_threads; ++idx)
             thread_index_array[idx] = curr_thread_list.GetThreadAtIndex(idx)->GetIndexID();
         
@@ -3232,7 +3232,7 @@
             {
                 lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP | LIBLLDB_LOG_PROCESS));
                 if (log)
-                    log->Printf("Number of threads changed from %d to %d while processing event.", num_threads, curr_thread_list.GetSize());
+                    log->Printf("Number of threads changed from %u to %u while processing event.", num_threads, curr_thread_list.GetSize());
                 break;
             }
             
@@ -3242,7 +3242,7 @@
             {
                 lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP | LIBLLDB_LOG_PROCESS));
                 if (log)
-                    log->Printf("The thread at position %d changed from %d  to %d while processing event.", 
+                    log->Printf("The thread at position %u changed from %u to %u while processing event.", 
                                 idx, 
                                 thread_index_array[idx],
                                 thread_sp->GetIndexID());

Modified: lldb/trunk/source/Target/ThreadSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadSpec.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadSpec.cpp (original)
+++ lldb/trunk/source/Target/ThreadSpec.cpp Thu Dec  1 17:28:38 2011
@@ -104,7 +104,7 @@
         else
         {
             if (GetTID() != LLDB_INVALID_THREAD_ID)
-                s->Printf("tid: 0x%x ", GetTID());
+                s->Printf("tid: 0x%llx ", GetTID());
                 
             if (GetIndex() != UINT32_MAX)
                 s->Printf("index: %d ", GetIndex());

Modified: lldb/trunk/tools/driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=145644&r1=145643&r2=145644&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.cpp (original)
+++ lldb/trunk/tools/driver/Driver.cpp Thu Dec  1 17:28:38 2011
@@ -865,7 +865,7 @@
         case eStateDetached:
             {
                 char message[1024];
-                int message_len = ::snprintf (message, sizeof(message), "Process %d %s\n", process.GetProcessID(),
+                int message_len = ::snprintf (message, sizeof(message), "Process %llu %s\n", process.GetProcessID(),
                                               m_debugger.StateAsCString (event_state));
                 m_io_channel_ap->OutWrite(message, message_len, ASYNC);
             }
@@ -892,7 +892,7 @@
             {
                 // FIXME: Do we want to report this, or would that just be annoyingly chatty?
                 char message[1024];
-                int message_len = ::snprintf (message, sizeof(message), "Process %d stopped and was programmatically restarted.\n",
+                int message_len = ::snprintf (message, sizeof(message), "Process %llu stopped and was programmatically restarted.\n",
                                               process.GetProcessID());
                 m_io_channel_ap->OutWrite(message, message_len, ASYNC);
             }
@@ -1293,7 +1293,7 @@
                 {
                     command_str.append("-p ");
                     char pid_buffer[32];
-                    ::snprintf (pid_buffer, sizeof(pid_buffer), "%d", m_option_data.m_process_pid);
+                    ::snprintf (pid_buffer, sizeof(pid_buffer), "%llu", m_option_data.m_process_pid);
                     command_str.append(pid_buffer);
                 }
                 else 





More information about the lldb-commits mailing list