From db42de1ba6db148f5b1e1b6ed7c593eac1fd8f48 Mon Sep 17 00:00:00 2001 From: huyang531 Date: Thu, 11 Jul 2024 12:23:36 +0300 Subject: [PATCH] guide/debugging: Add tips for disabling compiler optimization Signed-off-by: Yang Hu --- content/guides/debugging.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/guides/debugging.mdx b/content/guides/debugging.mdx index e66901c3..b40c1dbb 100644 --- a/content/guides/debugging.mdx +++ b/content/guides/debugging.mdx @@ -82,7 +82,8 @@ TThe build system always creates two image files for each selected platform: * one that includes debugging information and symbols (`.dbg` file extension) * one that does not -Before using GDB, go to the configuration menu under `Build Options` and select a `Debug information level` that is bigger than 0. +Before using GDB, make sure compiler optimization is turned off: in the configuration menu, go to `Build Options` --> `Optimization level` and select `No optimizations`. +Then, under `Build Options`, select a `Debug information level` that is bigger than 0. We recommend 3, the highest level.