automatically generate opcode declarations from ir_spec
[libfirm] / include / libfirm / dbginfo.h
index fde55fc..479ae8f 100644 (file)
 #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.
@@ -93,7 +95,7 @@ typedef enum {
  *
  * @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.
@@ -142,8 +144,8 @@ typedef void merge_sets_func(ir_node **new_node_array, int new_num_entries, ir_n
  *   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);
 
 /** @} */
 
@@ -160,11 +162,32 @@ typedef const char *(*retrieve_dbg_func)(const dbg_info *dbg, unsigned *line);
  *
  * @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