#include "debug.h"
#ifdef _WIN32
-/** Break into the debugger. The Win32 way. */
-static void firm_debug_break(void) {
+/* Break into the debugger. The Win32 way. */
+void firm_debug_break(void) {
DebugBreak();
}
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64))
-/** Break into the debugger. The ia32/x86_64 way under GCC. */
-static void firm_debug_break(void) {
+/* Break into the debugger. The ia32/x86_64 way under GCC. */
+void firm_debug_break(void) {
__asm__ __volatile__("int3");
}
#else
-/** Break into the debugger. Poor Unix way. */
-static void firm_debug_break(void) {
+/* Break into the debugger. Poor Unix way. */
+void firm_debug_break(void) {
raise(SIGINT);
}
#endif /* _WIN32 */
".bp show all breakpoints\n"
".enable nr enable breakpoint nr\n"
".disable nr disable breakpoint nr\n"
- ".setmask name lvl sets the debug module name to level lvl\n"
+ ".setmask name msk sets the debug module name to mask msk\n"
+ ".setlvl name lvl sets the debug module name to level lvl\n"
".setoutfile name file redirects debug output of module name to file\n"
".help list all commands\n"
);
bp_activate(bp, 0);
else if (sscanf(cmd, ".setmask %s %u\n", name, &lvl) == 2)
set_dbg_level(name, lvl);
+ else if (sscanf(cmd, ".setlvl %s %u\n", name, &lvl) == 2)
+ set_dbg_level(name, (1 << lvl) - 1);
else if (sscanf(cmd, ".setoutfile %s %s\n", name, fname) == 2)
set_dbg_outfile(name, fname);
else {
*
* Disables breakpoint nr.
*
- * @b .setmask name lvl
+ * @b .setmask name msk
+ *
+ * Sets the debug module name to mask msk.
+ *
+ * @b .setlvl name lvl
*
* Sets the debug module name to level lvl.
*