Outils pour utilisateurs

Outils du site


tech:notes_langage_c

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_langage_c [2026/10/28 13:47] – Jean-Baptistetech:notes_langage_c [2026/11/03 11:06] (Version actuelle) – Jean-Baptiste
Ligne 171: Ligne 171:
 ~~~bash ~~~bash
 gcc -g -O0 mon_programme.c -o mon_programme gcc -g -O0 mon_programme.c -o mon_programme
 +gcc -Wall -Wextra -Werror -ggdb -O0 -std=gnu17 -o hello_world hello_world.c
 ~~~ ~~~
 +
 +
 +~~~bash
 +gcc -o executable -std=c11 -Wall main.c         # Suppose it was this at first
 +gcc -o executable -std=c11 -Wall -ggdb3 main.c  # Add -ggdb3 to it
 +~~~
 +
 +
 +### Valgrind
 +
 +Voir : 
 +* https://valgrind.org/docs/manual/quick-start.html
 +* https://sourcesup.renater.fr/wiki/atelieromp/_media/atelier20180226_lroblou_valgrind.pdf
 +
 +Voir aussi :
 +* heaptrack
 +
 +
 +~~~bash
 +valgrind --leak-check=yes ./mon_programme
 +valgrind --leak-check=full --show-leak-kinds=all ./mon_programme
 +~~~
 +
 +~~~bash
 +valgrind --leak-check=full \
 +         --show-leak-kinds=all \
 +         --track-origins=yes \
 +         --verbose \
 +         --log-file=valgrind-out.txt \
 +         ./executable exampleParam1
 +~~~
 +
  
  
tech/notes_langage_c.1793191639.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki