diff options
author | Ashok Thirumurthi <ashok.thirumurthi@intel.com> | 2013-05-01 20:38:19 +0000 |
---|---|---|
committer | Ashok Thirumurthi <ashok.thirumurthi@intel.com> | 2013-05-01 20:38:19 +0000 |
commit | 0f3b9b819a1d8fb1a992d81b4891136c0752a4e7 (patch) | |
tree | 3998434e79c636cf75ef6d3bddb632ea329cac0e /lldb/source/Plugins | |
parent | e4a862f79428f7b6bb29de6b7133e111f1cd2a11 (diff) | |
download | bcm5719-llvm-0f3b9b819a1d8fb1a992d81b4891136c0752a4e7.tar.gz bcm5719-llvm-0f3b9b819a1d8fb1a992d81b4891136c0752a4e7.zip |
Build fixes for FreeBSD 9.1.
- TODO: Support extended register sets on FreeBSD.
Patch by Samuel Jacob.
llvm-svn: 180879
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r-- | lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp | 21 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h | 20 |
2 files changed, 35 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp index b92e7728f41..f2b1e9d5d56 100644 --- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp @@ -117,11 +117,11 @@ PtraceWrapper(int req, lldb::pid_t pid, void *addr, int data, // Wrapper for ptrace when logging is not required. // Sets errno to 0 prior to calling ptrace. extern long -PtraceWrapper(__ptrace_request req, lldb::pid_t pid, void *addr, int data) +PtraceWrapper(int req, lldb::pid_t pid, void *addr, int data) { long result = 0; errno = 0; - result = ptrace(req, pid, addr, data); + result = ptrace(req, pid, (caddr_t)addr, data); return result; } @@ -980,7 +980,7 @@ ProcessMonitor::Launch(LaunchArgs *args) goto FINISH; // Update the process thread list with this new thread. - inferior.reset(new POSIXThread(processSP, pid)); + inferior.reset(new POSIXThread(*processSP, pid)); process.GetThreadList().AddThread(inferior); // Let our process instance know the thread has stopped. @@ -1066,7 +1066,7 @@ ProcessMonitor::Attach(AttachArgs *args) } // Update the process thread list with the attached thread. - inferior.reset(new POSIXThread(processSP, pid)); + inferior.reset(new POSIXThread(*processSP, pid)); tl.AddThread(inferior); // Let our process instance know the thread has stopped. @@ -1457,6 +1457,19 @@ ProcessMonitor::WriteRegisterValue(lldb::tid_t tid, unsigned offset, } bool +ProcessMonitor::ReadRegisterSet(lldb::tid_t tid, void *buf, size_t buf_size, unsigned int regset) +{ + return false; +} + +bool +ProcessMonitor::WriteRegisterSet(lldb::tid_t tid, void *buf, size_t buf_size, unsigned int regset) +{ + return false; +} + + +bool ProcessMonitor::ReadGPR(lldb::tid_t tid, void *buf, size_t buf_size) { bool result; diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h index bc0fbdf2aae..0762ef9ad86 100644 --- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h +++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h @@ -132,6 +132,14 @@ public: bool ReadFPR(lldb::tid_t tid, void *buf, size_t buf_size); + /// Reads the specified register set into the specified buffer. + /// + /// This method is provided for use by RegisterContextFreeBSD derivatives. + /// FIXME: The FreeBSD implementation of this function should use tid in order + /// to enable support for debugging threaded programs. + bool + ReadRegisterSet(lldb::tid_t tid, void *buf, size_t buf_size, unsigned int regset); + /// Writes all general purpose registers into the specified buffer. /// FIXME: The FreeBSD implementation of this function should use tid in order /// to enable support for debugging threaded programs. @@ -142,12 +150,20 @@ public: /// FIXME: The FreeBSD implementation of this function should use tid in order /// to enable support for debugging threaded programs. bool - WriteFPR(lldb::tid_t tid, void *buf); + WriteFPR(lldb::tid_t tid, void *buf, size_t buf_size); + + /// Writes the specified register set into the specified buffer. + /// + /// This method is provided for use by RegisterContextFreeBSD derivatives. + /// FIXME: The FreeBSD implementation of this function should use tid in order + /// to enable support for debugging threaded programs. + bool + WriteRegisterSet(lldb::tid_t tid, void *buf, size_t buf_size, unsigned int regset); /// Writes a siginfo_t structure corresponding to the given thread ID to the /// memory region pointed to by @p siginfo. bool - GetSignalInfo(lldb::tid_t tid, void *siginfo, int &errno); + GetSignalInfo(lldb::tid_t tid, void *siginfo, int &error_no); /// Writes the raw event message code (vis-a-vis PTRACE_GETEVENTMSG) /// corresponding to the given thread IDto the memory pointed to by @p |