diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-12-07 17:43:36 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-12-07 17:43:36 +0100 |
commit | 15d9aab7fa0027a7408c08926ae03bb81cd9284d (patch) | |
tree | 12fc582581208d612aa09b1fb826112d059a4a81 | |
parent | 86489d458763968ef7a833ad00dbc905c1b0e60d (diff) | |
download | weechat-15d9aab7fa0027a7408c08926ae03bb81cd9284d.zip |
core: add option "hooks" for command /debug
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_commands.txt | 31 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_commands.txt | 1 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_commands.txt | 1 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_commands.txt | 31 | ||||
-rw-r--r-- | po/cs.po | 3 | ||||
-rw-r--r-- | po/de.po | 4 | ||||
-rw-r--r-- | po/es.po | 4 | ||||
-rw-r--r-- | po/fr.po | 6 | ||||
-rw-r--r-- | po/hu.po | 3 | ||||
-rw-r--r-- | po/it.po | 4 | ||||
-rw-r--r-- | po/pl.po | 4 | ||||
-rw-r--r-- | po/pt_BR.po | 3 | ||||
-rw-r--r-- | po/ru.po | 3 | ||||
-rw-r--r-- | po/weechat.pot | 3 | ||||
-rw-r--r-- | src/core/wee-command.c | 6 | ||||
-rw-r--r-- | src/core/wee-debug.c | 30 | ||||
-rw-r--r-- | src/core/wee-debug.h | 1 | ||||
-rw-r--r-- | src/core/wee-hook.h | 1 |
19 files changed, 99 insertions, 41 deletions
@@ -7,6 +7,7 @@ v0.3.7-dev, 2011-12-07 Version 0.3.7 (under dev!) -------------------------- +* core: add option "hooks" for command /debug * core: add option "weechat.look.scroll_bottom_after_switch" (if enabled, restore old behaviour before fix of bug #25555 in version 0.3.5) * core: apply filters after full reload of configuration files (with /reload) diff --git a/doc/de/autogen/user/weechat_commands.txt b/doc/de/autogen/user/weechat_commands.txt index 02f701ee6..596d69a5f 100644 --- a/doc/de/autogen/user/weechat_commands.txt +++ b/doc/de/autogen/user/weechat_commands.txt @@ -175,21 +175,22 @@ Beispiele: mouse|cursor [verbose] hdata [free] - list: zeigt alle Erweiterungen mit Debuglevel an - set: setzt den Level der Protokollierung für eine Erweiterung - plugin: Name der Erweiterung ("core" für den WeeChat Kern) - level: Debuglevel der Erweiterung (0 = deaktiviert das Debug) - dump: Speicherabbild in die WeeChat Protokolldatei schreiben (wie bei einem Programmabsturz) - buffer: speichert den Bufferinhalt als hexadezimale Ausgabe in die Protokolldatei - color: zeigt Informationen über die aktuellen Farbpaarungen an - cursor: schaltet den debug-Modus für den Cursor-Modus ein/aus - hdata: zeigt Informationen zu hdata an (mittels free werden alle hdata Informationen aus dem Speicher entfernt) -infolists: zeigt Information über die Infolists an - memory: gibt Informationen über den genutzten Speicher aus - mouse: schaltet den debug-Modus für den Maus-Modus ein/aus - tags: zeigt für jede einzelne Zeile die dazugehörigen Tags an - term: gibt Informationen über das Terminal und verfügbare Farben aus - windows: zeigt die Fensterstruktur an + list: list plugins with debug levels + set: set debug level for plugin + plugin: name of plugin ("core" for WeeChat core) + level: debug level for plugin (0 = disable debug) + dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes) + buffer: dump buffer content with hexadecimal values in log file + color: display infos about current color pairs + cursor: toggle debug for cursor mode + hdata: display infos about hdata (with free: remove all hdata in memory) + hooks: display infos about hooks +infolists: display infos about infolists + memory: display infos about memory usage + mouse: toggle debug for mouse + tags: display tags for lines + term: display infos about terminal + windows: display windows tree ........................................ [[command_weechat_filter]] diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt index 7d5b99b6b..a52c83c06 100644 --- a/doc/en/autogen/user/weechat_commands.txt +++ b/doc/en/autogen/user/weechat_commands.txt @@ -184,6 +184,7 @@ Examples: color: display infos about current color pairs cursor: toggle debug for cursor mode hdata: display infos about hdata (with free: remove all hdata in memory) + hooks: display infos about hooks infolists: display infos about infolists memory: display infos about memory usage mouse: toggle debug for mouse diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt index 490d7fac8..dd745a431 100644 --- a/doc/fr/autogen/user/weechat_commands.txt +++ b/doc/fr/autogen/user/weechat_commands.txt @@ -184,6 +184,7 @@ extension: nom de l'extension ("core" pour le coeur de WeeChat) color: afficher des infos sur les paires de couleur courantes cursor: activer/désactiver le debug pour le mode curseur hdata: afficher des infos sur les hdata (avec free: supprimer tous les hdata en mémoire) + hooks: afficher des infos sur les hooks infolists: afficher des infos sur les infolists memory: afficher des infos sur l'utilisation de la mémoire mouse: activer/désactiver le debug pour la souris diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt index 45bb40ca0..f0afa9b4c 100644 --- a/doc/it/autogen/user/weechat_commands.txt +++ b/doc/it/autogen/user/weechat_commands.txt @@ -175,21 +175,22 @@ Esempi: mouse|cursor [verbose] hdata [free] - list: elenca i plugin con i livelli di debug - set: imposta il livello di debug per il plugin - plugin: nome del plugin ("core" per il core di WeeChat) - livello: livello di debug per il plugin (0 = disattiva debug) - dump: salva un dump della memoria nel file di log di WeeChat (lo stesso dump viene salvato in caso di crash di WeeChat) - buffer: esegue un dump del contenuto del buffer con valori esadecimali nel file di log - color: mostra informazioni sulle coppie di colore correnti - cursor: abilita/disabilita debug per la modalità cursore - hdata: mostra informazioni su hdata (con free: rimuove tutti gli hdata in memoria) -infolists: mostra informazioni sulle liste info - memory: mostra informazioni sull'uso della memoria - mouse: abilita/disabilita debug per il mouse - tags: mostra tag per le righe - term: mostra informazioni sul terminale - windows: mostra l'albero delle finestre + list: list plugins with debug levels + set: set debug level for plugin + plugin: name of plugin ("core" for WeeChat core) + level: debug level for plugin (0 = disable debug) + dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes) + buffer: dump buffer content with hexadecimal values in log file + color: display infos about current color pairs + cursor: toggle debug for cursor mode + hdata: display infos about hdata (with free: remove all hdata in memory) + hooks: display infos about hooks +infolists: display infos about infolists + memory: display infos about memory usage + mouse: toggle debug for mouse + tags: display tags for lines + term: display infos about terminal + windows: display windows tree ........................................ [[command_weechat_filter]] @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 16:25+0100\n" +"POT-Creation-Date: 2011-12-07 17:39+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1148,6 +1148,7 @@ msgid "" " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove all hdata in " "memory)\n" +" hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 16:25+0100\n" +"POT-Creation-Date: 2011-12-07 17:39+0100\n" "PO-Revision-Date: 2011-11-08 22:03+0100\n" "Last-Translator: Nils Görs\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1170,6 +1170,7 @@ msgstr "" "list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1182,6 +1183,7 @@ msgid "" " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove all hdata in " "memory)\n" +" hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 16:25+0100\n" +"POT-Creation-Date: 2011-12-07 17:39+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1152,6 +1152,7 @@ msgstr "" "list || set <plugin> <nivel> || dump [<plugin>] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1164,6 +1165,7 @@ msgid "" " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove all hdata in " "memory)\n" +" hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 16:25+0100\n" -"PO-Revision-Date: 2011-12-07 16:25+0100\n" +"POT-Creation-Date: 2011-12-07 17:39+0100\n" +"PO-Revision-Date: 2011-12-07 17:32+0100\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -1165,6 +1165,7 @@ msgid "" " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove all hdata in " "memory)\n" +" hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" @@ -1184,6 +1185,7 @@ msgstr "" " cursor: activer/désactiver le debug pour le mode curseur\n" " hdata: afficher des infos sur les hdata (avec free: supprimer tous les " "hdata en mémoire)\n" +" hooks: afficher des infos sur les hooks\n" "infolists: afficher des infos sur les infolists\n" " memory: afficher des infos sur l'utilisation de la mémoire\n" " mouse: activer/désactiver le debug pour la souris\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 16:25+0100\n" +"POT-Creation-Date: 2011-12-07 17:39+0100\n" "PO-Revision-Date: 2011-10-22 12:21+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1094,6 +1094,7 @@ msgid "" " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove all hdata in " "memory)\n" +" hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 16:25+0100\n" +"POT-Creation-Date: 2011-12-07 17:39+0100\n" "PO-Revision-Date: 2011-11-15 19:37+0100\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1143,6 +1143,7 @@ msgstr "" "list || set <plugin> <livello> || dump [<plugin>] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1155,6 +1156,7 @@ msgid "" " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove all hdata in " "memory)\n" +" hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 16:25+0100\n" +"POT-Creation-Date: 2011-12-07 17:39+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1157,6 +1157,7 @@ msgstr "" "list || set <wtyczka> <poziom> || dump [<wtyczka>] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1169,6 +1170,7 @@ msgid "" " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove all hdata in " "memory)\n" +" hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index c0600aea3..a082db2a3 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 16:25+0100\n" +"POT-Creation-Date: 2011-12-07 17:39+0100\n" "PO-Revision-Date: 2011-11-03 16:58+0100\n" "Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1209,6 +1209,7 @@ msgid "" " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove all hdata in " "memory)\n" +" hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 16:25+0100\n" +"POT-Creation-Date: 2011-12-07 17:39+0100\n" "PO-Revision-Date: 2011-10-22 12:21+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1101,6 +1101,7 @@ msgid "" " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove all hdata in " "memory)\n" +" hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" diff --git a/po/weechat.pot b/po/weechat.pot index 76e0eb804..d7d8a8c1c 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-12-07 16:25+0100\n" +"POT-Creation-Date: 2011-12-07 17:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -958,6 +958,7 @@ msgid "" " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove all hdata in " "memory)\n" +" hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 1281df16f..8035f2125 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -1320,6 +1320,10 @@ COMMAND_CALLBACK(debug) else debug_hdata (); } + else if (string_strcasecmp (argv[1], "hooks") == 0) + { + debug_hooks (); + } else if (string_strcasecmp (argv[1], "infolists") == 0) { debug_infolists (); @@ -5552,6 +5556,7 @@ command_init () " cursor: toggle debug for cursor mode\n" " hdata: display infos about hdata (with free: remove " "all hdata in memory)\n" + " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" @@ -5565,6 +5570,7 @@ command_init () " || color" " || cursor verbose" " || hdata free" + " || hooks" " || infolists" " || memory" " || mouse verbose" diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c index 6cdacb0f6..6b56cad8c 100644 --- a/src/core/wee-debug.c +++ b/src/core/wee-debug.c @@ -37,6 +37,7 @@ #include "wee-config-file.h" #include "wee-hashtable.h" #include "wee-hdata.h" +#include "wee-hook.h" #include "wee-infolist.h" #include "wee-list.h" #include "wee-log.h" @@ -410,6 +411,35 @@ debug_hdata () } /* + * debug_hooks: display infos about hooks + */ + +void +debug_hooks () +{ + int i, num_hooks, num_hooks_total; + struct t_hook *ptr_hook; + + gui_chat_printf (NULL, ""); + gui_chat_printf (NULL, "hooks in memory:"); + + num_hooks_total = 0; + for (i = 0; i < HOOK_NUM_TYPES; i++) + { + num_hooks = 0; + for (ptr_hook = weechat_hooks[i]; ptr_hook; + ptr_hook = ptr_hook->next_hook) + { + num_hooks++; + } + gui_chat_printf (NULL, "%17s:%5d", hook_type_string[i], num_hooks); + num_hooks_total += num_hooks; + } + gui_chat_printf (NULL, "%17s------", "---------"); + gui_chat_printf (NULL, "%17s:%5d", "total", num_hooks_total); +} + +/* * debug_infolists: display list of infolists in memory */ diff --git a/src/core/wee-debug.h b/src/core/wee-debug.h index d84f8dc3a..0156a26a8 100644 --- a/src/core/wee-debug.h +++ b/src/core/wee-debug.h @@ -26,6 +26,7 @@ extern void debug_sigsegv (); extern void debug_windows_tree (); extern void debug_memory (); extern void debug_hdata (); +extern void debug_hooks (); extern void debug_infolists (); extern void debug_init (); diff --git a/src/core/wee-hook.h b/src/core/wee-hook.h index f65d4aafe..2d738faf0 100644 --- a/src/core/wee-hook.h +++ b/src/core/wee-hook.h @@ -398,6 +398,7 @@ struct t_hook_focus /* hook variables */ +extern char *hook_type_string[]; extern struct t_hook *weechat_hooks[]; extern struct t_hook *last_weechat_hook[]; |