New debug function wait_for_debugger(). Useful when creating teams to be debugged via fork().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11634 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2562e5185c
commit
a29ecae5f0
@ -27,6 +27,7 @@ extern status_t install_default_debugger(port_id debuggerPort);
|
||||
extern port_id install_team_debugger(team_id team, port_id debuggerPort);
|
||||
extern status_t remove_team_debugger(team_id team);
|
||||
extern status_t debug_thread(thread_id thread);
|
||||
extern void wait_for_debugger(void);
|
||||
|
||||
// team debugging flags
|
||||
enum {
|
||||
|
@ -54,6 +54,22 @@ debug_thread(thread_id thread)
|
||||
return _kern_debug_thread(thread);
|
||||
}
|
||||
|
||||
|
||||
/** \brief Suspends the thread until a debugger has been installed for this
|
||||
* team.
|
||||
*
|
||||
* As soon as this happens (immediately, if a debugger is already installed)
|
||||
* the thread stops for debugging. This is desirable for debuggers that spawn
|
||||
* their debugged teams via fork() and want the child to wait till they have
|
||||
* installed themselves as team debugger before continuing with exec*().
|
||||
*/
|
||||
void
|
||||
wait_for_debugger(void)
|
||||
{
|
||||
_kern_wait_for_debugger();
|
||||
}
|
||||
|
||||
|
||||
static const char *const sDebugWhyStrings[] = {
|
||||
"Thread not running", // B_THREAD_NOT_RUNNING
|
||||
"Signal received", // B_SIGNAL_RECEIVED
|
||||
|
Loading…
Reference in New Issue
Block a user