Commit 61e6b1fa authored by Michael Beck's avatar Michael Beck
Browse files

Add debug retriever

parent 649a0aae
......@@ -336,6 +336,7 @@ static void be_main_loop(FILE *file_handle)
be_done_env(&env);
}
/* Main interface to the frontend. */
void be_main(FILE *file_handle)
{
/* never build code for pseudo irgs */
......@@ -344,3 +345,19 @@ void be_main(FILE *file_handle)
be_node_init();
be_main_loop(file_handle);
}
/** The debug info retriever function. */
static retrieve_dbg_func retrieve_dbg = NULL;
/* Sets a debug info retriever. */
void be_set_debug_retrieve(retrieve_dbg_func func) {
retrieve_dbg = func;
}
/* Retrieve the debug info. */
const char *be_retrieve_dbg_info(const dbg_info *dbg, unsigned *line) {
if (retrieve_dbg)
return retrieve_dbg(dbg, line);
*line = 0;
return NULL;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment