Commit 53b2323e by Richard Henderson

common.opt (gdwarf-): Accept a version number.

	* common.opt (gdwarf-): Accept a version number.
	* doc/invoke.texi (gdwarf-): Update docs.
	* opth-gen.awk: Special case -gdwarf+ to OPT_gdwarfplus.
	* opts.c (common_handle_option) [OPT_gdwarf_]: Verify dwarf
	version level, and record it.

	* dwarf2.h (DW_CIE_VERSION): Remove.
	* dwarf2out.c (DWARF_VERSION): Remove.
	(add_fde_cfi): Skip DW_CFA_set_loc addition for dwarf3.
	(output_call_frame_info): Use CIE version 3 for dwarf3,
	or if the return register column is out of range for version 1.
	(dwarf_stack_op_name): Add all dwarf3 values.
	(DEBUG_PUBTYPES_SECTION): New.
	(size_of_die) [dw_val_class_die_ref]: Handle DW_FORM_ref_addr
	encoding change for dwarf3.
	(output_die) [dw_val_class_die_ref]: Likewise.
	(output_compilation_unit_header): Emit correct version for dwarf3.
	(output_line_info): Likewise.
	(output_pubnames): Update for DWARF_VERSION removal.
	(output_aranges): Likewise.
	(gen_subprogram_die): Emit DW_OP_call_frame_cfa if emitting dwarf3.
	(dwarf2out_init): Don't ifdef DEBUG_PUBTYPES_SECTION.
	(dwarf2out_finish): Likewise.

ada/
	* gcc-interface/misc.c (gnat_handle_option): Rename
	OPT_gdwarf_ to OPT_gdwarfplus.

From-SVN: r148408
parent 1c3bbaa7
2009-06-11 Richard Henderson <rth@redhat.com>
* gcc-interface/misc.c (gnat_handle_option): Rename
OPT_gdwarf_ to OPT_gdwarfplus.
2009-06-11 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Resolve_Attribute, case 'access): Add missing
......@@ -105,7 +110,7 @@
* gcc-interface/Make-lang.in: Fix formatting.
2009-06-01 Olivier Hainque <hainque@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (convert) <CONSTRUCTOR case>: When converting
to the packable version of the type, clear TREE_STATIC/TREE_CONSTANT
......@@ -113,7 +118,7 @@
as a static constant any more.
2009-06-01 Olivier Hainque <hainque@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (gnat_build_constructor): Factor
out code. Use initializer_constant_valid_for_bitfield_p and
......@@ -293,7 +298,7 @@
GPS.
* sinput.ads, sinput.adb (Expr_First_Char): New function
(Expr_Last_Char): New function
(Expr_Last_Char): New function
2009-05-06 Sergey Rybin <rybin@adacore.com>
......@@ -1313,9 +1318,9 @@
* prj-proc.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb
(Source_Iterator): new type.
This removes the need for having the sources on three different
lists at the project tree, project and language level. They are now
on a single list.
This removes the need for having the sources on three different
lists at the project tree, project and language level. They are now
on a single list.
2009-04-24 Emmanuel Briot <briot@adacore.com>
......@@ -1344,7 +1349,7 @@
efficient.
2009-04-24 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Thomas Quinot <quinot@adacore.com>
Thomas Quinot <quinot@adacore.com>
* fe.h (Set_Identifier_Casing): Add const to second parameter.
* gcc-interface/misc.c (internal_error_function): Make copy of return
......@@ -5522,17 +5527,17 @@
2009-04-09 Robert Dewar <dewar@adacore.com>
* checks.adb:
(Insert_Valid_Check): Avoid unnecessary generation of junk declaration
when no invalid values exist, Avoid duplicate read of atomic variable.
* checks.adb:
(Insert_Valid_Check): Avoid unnecessary generation of junk declaration
when no invalid values exist, Avoid duplicate read of atomic variable.
* cstand.adb (Build_Signed_Integer_Type): Set Is_Known_Valid
(Standard_Unsigned): Set Is_Known_Valid
* cstand.adb (Build_Signed_Integer_Type): Set Is_Known_Valid
(Standard_Unsigned): Set Is_Known_Valid
* sem_ch3.adb (Analyze_Subtype_Declaration): Copy Is_Known_Valid on
* sem_ch3.adb (Analyze_Subtype_Declaration): Copy Is_Known_Valid on
subtype declaration if no constraint.
(Set_Modular_Size): Set Is_Known_Valid if appropriate
(Build_Derived_Numeric_Type): Copy Is_Known_Valid if no constraint
(Set_Modular_Size): Set Is_Known_Valid if appropriate
(Build_Derived_Numeric_Type): Copy Is_Known_Valid if no constraint
2009-04-09 Robert Dewar <dewar@adacore.com>
......
......@@ -272,8 +272,8 @@ gnat_handle_option (size_t scode, const char *arg, int value)
gnat_argc++;
break;
case OPT_gdwarf_:
gnat_dwarf_extensions ++;
case OPT_gdwarfplus:
gnat_dwarf_extensions = 1;
break;
default:
......
......@@ -1410,12 +1410,12 @@ Common JoinedOrMissing
Generate debug information in default format
gcoff
Common JoinedOrMissing Negative(gdwarf-2)
Common JoinedOrMissing Negative(gdwarf-)
Generate debug information in COFF format
gdwarf-2
Common JoinedOrMissing Negative(gstabs)
Generate debug information in DWARF v2 format
gdwarf-
Common Joined UInteger Var(dwarf_version) Init(2) Negative(gstabs)
Generate debug information in DWARF v2 (or later) format
ggdb
Common JoinedOrMissing
......
......@@ -310,7 +310,7 @@ Objective-C and Objective-C++ Dialects}.
-frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
-fsel-sched-verbose -fsel-sched-dump-cfg -fsel-sched-pipelining-verbose @gol
-ftest-coverage -ftime-report -fvar-tracking @gol
-g -g@var{level} -gtoggle -gcoff -gdwarf-2 @gol
-g -g@var{level} -gtoggle -gcoff -gdwarf-@var{version} @gol
-ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+ @gol
-fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol
-fdebug-prefix-map=@var{old}=@var{new} @gol
......@@ -4344,13 +4344,14 @@ use of these extensions is likely to make other debuggers crash or
refuse to read the program, and may cause assemblers other than the GNU
assembler (GAS) to fail with an error.
@item -gdwarf-2
@opindex gdwarf-2
Produce debugging information in DWARF version 2 format (if that is
supported). This is the format used by DBX on IRIX 6. With this
option, GCC uses features of DWARF version 3 when they are useful;
version 3 is upward compatible with version 2, but may still cause
problems for older debuggers.
@item -gdwarf-@var{version}
@opindex gdwarf-@var{version}
Produce debugging information in DWARF format (if that is
supported). This is the format used by DBX on IRIX 6. The value
of @var{version} may be either 2 or 3; the default version is 2.
Note that with DWARF version 2 some ports require, and will always
use, some non-conflicting DWARF 3 extensions in the unwind tables.
@item -gvms
@opindex gvms
......@@ -4384,7 +4385,7 @@ debug information in version 1 of the DWARF format (which is very
different from version 2), and it would have been too confusing. That
debug format is long obsolete, but the option cannot be changed now.
Instead use an additional @option{-g@var{level}} option to change the
debug level for DWARF2.
debug level for DWARF.
@item -gtoggle
@opindex gtoggle
......
......@@ -782,7 +782,6 @@ enum dwarf_call_frame_info
#define DW_CIE_ID 0xffffffff
#define DW64_CIE_ID 0xffffffffffffffffULL
#define DW_CIE_VERSION 1
#define DW_CFA_extended 0
......
......@@ -333,6 +333,8 @@ for (i = 0; i < n_opts; i++) {
enum = "OPT_" opts[i]
if (opts[i] == "finline-limit=" || opts[i] == "Wlarger-than=")
enum = enum "eq"
if (opts[i] == "gdwarf+")
enum = "OPT_gdwarfplus"
gsub ("[^A-Za-z0-9]", "_", enum)
# If this switch takes joined arguments, back-chain all
......@@ -348,7 +350,7 @@ for (i = 0; i < n_opts; i++) {
}
}
s = substr(" ", length (opts[i]))
s = substr(" ", length (enum))
if (i + 1 == n_opts)
comma = ""
......
......@@ -2033,8 +2033,12 @@ common_handle_option (size_t scode, const char *arg, int value,
set_debug_level (SDB_DEBUG, false, arg);
break;
case OPT_gdwarf_2:
set_debug_level (DWARF2_DEBUG, false, arg);
case OPT_gdwarf_:
if (value < 2 || value > 3)
error ("dwarf version %d is not supported", value);
else
dwarf_version = value;
set_debug_level (DWARF2_DEBUG, false, "");
break;
case OPT_ggdb:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment