aboutsummaryrefslogtreecommitdiff
path: root/gcc/common.opt
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-12-04 10:54:45 +0100
committerJakub Jelinek <jakub@redhat.com>2020-12-04 10:54:45 +0100
commit65312dfc64744405326a9f4c243f1b4c8f21de1b (patch)
treee9c5a9cae5d303385de694fe1b32e1c12a1e9fc0 /gcc/common.opt
parent485b40a5270cf50a7304a9e5cb8aff96bfa3d901 (diff)
downloadgcc-65312dfc64744405326a9f4c243f1b4c8f21de1b.zip
gcc-65312dfc64744405326a9f4c243f1b4c8f21de1b.tar.gz
gcc-65312dfc64744405326a9f4c243f1b4c8f21de1b.tar.bz2
dwarf: Add -gdwarf{32,64} options
The following patch makes the choice between 32-bit and 64-bit DWARF formats selectable by command line switch, rather than being hardcoded through DWARF_OFFSET_SIZE macro. The options themselves don't turn on debug info themselves, so one needs to use -g -gdwarf64 or similar. 2020-12-04 Jakub Jelinek <jakub@redhat.com> * common.opt (-gdwarf32, -gdwarf64): New options. * config/rs6000/rs6000.c (rs6000_option_override_internal): Default dwarf_offset_size to 8 if not overridden from the command line. * dwarf2out.c: Change all occurrences of DWARF_OFFSET_SIZE to dwarf_offset_size. * doc/invoke.texi (-gdwarf32, -gdwarf64): Document.
Diffstat (limited to 'gcc/common.opt')
-rw-r--r--gcc/common.opt8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/common.opt b/gcc/common.opt
index 582e2aa..6645539 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -3178,6 +3178,14 @@ gdwarf-
Common Driver Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs)
Generate debug information in DWARF v2 (or later) format.
+gdwarf32
+Common Driver Var(dwarf_offset_size,4) Init(4) RejectNegative
+Use 32-bit DWARF format when emitting DWARF debug information.
+
+gdwarf64
+Common Driver Var(dwarf_offset_size,8) RejectNegative
+Use 64-bit DWARF format when emitting DWARF debug information.
+
ggdb
Common Driver JoinedOrMissing
Generate debug information in default extended format.