#include <windows.h>
#endif
+#include "debugger.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#define FIRM_DBG_MINOR 0
/** for automatic detection of the debug extension */
-static const char firm_debug_info_string[] =
+static const char __attribute__((used)) firm_debug_info_string[] =
API_VERSION(FIRM_DBG_MAJOR, FIRM_DBG_MINOR);
-/**
- * Returns non-zero, if the debug extension is active
- */
int firm_debug_active(void)
{
return is_active;
firm_dbg_msg_buf[0] = '\0';
} /* reset_dbg_buf */
-/**
- * Add text to the debug text buffer.
- */
static void add_to_dbg_buf(const char *buf)
{
strncat(firm_dbg_msg_buf, buf, sizeof(firm_dbg_msg_buf));
} /* add_to_dbg_buf */
-/**
- * Return the content of the debug text buffer.
- *
- * To be called from the debugger.
- */
const char *firm_debug_text(void)
{
firm_dbg_msg_buf[sizeof(firm_dbg_msg_buf) - 1] = '\0';
CASE_ON(BP_ON_NEW_ENT, new_entity);
CASE_ON(BP_ON_NEW_TYPE, new_type);
default:
- ;
+ break;
}
}
else {
CASE_OFF(BP_ON_NEW_ENT, new_entity);
CASE_OFF(BP_ON_NEW_TYPE, new_type);
default:
- ;
+ break;
}
}
#undef CASE_ON
fprintf(f, "BAD: (%p)\n", firm_thing);
break;
case k_entity:
- dump_entity_to_file(f, firm_thing, dump_verbosity_max);
+ dump_entity_to_file(f, firm_thing);
break;
case k_type:
- dump_type_to_file(f, firm_thing, dump_verbosity_max);
+ dump_type_to_file(f, firm_thing);
break;
case k_ir_graph:
case k_ir_node:
return c;
} /* get_token */
-/**
- * High level function to use from debugger interface
- *
- * See show_commands() for supported commands.
- */
void firm_debug(const char *cmd)
{
char name[1024], fname[1024];
;
} /* firm_debug */
-/* creates the debugger tables */
void firm_init_debugger(void)
{
char *env;
return buf;
}
-/**
- * A gdb helper function to print tarvals.
- */
const char *gdb_tarval_helper(void *tv_object)
{
static char buf[1024];