Add event class for the post-syscall debug message.
This commit is contained in:
parent
d08227bb68
commit
23f48a24d0
@ -441,7 +441,8 @@ TeamDebugger::Init(team_id teamID, thread_id threadID, int argc,
|
||||
|
||||
// set team debugging flags
|
||||
fDebuggerInterface->SetTeamDebuggingFlags(
|
||||
B_TEAM_DEBUG_THREADS | B_TEAM_DEBUG_IMAGES);
|
||||
B_TEAM_DEBUG_THREADS | B_TEAM_DEBUG_IMAGES
|
||||
| B_TEAM_DEBUG_POST_SYSCALL);
|
||||
|
||||
// get the initial state of the team
|
||||
AutoLocker< ::Team> teamLocker(fTeam);
|
||||
|
@ -215,6 +215,18 @@ ImageDeletedEvent::ImageDeletedEvent(team_id team, thread_id thread,
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - PostSyscallEvent
|
||||
|
||||
|
||||
PostSyscallEvent::PostSyscallEvent(team_id team, thread_id thread,
|
||||
const SyscallInfo& info)
|
||||
:
|
||||
DebugEvent(B_DEBUGGER_MESSAGE_POST_SYSCALL, team, thread),
|
||||
fInfo(info)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - HandedOverEvent
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Copyright 2013, Rene Gollent, rene@gollent.com.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef DEBUG_EVENT_H
|
||||
@ -8,6 +9,7 @@
|
||||
#include <debugger.h>
|
||||
|
||||
#include "ImageInfo.h"
|
||||
#include "SyscallInfo.h"
|
||||
#include "Types.h"
|
||||
|
||||
|
||||
@ -196,6 +198,19 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class PostSyscallEvent : public DebugEvent {
|
||||
public:
|
||||
PostSyscallEvent(team_id team,
|
||||
thread_id thread,
|
||||
const SyscallInfo& info);
|
||||
|
||||
const SyscallInfo& GetSyscallInfo() const { return fInfo; }
|
||||
|
||||
private:
|
||||
SyscallInfo fInfo;
|
||||
};
|
||||
|
||||
|
||||
class HandedOverEvent : public DebugEvent {
|
||||
public:
|
||||
HandedOverEvent(team_id team,
|
||||
|
@ -830,13 +830,22 @@ DebuggerInterface::_CreateDebugEvent(int32 messageCode,
|
||||
info.data_size));
|
||||
break;
|
||||
}
|
||||
case B_DEBUGGER_MESSAGE_POST_SYSCALL:
|
||||
{
|
||||
event = new(std::nothrow) PostSyscallEvent(message.origin.team,
|
||||
message.origin.thread,
|
||||
SyscallInfo(message.post_syscall.start_time,
|
||||
message.post_syscall.end_time,
|
||||
message.post_syscall.return_value,
|
||||
message.post_syscall.syscall, message.post_syscall.args));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
printf("DebuggerInterface for team %" B_PRId32 ": unknown message "
|
||||
"from kernel: %" B_PRId32 "\n", fTeamID, messageCode);
|
||||
// fall through...
|
||||
case B_DEBUGGER_MESSAGE_TEAM_CREATED:
|
||||
case B_DEBUGGER_MESSAGE_PRE_SYSCALL:
|
||||
case B_DEBUGGER_MESSAGE_POST_SYSCALL:
|
||||
case B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED:
|
||||
case B_DEBUGGER_MESSAGE_PROFILER_UPDATE:
|
||||
case B_DEBUGGER_MESSAGE_HANDED_OVER:
|
||||
|
Loading…
Reference in New Issue
Block a user