}
//------------------------------------------------------------------------------
-/// @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);
};
void
-SiginfoOperation::Execute(ProcessMonitor *monitor)
+LwpInfoOperation::Execute(ProcessMonitor *monitor)
{
struct ptrace_lwpinfo plwp;
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;
}
}
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));
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;
}
}
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;
}
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