Bug 28344 - How to build the gdb with debugging symbols?
Summary: How to build the gdb with debugging symbols?
Status: RESOLVED NOTABUG
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-16 08:07 UTC by Serge Roussak
Modified: 2021-09-19 02:14 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Roussak 2021-09-16 08:07:51 UTC
I didn't found any info how to build the gdb itself with debugging symbols.
Comment 1 Andreas Schwab 2021-09-16 08:25:02 UTC
Like every other software.
Comment 2 Simon Marchi 2021-09-19 02:14:10 UTC
Let's try to be a bit more helpful here: like most other software using an Autoconf configure script, pass the required flags in the CFLAGS and CXXFLAGS variables (since GDB is a mix of C and C++, you need both).  For example:

$ path/to/configure CFLAGS="-g3 -O0" CXXFLAGS="-g3 -O0"