[bootlin/training-materials updates] master: debugging: slides: add various gcc debug levels (f69cf26b)

Clément Léger clement.leger at bootlin.com
Mon Nov 28 15:03:45 CET 2022

Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/f69cf26b439137e82f154a811624ceed377608d7


commit f69cf26b439137e82f154a811624ceed377608d7
Author: Clément Léger <clement.leger at bootlin.com>
Date:   Mon Nov 28 14:29:24 2022 +0100

    debugging: slides: add various gcc debug levels
    As requested by a trainee, add various gcc debugging level for -g.
    Signed-off-by: Clément Léger <clement.leger at bootlin.com>


 .../debugging-linux-application-stack.tex                 | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/slides/debugging-linux-application-stack/debugging-linux-application-stack.tex b/slides/debugging-linux-application-stack/debugging-linux-application-stack.tex
index 1c7a6071..823f91d1 100644
--- a/slides/debugging-linux-application-stack/debugging-linux-application-stack.tex
+++ b/slides/debugging-linux-application-stack/debugging-linux-application-stack.tex
@@ -496,17 +496,16 @@ root          11       2 [rcu_tasks_kthread]          TS
       \item Allows the debugger to match addresses and symbol names, call
             sites, etc
       \item Debugging information is generated by GDB and included in the
-            ELF file if compiled with \code{-g}
+            ELF file when compiled with \code{-g}
-        \item Can even use \code{-g3} to include extra debugging information (macros,
-              etc)
+        \item \code{-g1}: minimal debug information (enough for backtraces)
+        \item \code{-g2}: default debug level when using \code{-g}
+        \item \code{-g3}: includes extra debugging information (macro
+          definitions)
+      \item See \href{https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html}{GCC documentation}
+        about debugging for more information
-    \begin{block}{}
-      \begin{minted}[fontsize=\small]{console}
-$ gcc -g file.c -o program
-      \end{minted}
-    \end{block}

More information about the training-materials-updates mailing list