#ifndef FIRM_DEBUG_DBGINFO_H
#define FIRM_DEBUG_DBGINFO_H
+#include <stdlib.h>
#include "firm_types.h"
#include "ident.h"
+#include "begin.h"
/**
* @defgroup debug The Firm interface to debugging support.
*
* @param a the debug action
*/
-const char *dbg_action_2_str(dbg_action a);
+FIRM_API const char *dbg_action_2_str(dbg_action a);
/**
* The type of the debug info merge function.
* Further both functions pass an enumeration indicating the action
* performed by the transformation, e.g. the kind of optimization performed.
*/
-void dbg_init(merge_pair_func *dbg_info_merge_pair,
- merge_sets_func *dbg_info_merge_sets);
+FIRM_API void dbg_init(merge_pair_func *dbg_info_merge_pair,
+ merge_sets_func *dbg_info_merge_sets);
/** @} */
*
* @param func the debug retriever function.
*/
-void ir_set_debug_retrieve(retrieve_dbg_func func);
+FIRM_API void ir_set_debug_retrieve(retrieve_dbg_func func);
+
+/**
+ * The type of the type debug info retrieve function.
+ * Prints a human readable source representation of a type to an obstack.
+ * (Used for generating debug info like stabs or dwarf)
+ */
+typedef void (*retrieve_type_dbg_func)(char *buffer, size_t buffer_size,
+ const type_dbg_info *tdbgi);
+
+/**
+ * Set global print_type_dbg_info function in firm
+ */
+FIRM_API void ir_set_type_debug_retrieve(retrieve_type_dbg_func func);
/**
* Retrieve the debug info.
*/
-const char *ir_retrieve_dbg_info(const dbg_info *dbg, unsigned *line);
+FIRM_API const char *ir_retrieve_dbg_info(const dbg_info *dbg, unsigned *line);
+
+/**
+ * Retrieve type debug info
+ */
+FIRM_API void ir_retrieve_type_dbg_info(char *buffer, size_t buffer_size,
+ const type_dbg_info *tdbgi);
+
+#include "end.h"
#endif