[Lldb-commits] [lldb] r186505 - FreeBSD: Replace GetSignalInfo with GetLwpInfo
Ed Maste
emaste at freebsd.org
Wed Jul 17 07:02:20 PDT 2013
Author: emaste
Date: Wed Jul 17 09:02:20 2013
New Revision: 186505
URL: http://llvm.org/viewvc/llvm-project?rev=186505&view=rev
Log:
FreeBSD: Replace GetSignalInfo with GetLwpInfo
For thread support we are going to need other members of struct
ptrace_lwpinfo.
Modified:
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.h
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp?rev=186505&r1=186504&r2=186505&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Wed Jul 17 09:02:20 2013
@@ -526,12 +526,12 @@ SingleStepOperation::Execute(ProcessMoni
}
//------------------------------------------------------------------------------
-/// @class SiginfoOperation
-/// @brief Implements ProcessMonitor::GetSignalInfo.
-class SiginfoOperation : public Operation
+/// @class LwpInfoOperation
+/// @brief Implements ProcessMonitor::GetLwpInfo.
+class LwpInfoOperation : public Operation
{
public:
- SiginfoOperation(lldb::tid_t tid, void *info, bool &result, int &ptrace_err)
+ LwpInfoOperation(lldb::tid_t tid, void *info, bool &result, int &ptrace_err)
: m_tid(tid), m_info(info), m_result(result), m_err(ptrace_err) { }
void Execute(ProcessMonitor *monitor);
@@ -544,7 +544,7 @@ private:
};
void
-SiginfoOperation::Execute(ProcessMonitor *monitor)
+LwpInfoOperation::Execute(ProcessMonitor *monitor)
{
struct ptrace_lwpinfo plwp;
@@ -552,7 +552,7 @@ SiginfoOperation::Execute(ProcessMonitor
m_result = false;
m_err = errno;
} else {
- memcpy(m_info, &plwp.pl_siginfo, sizeof(siginfo_t));
+ memcpy(m_info, &plwp, sizeof(plwp));
m_result = true;
}
}
@@ -1105,7 +1105,7 @@ ProcessMonitor::MonitorCallback(void *ca
ProcessFreeBSD *process = monitor->m_process;
assert(process);
bool stop_monitoring;
- siginfo_t info;
+ struct ptrace_lwpinfo plwp;
int ptrace_err;
Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS));
@@ -1119,17 +1119,17 @@ ProcessMonitor::MonitorCallback(void *ca
return pid == process->GetID();
}
- if (!monitor->GetSignalInfo(pid, &info, ptrace_err))
+ if (!monitor->GetLwpInfo(pid, &plwp, ptrace_err))
stop_monitoring = true; // pid is gone. Bail.
else {
- switch (info.si_signo)
+ switch (plwp.pl_siginfo.si_signo)
{
case SIGTRAP:
- message = MonitorSIGTRAP(monitor, &info, pid);
+ message = MonitorSIGTRAP(monitor, &plwp.pl_siginfo, pid);
break;
default:
- message = MonitorSignal(monitor, &info, pid);
+ message = MonitorSignal(monitor, &plwp.pl_siginfo, pid);
break;
}
@@ -1588,10 +1588,10 @@ ProcessMonitor::BringProcessIntoLimbo()
}
bool
-ProcessMonitor::GetSignalInfo(lldb::tid_t tid, void *siginfo, int &ptrace_err)
+ProcessMonitor::GetLwpInfo(lldb::tid_t tid, void *lwpinfo, int &ptrace_err)
{
bool result;
- SiginfoOperation op(tid, siginfo, result, ptrace_err);
+ LwpInfoOperation op(tid, lwpinfo, result, ptrace_err);
DoOperation(&op);
return result;
}
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.h?rev=186505&r1=186504&r2=186505&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.h (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.h Wed Jul 17 09:02:20 2013
@@ -160,10 +160,10 @@ public:
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.
+ /// Writes a ptrace_lwpinfo structure corresponding to the given thread ID
+ /// to the memory region pointed to by @p lwpinfo.
bool
- GetSignalInfo(lldb::tid_t tid, void *siginfo, int &error_no);
+ GetLwpInfo(lldb::tid_t tid, void *lwpinfo, 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
More information about the lldb-commits
mailing list