diff options
author | Jason Molenda <jmolenda@apple.com> | 2014-03-29 18:54:20 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2014-03-29 18:54:20 +0000 |
commit | a332978b2ab53306acdef10858c7e954e605ab37 (patch) | |
tree | db0802288ce9a50156d440b82ae606eae60cf129 /lldb/tools/debugserver/source/MacOSX/MachProcess.h | |
parent | 61e595be4dcd9e63bc3a2b6787ffb647457969cd (diff) | |
download | bcm5719-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/MacOSX/MachProcess.h')
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachProcess.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.h b/lldb/tools/debugserver/source/MacOSX/MachProcess.h index 5fa5dbdcfc7..c98700c0fc5 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachProcess.h +++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.h @@ -55,7 +55,8 @@ public: const char *stderr_path, bool no_stdio, nub_launch_flavor_t launch_flavor, - int disable_aslr, + int disable_aslr, + const char *event_data, DNBError &err); static uint32_t GetCPUTypeForLocalProcess (pid_t pid); @@ -76,8 +77,14 @@ public: static const void * PrepareForAttach (const char *path, nub_launch_flavor_t launch_flavor, bool waitfor, DNBError &err_str); static void CleanupAfterAttach (const void *attach_token, bool success, DNBError &err_str); static nub_process_t CheckForProcess (const void *attach_token); +#ifdef WITH_BKS + pid_t BKSLaunchForDebug (const char *app_bundle_path, char const *argv[], char const *envp[], bool no_stdio, bool disable_aslr, const char *event_data, DNBError &launch_err); + pid_t BKSForkChildForPTraceDebugging (const char *path, char const *argv[], char const *envp[], bool no_stdio, bool disable_aslr, const char *event_data, DNBError &launch_err); + bool BKSSendEvent (const char *event, DNBError &error); + static void BKSCleanupAfterAttach (const void *attach_token, DNBError &err_str); +#endif #ifdef WITH_SPRINGBOARD - pid_t SBLaunchForDebug (const char *app_bundle_path, char const *argv[], char const *envp[], bool no_stdio, DNBError &launch_err); + pid_t SBLaunchForDebug (const char *app_bundle_path, char const *argv[], char const *envp[], bool no_stdio, bool disable_aslr, DNBError &launch_err); static pid_t SBForkChildForPTraceDebugging (const char *path, char const *argv[], char const *envp[], bool no_stdio, MachProcess* process, DNBError &launch_err); #endif nub_addr_t LookupSymbol (const char *name, const char *shlib); @@ -94,6 +101,7 @@ public: bool Resume (const DNBThreadResumeActions& thread_actions); bool Signal (int signal, const struct timespec *timeout_abstime = NULL); + bool SendEvent (const char *event, DNBError &send_err); bool Kill (const struct timespec *timeout_abstime = NULL); bool Detach (); nub_size_t ReadMemory (nub_addr_t addr, nub_size_t size, void *buf); @@ -213,6 +221,15 @@ public: m_exit_status = status; SetState(eStateExited); } + const char * GetExitInfo () + { + return m_exit_info.c_str(); + } + + void SetExitInfo (const char *info) + { + m_exit_info.assign(info); + } uint32_t StopCount() const { return m_stop_count; } void SetChildFileDescriptors (int stdin_fileno, int stdout_fileno, int stderr_fileno) @@ -248,6 +265,7 @@ public: } bool ProcessUsingSpringBoard() const { return (m_flags & eMachProcessFlagsUsingSBS) != 0; } + bool ProcessUsingBackBoard() const { return (m_flags & eMachProcessFlagsUsingBKS) != 0; } DNBProfileDataScanType GetProfileScanType () { return m_profile_scan_type; } @@ -256,7 +274,8 @@ private: { eMachProcessFlagsNone = 0, eMachProcessFlagsAttached = (1 << 0), - eMachProcessFlagsUsingSBS = (1 << 1) + eMachProcessFlagsUsingSBS = (1 << 1), + eMachProcessFlagsUsingBKS = (1 << 2) }; void Clear (bool detaching = false); void ReplyToAllExceptions (); @@ -273,6 +292,7 @@ private: std::string m_path; // A path to the executable if we have one std::vector<std::string> m_args; // The arguments with which the process was lauched int m_exit_status; // The exit status for the process + std::string m_exit_info; // Any extra info that we may have about the exit MachTask m_task; // The mach task for this process uint32_t m_flags; // Process specific flags (see eMachProcessFlags enums) uint32_t m_stop_count; // A count of many times have we stopped @@ -304,6 +324,7 @@ private: DNBCallbackCopyExecutableImageInfos m_image_infos_callback; void * m_image_infos_baton; + std::string m_bundle_id; // If we are a SB or BKS process, this will be our bundle ID. bool m_did_exec; }; |