Skip to content

Commit 3c6348d

Browse files
desowinEvelyne Donnaes
authored andcommitted
GCC ARM: Increase develop and release debug level
Do not specify the debug level for develop and release profiles. Instead rely on the compiler to choose sensible default (-g2). Note that -g1 is minimal debugging information and does not include structure definitions which quite heavily reduces debugging experience. For develop and release profiles this results in elf file containing structure definitions. This does not impact debug profile as it already did use -g3 which is the highest debug level. Compatible debuggers (eg. gdb, SEGGER Ozone) can use the extra information to provide better debugging experience. For example, when compiled .elf is loaded in gdb, this change makes it trivial to access internal RTX data. Without this change on develop profile: (gdb) print osRtxInfo.thread.run 'osRtxInfo' has unknown type; cast it to its declared type With this change on develop profile: (gdb) print osRtxInfo.thread.run $1 = {curr = 0x20014F04, next = 0x20014F04}
1 parent fa620d5 commit 3c6348d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/profiles/develop.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"-fmessage-length=0", "-fno-exceptions",
66
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
77
"-MMD", "-fno-delete-null-pointer-checks",
8-
"-fomit-frame-pointer", "-Os", "-g1", "-DMBED_TRAP_ERRORS_ENABLED=1"],
8+
"-fomit-frame-pointer", "-Os", "-g", "-DMBED_TRAP_ERRORS_ENABLED=1"],
99
"asm": ["-x", "assembler-with-cpp"],
1010
"c": ["-std=gnu11"],
1111
"cxx": ["-std=gnu++14", "-fno-rtti", "-Wvla"],

tools/profiles/release.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"-fmessage-length=0", "-fno-exceptions",
66
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
77
"-MMD", "-fno-delete-null-pointer-checks",
8-
"-fomit-frame-pointer", "-Os", "-DNDEBUG", "-g1"],
8+
"-fomit-frame-pointer", "-Os", "-DNDEBUG", "-g"],
99
"asm": ["-x", "assembler-with-cpp"],
1010
"c": ["-std=gnu11"],
1111
"cxx": ["-std=gnu++14", "-fno-rtti", "-Wvla"],

0 commit comments

Comments
 (0)