summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/RNBServices.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-03-29 18:54:20 +0000
committerJason Molenda <jmolenda@apple.com>2014-03-29 18:54:20 +0000
commita332978b2ab53306acdef10858c7e954e605ab37 (patch)
treedb0802288ce9a50156d440b82ae606eae60cf129 /lldb/tools/debugserver/source/RNBServices.cpp
parent61e595be4dcd9e63bc3a2b6787ffb647457969cd (diff)
downloadbcm5719-llvm-a332978b2ab53306acdef10858c7e954e605ab37.tar.gz
bcm5719-llvm-a332978b2ab53306acdef10858c7e954e605ab37.zip
lldb arm64 import.
These changes were written by Greg Clayton, Jim Ingham, Jason Molenda. It builds cleanly against TOT llvm with xcodebuild. I updated the cmake files by visual inspection but did not try a build. I haven't built these sources on any non-Mac platforms - I don't think this patch adds any code that requires darwin, but please let me know if I missed something. In debugserver, MachProcess.cpp and MachTask.cpp were renamed to MachProcess.mm and MachTask.mm as they picked up some new Objective-C code needed to launch processes when running on iOS. llvm-svn: 205113
Diffstat (limited to 'lldb/tools/debugserver/source/RNBServices.cpp')
-rw-r--r--lldb/tools/debugserver/source/RNBServices.cpp28
1 files changed, 8 insertions, 20 deletions
diff --git a/lldb/tools/debugserver/source/RNBServices.cpp b/lldb/tools/debugserver/source/RNBServices.cpp
index 6eb16b07c14..9d76209feb7 100644
--- a/lldb/tools/debugserver/source/RNBServices.cpp
+++ b/lldb/tools/debugserver/source/RNBServices.cpp
@@ -22,7 +22,9 @@
#import "DNBLog.h"
#include "MacOSX/CFUtils.h"
-#ifdef WITH_SPRINGBOARD
+// For now only SpringBoard has a notion of "Applications" that it can list for us.
+// So we have to use the SpringBoard API's here.
+#if defined (WITH_SPRINGBOARD) || defined (WITH_BKS)
#import <SpringBoardServices/SpringBoardServices.h>
#endif
@@ -30,7 +32,7 @@
size_t GetAllInfos (std::vector<struct kinfo_proc>& proc_infos);
int
-GetPrcoesses (CFMutableArrayRef plistMutableArray, bool all_users)
+GetProcesses (CFMutableArrayRef plistMutableArray, bool all_users)
{
if (plistMutableArray == NULL)
return -1;
@@ -130,13 +132,12 @@ ListApplications(std::string& plist, bool opt_runningApps, bool opt_debuggable)
const uid_t our_uid = getuid();
-#ifdef WITH_SPRINGBOARD
-
+#if defined (WITH_SPRINGBOARD) || defined (WITH_BKS)
if (our_uid == 0)
{
bool all_users = true;
- result = GetPrcoesses (plistMutableArray.get(), all_users);
+ result = GetProcesses (plistMutableArray.get(), all_users);
}
else
{
@@ -190,10 +191,10 @@ ListApplications(std::string& plist, bool opt_runningApps, bool opt_debuggable)
::CFArrayAppendValue (plistMutableArray.get(), appInfoDict.get());
}
}
-#else
+#else // #if defined (WITH_SPRINGBOARD) || defined (WITH_BKS)
// When root, show all processes
bool all_users = (our_uid == 0);
- result = GetPrcoesses (plistMutableArray.get(), all_users);
+ result = GetProcesses (plistMutableArray.get(), all_users);
#endif
CFReleaser<CFDataRef> plistData (::CFPropertyListCreateXMLData (alloc, plistMutableArray.get()));
@@ -223,16 +224,3 @@ ListApplications(std::string& plist, bool opt_runningApps, bool opt_debuggable)
return result;
}
-
-
-bool
-IsSBProcess (nub_process_t pid)
-{
-#ifdef WITH_SPRINGBOARD
- CFReleaser<CFArrayRef> appIdsForPID (::SBSCopyDisplayIdentifiersForProcessID(pid));
- return appIdsForPID.get() != NULL;
-#else
- return false;
-#endif
-}
-
OpenPOWER on IntegriCloud