From 1d1b0d065bc688d880ad5adb26bae711158225b7 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 1 Sep 2007 00:31:19 +0000 Subject: [PATCH] Made ProcessController's "Debug Thread" feature work under Haiku. We don't have a "db" command (we could probably add a small shell script that invokes gdb in a Terminal), but just as BeOS we have debug_thread(), which does exactly that -- throwing a thread into the debugger. It (at least Haiku's version, not sure about BeOS's) also interrupts system calls, which makes the semaphore releasing hack superfluous. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22132 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/processcontroller/ProcessController.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/apps/processcontroller/ProcessController.cpp b/src/apps/processcontroller/ProcessController.cpp index cee23d2c62..4516982e67 100644 --- a/src/apps/processcontroller/ProcessController.cpp +++ b/src/apps/processcontroller/ProcessController.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -745,6 +746,9 @@ long thread_debug_thread(void *arg) { Tdebug_thead_param* param = (Tdebug_thead_param*) arg; +#ifdef __HAIKU__ + debug_thread(param->thread); +#else // !__HAIKU__ thread_info thinfo; get_thread_info(param->thread, &thinfo); char text[4096]; @@ -792,6 +796,7 @@ thread_debug_thread(void *arg) } } } +#endif // !__HAIKU__ delete param; return B_OK; }