[Lldb-commits] [lldb] r160674 - in /lldb/branches/apple/python-GIL: ./ source/Symbol/Symbol.cpp tools/debugserver/source/MacOSX/MachProcess.cpp tools/debugserver/source/RNBServices.cpp

Filipe Cabecinhas me at filcab.net
Tue Jul 24 07:37:09 PDT 2012


Author: filcab
Date: Tue Jul 24 09:37:09 2012
New Revision: 160674

URL: http://llvm.org/viewvc/llvm-project?rev=160674&view=rev
Log:
Merge changes from ToT trunk.

Modified:
    lldb/branches/apple/python-GIL/   (props changed)
    lldb/branches/apple/python-GIL/source/Symbol/Symbol.cpp
    lldb/branches/apple/python-GIL/tools/debugserver/source/MacOSX/MachProcess.cpp
    lldb/branches/apple/python-GIL/tools/debugserver/source/RNBServices.cpp

Propchange: lldb/branches/apple/python-GIL/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 24 09:37:09 2012
@@ -1 +1 @@
-/lldb/trunk:156467-160596
+/lldb/trunk:156467-160656

Modified: lldb/branches/apple/python-GIL/source/Symbol/Symbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Symbol/Symbol.cpp?rev=160674&r1=160673&r2=160674&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Symbol/Symbol.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Symbol/Symbol.cpp Tue Jul 24 09:37:09 2012
@@ -277,6 +277,12 @@
                                                                         sc))
             {
                 m_type_data = sc.line_entry.range.GetByteSize();
+                // Sanity check - this may be a function in the middle of code that has debug information, but
+                // not for this symbol.  So the line entries surrounding us won't lie inside our function.
+                // In that case, the line entry will be bigger than we are, so we do that quick check and
+                // if that is true, we just return 0.
+                if (m_type_data >= m_addr_range.GetByteSize())
+                    m_type_data = 0;
             }
             else
             {

Modified: lldb/branches/apple/python-GIL/tools/debugserver/source/MacOSX/MachProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/tools/debugserver/source/MacOSX/MachProcess.cpp?rev=160674&r1=160673&r2=160674&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/tools/debugserver/source/MacOSX/MachProcess.cpp (original)
+++ lldb/branches/apple/python-GIL/tools/debugserver/source/MacOSX/MachProcess.cpp Tue Jul 24 09:37:09 2012
@@ -49,28 +49,8 @@
 static bool
 IsSBProcess (nub_process_t pid)
 {
-    bool opt_runningApps = true;
-    bool opt_debuggable = false;
-
-    CFReleaser<CFArrayRef> sbsAppIDs (::SBSCopyApplicationDisplayIdentifiers (opt_runningApps, opt_debuggable));
-    if (sbsAppIDs.get() != NULL)
-    {
-        CFIndex count = ::CFArrayGetCount (sbsAppIDs.get());
-        CFIndex i = 0;
-        for (i = 0; i < count; i++)
-        {
-            CFStringRef displayIdentifier = (CFStringRef)::CFArrayGetValueAtIndex (sbsAppIDs.get(), i);
-
-            // Get the process id for the app (if there is one)
-            pid_t sbs_pid = INVALID_NUB_PROCESS;
-            if (::SBSProcessIDForDisplayIdentifier ((CFStringRef)displayIdentifier, &sbs_pid) == TRUE)
-            {
-                if (sbs_pid == pid)
-                    return true;
-            }
-        }
-    }
-    return false;
+    CFReleaser<CFArrayRef> appIdsForPID (::SBSCopyDisplayIdentifiersForProcessID(pid));
+    return appIdsForPID.get() != NULL;
 }
 
 #endif

Modified: lldb/branches/apple/python-GIL/tools/debugserver/source/RNBServices.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/tools/debugserver/source/RNBServices.cpp?rev=160674&r1=160673&r2=160674&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/tools/debugserver/source/RNBServices.cpp (original)
+++ lldb/branches/apple/python-GIL/tools/debugserver/source/RNBServices.cpp Tue Jul 24 09:37:09 2012
@@ -120,28 +120,10 @@
 IsSBProcess (nub_process_t pid)
 {
 #ifdef WITH_SPRINGBOARD
-    bool opt_runningApps = true;
-    bool opt_debuggable = false;
-
-    CFReleaser<CFArrayRef> sbsAppIDs (::SBSCopyApplicationDisplayIdentifiers (opt_runningApps, opt_debuggable));
-    if (sbsAppIDs.get() != NULL)
-    {
-        CFIndex count = ::CFArrayGetCount (sbsAppIDs.get());
-        CFIndex i = 0;
-        for (i = 0; i < count; i++)
-        {
-            CFStringRef displayIdentifier = (CFStringRef)::CFArrayGetValueAtIndex (sbsAppIDs.get(), i);
-
-            // Get the process id for the app (if there is one)
-            pid_t sbs_pid = INVALID_NUB_PROCESS;
-            if (::SBSProcessIDForDisplayIdentifier ((CFStringRef)displayIdentifier, &sbs_pid) == TRUE)
-            {
-                if (sbs_pid == pid)
-                    return true;
-            }
-        }
-    }
-#endif
+    CFReleaser<CFArrayRef> appIdsForPID (::SBSCopyDisplayIdentifiersForProcessID(pid));
+    return appIdsForPID.get() != NULL;
+#else
     return false;
+#endif
 }
 





More information about the lldb-commits mailing list