#include "precompiled.h"
#include <cstdio>
#include <sys/types.h>
#include <signal.h>
#include "lib/timer.h"
#include "lib/sysdep/sysdep.h"
#include "lib/debug.h"
#include "lib/utf8.h"
Go to the source code of this file.
#define DEBUGGER_ARG_FORMAT "--pid=%d" |
#define DEBUGGER_BREAK_AFTER_WAIT 0 |
#define DEBUGGER_CMD "gdb" |
trigger a breakpoint when reached/"called".
if defined as a macro, the debugger can break directly into the target function instead of one frame below it as with a conventional call-based implementation.
Definition at line 48 of file udbg.cpp.
Status debug_CaptureContext |
( |
void * |
context | ) |
|
- Parameters
-
context | must point to an instance of the platform-specific type (e.g. CONTEXT) or CACHE_ALIGNED storage of DEBUG_CONTEXT_SIZE bytes. |
Definition at line 42 of file udbg.cpp.
int debug_IsPointerBogus |
( |
const void * |
p | ) |
|
check if a pointer appears to be totally invalid.
this check is not authoritative (the pointer may be "valid" but incorrect) but can be used to filter out obviously wrong values in a portable manner.
- Parameters
-
- Returns
- 1 if totally bogus, otherwise 0.
Definition at line 114 of file udbg.cpp.
void debug_puts |
( |
const wchar_t * |
text | ) |
|
[system-dependent] write a string to the debug channel.
this can be quite slow (~1 ms)! On Windows, it uses OutputDebugString (entails context switch), otherwise stdout+fflush (waits for IO).
Definition at line 106 of file udbg.cpp.
void udbg_launch_debugger |
( |
| ) |
|