convopt: fix potential bug with modulo shifts, improve cost calculation for optimizab...
[libfirm] / ir / be / bedbgout.c
index 2889cff..9afc506 100644 (file)
@@ -38,22 +38,22 @@ void be_dbg_close(void)
                handle->ops->close(handle);
 }
 
-void be_dbg_so(const char *filename)
+void be_dbg_unit_begin(const char *filename)
 {
-       if (handle->ops->so)
-               handle->ops->so(handle, filename);
+       if (handle->ops->unit_begin)
+               handle->ops->unit_begin(handle, filename);
 }
 
-void be_dbg_main_program(void)
+void be_dbg_unit_end(void)
 {
-       if (handle->ops->main_program)
-               handle->ops->main_program(handle);
+       if (handle->ops->unit_end)
+               handle->ops->unit_end(handle);
 }
 
-void be_dbg_method_begin(const ir_entity *ent, const be_stack_layout_t *layout)
+void be_dbg_method_begin(const ir_entity *ent)
 {
        if (handle->ops->method_begin)
-               handle->ops->method_begin(handle, ent, layout);
+               handle->ops->method_begin(handle, ent);
 }
 
 void be_dbg_method_end(void)
@@ -93,17 +93,19 @@ void be_register_dbgout_module(const char *name,
 {
        if (selected_dbgout_module == NULL)
                selected_dbgout_module = func;
-       be_add_module_to_list(&dbgout_modules, name, func);
+       be_add_module_to_list(&dbgout_modules, name, (void*)func);
 }
 
 static dbg_handle *create_null_dbgout_module(void)
 {
-       static const debug_ops null_ops;
+       static const debug_ops null_ops = {
+               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+       };
        static dbg_handle null_handle = { &null_ops };
        return &null_handle;
 }
 
-BE_REGISTER_MODULE_CONSTRUCTOR(be_init_dbgout);
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_dbgout)
 void be_init_dbgout(void)
 {
        lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");