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:
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
|
#include <debugger.h>
|
||||||
#include <Deskbar.h>
|
#include <Deskbar.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <Dragger.h>
|
#include <Dragger.h>
|
||||||
@@ -745,6 +746,9 @@ long
|
|||||||
thread_debug_thread(void *arg)
|
thread_debug_thread(void *arg)
|
||||||
{
|
{
|
||||||
Tdebug_thead_param* param = (Tdebug_thead_param*) arg;
|
Tdebug_thead_param* param = (Tdebug_thead_param*) arg;
|
||||||
|
#ifdef __HAIKU__
|
||||||
|
debug_thread(param->thread);
|
||||||
|
#else // !__HAIKU__
|
||||||
thread_info thinfo;
|
thread_info thinfo;
|
||||||
get_thread_info(param->thread, &thinfo);
|
get_thread_info(param->thread, &thinfo);
|
||||||
char text[4096];
|
char text[4096];
|
||||||
@@ -792,6 +796,7 @@ thread_debug_thread(void *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // !__HAIKU__
|
||||||
delete param;
|
delete param;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user