From b6d6c070082877779184d534d9e6d27cb12452d1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 May 2023 10:54:56 +1000 Subject: [PATCH] waf: added -g option to configure this adds debug symbolds to the build without enabling other debug code. This is needed for analysing watchdog crash dumps --- Tools/ardupilotwaf/boards.py | 4 ++++ wscript | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index a4e30077fe..426f01baae 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -261,6 +261,10 @@ class Board: env.DEFINES.update( HAL_DEBUG_BUILD = 1, ) + elif cfg.options.g: + env.CFLAGS += [ + '-g', + ] if cfg.env.COVERAGE: env.CFLAGS += [ '-fprofile-arcs', diff --git a/wscript b/wscript index cb4793c0bf..f3b18ebb06 100644 --- a/wscript +++ b/wscript @@ -125,6 +125,11 @@ def options(opt): default=False, help='Configure as debug variant.') + g.add_option('-g', + action='store_true', + default=False, + help='Add debug symbolds to build.') + g.add_option('--disable-watchdog', action='store_true', default=False,