Debugger: Add handling for signal debug messages.
DebugEvents: - Add definition for SignalReceivedEvent. DebuggerInterface: - Generate SignalReceivedEvent upon receipt of B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED.
This commit is contained in:
@@ -237,3 +237,15 @@ HandedOverEvent::HandedOverEvent(team_id team, thread_id thread,
|
|||||||
fCausingThread(causingThread)
|
fCausingThread(causingThread)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark - SignalReceivedEvent
|
||||||
|
|
||||||
|
|
||||||
|
SignalReceivedEvent::SignalReceivedEvent(team_id team, thread_id thread,
|
||||||
|
const SignalInfo& info)
|
||||||
|
:
|
||||||
|
DebugEvent(B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED, team, thread),
|
||||||
|
fInfo(info)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include <debugger.h>
|
#include <debugger.h>
|
||||||
|
|
||||||
#include "ImageInfo.h"
|
#include "ImageInfo.h"
|
||||||
|
#include "SignalInfo.h"
|
||||||
#include "SyscallInfo.h"
|
#include "SyscallInfo.h"
|
||||||
#include "Types.h"
|
#include "Types.h"
|
||||||
|
|
||||||
@@ -223,4 +224,17 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class SignalReceivedEvent : public DebugEvent {
|
||||||
|
public:
|
||||||
|
SignalReceivedEvent(team_id team,
|
||||||
|
thread_id thread,
|
||||||
|
const SignalInfo& info);
|
||||||
|
|
||||||
|
const SignalInfo& GetSignalInfo() const { return fInfo; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
SignalInfo fInfo;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // DEBUG_EVENT_H
|
#endif // DEBUG_EVENT_H
|
||||||
|
|||||||
@@ -857,13 +857,21 @@ DebuggerInterface::_CreateDebugEvent(int32 messageCode,
|
|||||||
message.post_syscall.syscall, message.post_syscall.args));
|
message.post_syscall.syscall, message.post_syscall.args));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED:
|
||||||
|
{
|
||||||
|
event = new(std::nothrow) SignalReceivedEvent(message.origin.team,
|
||||||
|
message.origin.thread,
|
||||||
|
SignalInfo(message.signal_received.signal,
|
||||||
|
message.signal_received.handler,
|
||||||
|
message.signal_received.deadly));
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
printf("DebuggerInterface for team %" B_PRId32 ": unknown message "
|
printf("DebuggerInterface for team %" B_PRId32 ": unknown message "
|
||||||
"from kernel: %" B_PRId32 "\n", fTeamID, messageCode);
|
"from kernel: %" B_PRId32 "\n", fTeamID, messageCode);
|
||||||
// fall through...
|
// fall through...
|
||||||
case B_DEBUGGER_MESSAGE_TEAM_CREATED:
|
case B_DEBUGGER_MESSAGE_TEAM_CREATED:
|
||||||
case B_DEBUGGER_MESSAGE_PRE_SYSCALL:
|
case B_DEBUGGER_MESSAGE_PRE_SYSCALL:
|
||||||
case B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED:
|
|
||||||
case B_DEBUGGER_MESSAGE_PROFILER_UPDATE:
|
case B_DEBUGGER_MESSAGE_PROFILER_UPDATE:
|
||||||
case B_DEBUGGER_MESSAGE_HANDED_OVER:
|
case B_DEBUGGER_MESSAGE_HANDED_OVER:
|
||||||
_ignore = true;
|
_ignore = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user