diff options
Diffstat (limited to 'src/core/wee-debug.c')
-rw-r--r-- | src/core/wee-debug.c | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c index bb82027ab..d6ab2118b 100644 --- a/src/core/wee-debug.c +++ b/src/core/wee-debug.c @@ -1,7 +1,7 @@ /* * wee-debug.c - debug functions * - * Copyright (C) 2003-2015 Sébastien Helleu <flashcode@flashtux.org> + * Copyright (C) 2003-2016 Sébastien Helleu <flashcode@flashtux.org> * * This file is part of WeeChat, the extensible chat client. * @@ -127,10 +127,12 @@ debug_dump (int crash) */ int -debug_dump_cb (void *data, const char *signal, const char *type_data, +debug_dump_cb (const void *pointer, void *data, + const char *signal, const char *type_data, void *signal_data) { /* make C compiler happy */ + (void) pointer; (void) data; (void) signal; (void) type_data; @@ -154,20 +156,26 @@ debug_sigsegv () unhook_all (); gui_main_end (0); - string_iconv_fprintf (stderr, "\n"); - string_iconv_fprintf (stderr, "*** Very bad! WeeChat is crashing (SIGSEGV received)\n"); + string_fprintf (stderr, + "\n*** Very bad! WeeChat is crashing (SIGSEGV received)" + "\n"); if (!log_crash_rename ()) - string_iconv_fprintf (stderr, - "*** Full crash dump was saved to %s/weechat.log file.\n", - weechat_home); - string_iconv_fprintf (stderr, "***\n"); - string_iconv_fprintf (stderr, "*** Please help WeeChat developers to fix this bug:\n"); - string_iconv_fprintf (stderr, "*** 1. If you have a core file, please run: gdb /path/to/weechat core\n"); - string_iconv_fprintf (stderr, "*** then issue command: \"bt full\" and send result to developers\n"); - string_iconv_fprintf (stderr, "*** (see user's guide for more info about report of crashes).\n"); - string_iconv_fprintf (stderr, "*** 2. Otherwise send backtrace (below), only if it is a complete trace.\n"); - string_iconv_fprintf (stderr, "*** Keep the crash log file, just in case developers ask you some info\n"); - string_iconv_fprintf (stderr, "*** (be careful, private info like passwords may be in this file).\n\n"); + { + string_fprintf (stderr, + "*** Full crash dump was saved to %s/weechat.log file." + "\n", + weechat_home); + } + string_fprintf ( + stderr, + "***\n" + "*** Please help WeeChat developers to fix this bug:\n" + "*** 1. If you have a core file, please run: gdb /path/to/weechat core\n" + "*** then issue command: \"bt full\" and send result to developers\n" + "*** (see user's guide for more info about report of crashes).\n" + "*** 2. Otherwise send backtrace (below), only if it is a complete trace.\n" + "*** Keep the crash log file, just in case developers ask you some info\n" + "*** (be careful, private info like passwords may be in this file).\n\n"); weechat_backtrace (); @@ -317,7 +325,8 @@ debug_hdata_hash_list_map_cb (void *data, */ void -debug_hdata_map_cb (void *data, struct t_hashtable *hashtable, +debug_hdata_map_cb (void *data, + struct t_hashtable *hashtable, const void *key, const void *value) { struct t_hdata *ptr_hdata; @@ -338,13 +347,11 @@ debug_hdata_map_cb (void *data, struct t_hashtable *hashtable, ptr_hdata->hash_list->items_count); /* display lists */ - hashtable_map (ptr_hdata->hash_list, - &debug_hdata_hash_list_map_cb, NULL); + hashtable_map (ptr_hdata->hash_list, &debug_hdata_hash_list_map_cb, NULL); /* display vars */ list = weelist_new (); - hashtable_map (ptr_hdata->hash_var, - &debug_hdata_hash_var_map_cb, list); + hashtable_map (ptr_hdata->hash_var, &debug_hdata_hash_var_map_cb, list); for (ptr_item = list->items; ptr_item; ptr_item = ptr_item->next_item) { @@ -503,10 +510,12 @@ debug_infolists () */ int -debug_libs_cb (void *data, const char *signal, const char *type_data, +debug_libs_cb (const void *pointer, void *data, + const char *signal, const char *type_data, void *signal_data) { /* make C compiler happy */ + (void) pointer; (void) data; (void) signal; (void) type_data; @@ -641,8 +650,8 @@ debug_init () * plugins (they should anyway because this function is called before load * of plugins) */ - hook_signal (NULL, "2000|debug_dump", &debug_dump_cb, NULL); - hook_signal (NULL, "2000|debug_libs", &debug_libs_cb, NULL); + hook_signal (NULL, "2000|debug_dump", &debug_dump_cb, NULL, NULL); + hook_signal (NULL, "2000|debug_libs", &debug_libs_cb, NULL, NULL); } /* |