* Added architecture specific structure to thread_debug_info.
* Added event callbacks for break- and watchpoints and single stepping. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11520 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -51,6 +51,8 @@ struct thread_debug_info {
|
||||
// won't go).
|
||||
port_id debug_port;
|
||||
// the port the thread is waiting on for commands from the nub thread
|
||||
|
||||
struct arch_thread_debug_info arch_info;
|
||||
};
|
||||
|
||||
#define GRAB_TEAM_DEBUG_INFO_LOCK(info) acquire_spinlock(&(info).lock)
|
||||
@@ -131,6 +133,8 @@ void user_debug_thread_created(thread_id threadID);
|
||||
void user_debug_thread_deleted(team_id teamID, thread_id threadID);
|
||||
void user_debug_image_created(const image_info *imageInfo);
|
||||
void user_debug_image_deleted(const image_info *imageInfo);
|
||||
void user_debug_break_or_watchpoint_hit(bool watchpoint);
|
||||
void user_debug_single_stepped();
|
||||
|
||||
|
||||
// syscalls
|
||||
|
||||
@@ -116,6 +116,7 @@ void
|
||||
clear_thread_debug_info(struct thread_debug_info *info, bool dying)
|
||||
{
|
||||
if (info) {
|
||||
arch_clear_thread_debug_info(&info->arch_info);
|
||||
atomic_set(&info->flags,
|
||||
B_THREAD_DEBUG_DEFAULT_FLAGS | (dying ? B_THREAD_DEBUG_DYING : 0));
|
||||
info->debug_port = -1;
|
||||
@@ -127,6 +128,8 @@ void
|
||||
destroy_thread_debug_info(struct thread_debug_info *info)
|
||||
{
|
||||
if (info) {
|
||||
arch_destroy_thread_debug_info(&info->arch_info);
|
||||
|
||||
if (info->debug_port >= 0) {
|
||||
delete_port(info->debug_port);
|
||||
info->debug_port = -1;
|
||||
@@ -650,6 +653,20 @@ user_debug_image_deleted(const image_info *imageInfo)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
user_debug_break_or_watchpoint_hit(bool watchpoint)
|
||||
{
|
||||
stop_thread((watchpoint ? B_WATCHPOINT_HIT : B_BREAKPOINT_HIT), NULL);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
user_debug_single_stepped()
|
||||
{
|
||||
stop_thread(B_SINGLE_STEP, NULL);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
nub_thread_cleanup(struct thread *nubThread)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user