outils de déboguage
Taurus :
[taurusCMD] --taurus-log-level=[NIVEAU] PROGRAMME.py
# avec [NIVEAU]=critical, error, warning/warn, info, debug, trace
Python :
python -tt -v PROGRAMME.py
le -v peut être augmenté pour augmenter le niveau de verbosité : -vv
Gcc/cLang
utiliser les options
-v -Wall -Werror -Wextra -Wformat=2 -Wwrite-strings -Wunreachable-code -Wshadow -Wmissing-prototypes -Wpedantic
-
-Wall: active toutes les alertes faciles à éviter (source : https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall) -
-Wextra: actives des alertes supplémentaires (source : https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-W) -
-Werror: transforme les alertes en erreurs (source : https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Werror) -
-Wformat=2: vérifie les appels àprintfetscanf, etc. (source : https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat) -
-Wwrite-strings: identifie en cas d'écriture dans des chaînes (source : https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wwrite-strings) -
-Wunreachable-code: identifie les lignes qui ne seront jamais exécutées, déprécié en 2011 après la v4.4 (https://gcc.gnu.org/legacy-ml/gcc-help/2011-05/msg00360.html) -
-Wshadow: prvient en cas de masquage d'une déclaration par une autre (source : https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wshadow) -
-Wmissing-prototypes: identifie les déclarations de fonction sans déclaration préalable de prototype, invalide en C++ (source : https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmissing-prototypes) -
-Wpedantic: identifie les non conformité aux normes ISO C et C++ (source : https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-pedantic-1) le-Wconversionprévient de toute conversion non explicite
La compilation avec ces deux compilateurs donne accès à des messages d'erreurs et des alertes complémentaires.
source :
- https://paperstreet.picty.org/yeye/resources/magazine-linuxmag-Levillain18/document.pdf (GNU/Linux Magazine HS n°97, juillet-août 2018)
- https://connect.ed-diamond.com/GNU-Linux-Magazine/glmfhs-076/les-options-de-securite-de-gcc (GNU/Linux Magazine HS n°76, janvier 2015)
Edited by Philippe Gauron