X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbe_dbgout.h;h=ac81d6d8f73743bbef2ee173f76394decd1f5581;hb=a92ff34e623ded0eb85277c1f37235947855dffb;hp=17781fb025c3f4f24b1df586b9f6f2b97828e87b;hpb=a02845e8e712b9597b9b322df8b0019b4634f9a1;p=libfirm diff --git a/ir/be/be_dbgout.h b/ir/be/be_dbgout.h index 17781fb02..ac81d6d8f 100644 --- a/ir/be/be_dbgout.h +++ b/ir/be/be_dbgout.h @@ -1,12 +1,16 @@ -#ifndef __BE_DBGOUT_H__ -#define __BE_DBGOUT_H__ /** - * Debug output support. - * - * @author Michael Beck - * @date 11.9.2006 - * @cvsid $Id$ + * @file + * @brief Debug output support. + * @author Michael Beck + * @date 11.9.2006 + * @version $Id$ */ +#ifndef __BE_DBGOUT_H__ +#define __BE_DBGOUT_H__ + +#include "obst.h" +#include "beabi_t.h" + typedef struct dbg_handle dbg_handle; /** @@ -14,16 +18,35 @@ typedef struct dbg_handle dbg_handle; */ typedef struct debug_ops { /** close the stabs handler. */ - void (*close)(dbg_handle *h); + void (*close)(dbg_handle *handle); + + /** start a new source object (compilation unit) */ + void (*so)(dbg_handle *handle, const char *filename); + + /** start an include file */ + void (*include_begin)(dbg_handle *handle, const char *filename); + + /** end an include file */ + void (*include_end)(dbg_handle *handle); + + /** Main Program */ + void (*main_program)(dbg_handle *handle); - /** begin a new file */ - void (*begin)(dbg_handle *handle, const char *filename); + /** dumps the stabs for a method begin */ + void (*method_begin)(dbg_handle *handle, ir_entity *ent, const be_stack_layout_t *layout); - /** prints the stabs for a function */ - void (*method)(dbg_handle *h, entity *ent); + /** dumps the stabs for a method end */ + void (*method_end)(dbg_handle *handle); + + /** dumps a line number */ + void (*line)(dbg_handle *handle, unsigned lineno, const char *address); + + /** dump types */ + void (*types)(dbg_handle *handle); + + /** dump a variable in the global type */ + void (*variable)(dbg_handle *h, struct obstack *obst, ir_entity *ent); - /** prints a line number */ - void (*line)(dbg_handle *h, unsigned lineno, const char *address); } debug_ops; /** The base class of all debug implementations. */ @@ -32,16 +55,37 @@ struct dbg_handle { }; /** close a debug handler. */ -void be_dbg_close(dbg_handle *h); +void be_dbg_close(dbg_handle *handle); + +/** start a new source object (compilation unit) */ +void be_dbg_so(dbg_handle *handle, const char *filename); + +/** start an include file */ +void be_dbg_include_begin(dbg_handle *handle, const char *filename); -/** begin a new file */ -void be_dbg_begin(dbg_handle *handle, const char *filename); +/** end an include file */ +void be_dbg_include_end(dbg_handle *handle); -/** debug for a function */ -void be_dbg_method(dbg_handle *h, entity *ent); +/** Main program */ +void be_dbg_main_program(dbg_handle *handle); + +/** debug for a method begin */ +void be_dbg_method_begin(dbg_handle *handle, ir_entity *ent, const be_stack_layout_t *layout); + +/** debug for a method end */ +void be_dbg_method_end(dbg_handle *handle); /** debug for line number */ -void be_dbg_line(dbg_handle *h, unsigned lineno, const char *address); +void be_dbg_line(dbg_handle *handle, unsigned lineno, const char *address); + +/** dump types */ +void be_dbg_types(dbg_handle *handle); + +/** dump a variable in the global type */ +void be_dbg_variable(dbg_handle *handle, struct obstack *obst, ir_entity *ent); + +/** Opens the NULL handler: no debug support. */ +dbg_handle *be_nulldbg_open(void); /** Opens a stabs handler. */ dbg_handle *be_stabs_open(FILE *out);