X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fdebug%2Fdbginfo.c;h=178ce44af177eb312281633b85afa19628b8a05a;hb=2f7da22ade10e502888999170ef42fcf9a619852;hp=9ed9658d9a1919b570da4e02afa92467c6d1fb91;hpb=5f4a7559628fca2ee71c641e1eb14e8ee2e9c740;p=libfirm diff --git a/ir/debug/dbginfo.c b/ir/debug/dbginfo.c index 9ed9658d9..178ce44af 100644 --- a/ir/debug/dbginfo.c +++ b/ir/debug/dbginfo.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -69,6 +69,8 @@ const char *dbg_action_2_str(dbg_action a) { CASE(dbg_rem_poly_call); CASE(dbg_dead_code); CASE(dbg_opt_confirm); + CASE(dbg_gvn_pre); + CASE(dbg_combo); CASE(dbg_backend); default: if (a <= dbg_max) @@ -101,3 +103,20 @@ void default_dbg_info_merge_sets(ir_node **new_nodes, int n_new_nodes, set_irn_dbg_info(new_nodes[i], old_db); } } /* default_dbg_info_merge_sets */ + +/** The debug info retriever function. */ +static retrieve_dbg_func retrieve_dbg = NULL; + +/* Sets a debug info retriever. */ +void ir_set_debug_retrieve(retrieve_dbg_func func) { + retrieve_dbg = func; +} + +/* Retrieve the debug info. */ +const char *ir_retrieve_dbg_info(const dbg_info *dbg, unsigned *line) { + if (retrieve_dbg) + return retrieve_dbg(dbg, line); + + *line = 0; + return NULL; +}