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
This commit is contained in:
Ingo Weinhold
2007-09-01 00:31:19 +00:00
parent 0735851ca7
commit 1d1b0d065b
@@ -36,6 +36,7 @@
#include <Alert.h>
#include <Bitmap.h>
#include <debugger.h>
#include <Deskbar.h>
#include <Directory.h>
#include <Dragger.h>
@@ -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;
}