diff options
author | Olivier Hainque <hainque@adacore.com> | 2012-04-24 20:34:30 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2012-04-24 20:34:30 +0000 |
commit | 7a9cf7e9c3c4c5b1b27fbf29206bcd3ade31e86f (patch) | |
tree | 9284abef1d612ed53ee27cb059198eb1351edd47 | |
parent | bc9201591d2d677dc21819ff8f11de18983f1f61 (diff) | |
download | gcc-7a9cf7e9c3c4c5b1b27fbf29206bcd3ade31e86f.tar.gz |
common.opt (gdwarf-): Initialize dwarf_version to -1 instead of 2.
* common.opt (gdwarf-): Initialize dwarf_version to -1 instead of 2.
* toplev.c (process_options): Default to dwarf_version 2.
* config/vxworks.c (vxworks_override_options): Default to strict-dwarf
and dwarf_version 2.
From-SVN: r186783
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/common.opt | 2 | ||||
-rw-r--r-- | gcc/config/vxworks.c | 8 | ||||
-rw-r--r-- | gcc/toplev.c | 4 |
4 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3be610718c8..a7e7ee56460 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-04-24 Olivier Hainque <hainque@adacore.com> + + * common.opt (gdwarf-): Initialize dwarf_version to -1 instead of 2. + * toplev.c (process_options): Default to dwarf_version 2. + * config/vxworks.c (vxworks_override_options): Default to strict-dwarf + and dwarf_version 2. + 2012-04-24 Manuel López-Ibáñez <manu@gcc.gnu.org> * tree-pretty-print.h (default_tree_printer): Do not declare. diff --git a/gcc/common.opt b/gcc/common.opt index aa6ebfe5e94..df942275d95 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -2212,7 +2212,7 @@ Common JoinedOrMissing Negative(gdwarf-) Generate debug information in COFF format gdwarf- -Common Joined UInteger Var(dwarf_version) Init(2) Negative(gstabs) +Common Joined UInteger Var(dwarf_version) Init(-1) Negative(gstabs) Generate debug information in DWARF v2 (or later) format ggdb diff --git a/gcc/config/vxworks.c b/gcc/config/vxworks.c index 2445c8b5a35..1e5a7ad82a6 100644 --- a/gcc/config/vxworks.c +++ b/gcc/config/vxworks.c @@ -144,4 +144,12 @@ vxworks_override_options (void) /* PIC is only supported for RTPs. */ if (flag_pic && !TARGET_VXWORKS_RTP) error ("PIC is only supported for RTPs"); + + /* Default to strict dwarf-2 to prevent potential difficulties observed with + non-gdb debuggers on extensions > 2. */ + if (dwarf_strict < 0) + dwarf_strict = 1; + + if (dwarf_version < 0) + dwarf_version = 2; } diff --git a/gcc/toplev.c b/gcc/toplev.c index 3d9e1626b80..fcfdba2aefb 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1380,6 +1380,10 @@ process_options (void) if (dwarf_strict < 0) dwarf_strict = 0; + /* And select a default dwarf level. */ + if (dwarf_version < 0) + dwarf_version = 2; + /* A lot of code assumes write_symbols == NO_DEBUG if the debugging level is 0. */ if (debug_info_level == DINFO_LEVEL_NONE) |