emacs-31 eebc9c7fe72: ; * etc/DEBUG: Info about -g3 on OpenBSD (bug#81109).
Eli Zaretskii <[email protected]> Sun, 12 Jul 2026 02:57:26 -0400 (EDT)
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: emacs-31 commit eebc9c7fe72821cd4d6b91fd03d5fff74659d7a2 Author: Eli Zaretskii <[email protected]> Commit: Eli Zaretskii <[email protected]> ; * etc/DEBUG: Info about -g3 on OpenBSD (bug#81109). --- etc/DEBUG | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/DEBUG b/etc/DEBUG index e70fe8de390..ff0e1932dce 100644 --- a/etc/DEBUG +++ b/etc/DEBUG @@ -25,8 +25,15 @@ happens only with optimized code, you may need to enable optimizations. If that happens, try using -Og first instead of -O2, as -Og disables some optimizations that make debugging some code exceptionally hard. -Older versions of GCC may need more than just the -g3 flag. For more, -search for "analyze failed assertions" below. +The -g3 option is needed to allow GDB expand macros, which the Emacs C +code uses a lot; without it, you will need to look up the macro +definitions in the C headers and source files, and expand them by hand, +before using them in expressions you want GDB to evaluate. Older +versions of GCC may need more than just the -g3 flag. Also, Emacs +compiled with -g3 reportedly causes GDB to crash on OpenBSD, so on that +OS you should instead use either -ggdb or just -g (and the macro +information will be unavailable to GDB, unfortunately). For more about +-g3, search for "analyze failed assertions" below. The 2 --enable-* switches are optional. They don't have any effect on debugging with GDB, but will compile additional code that might catch