Added new functions to the debugger API:

{set,clear}_debugger_{break,watch}point(), allowing to set/clear break
and watchpoints for the calling team. When a break/watchpoint is hit,
the team enters the debugger. Handy in situations when the program in
question can't really be started in a debugger (or it would be
complicated to do so). The functions work only as long as no debugger is
installed for the team.

We clear the arch specific team and thread debug infos now, when a new
debugger is installed, thus clearing break- and watchpoints.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20396 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2007-03-20 16:20:13 +00:00
parent a1394a90ad
commit 44b5d72b5a
5 changed files with 110 additions and 5 deletions
+28
View File
@@ -114,6 +114,34 @@ wait_for_debugger(void)
}
status_t
set_debugger_breakpoint(void *address)
{
return _kern_set_debugger_breakpoint(address, 0, 0, false);
}
status_t
clear_debugger_breakpoint(void *address)
{
return _kern_clear_debugger_breakpoint(address, false);
}
status_t
set_debugger_watchpoint(void *address, uint32 type, int32 length)
{
return _kern_set_debugger_breakpoint(address, type, length, true);
}
status_t
clear_debugger_watchpoint(void *address)
{
return _kern_clear_debugger_breakpoint(address, true);
}
static void
get_debug_string(const debug_string_entry *stringEntries,
const char *defaultString, uint32 code, char *buffer, int32 bufferSize)