gdb/gdb-6.8-fortran-tag-constant.patch
Jan Kratochvil 36474ab6e8 - Include the Archer Project: http://sourceware.org/gdb/wiki/ProjectArcher
http://sourceware.org/gdb/wiki/PythonGdb
[catch-syscall] Trap and display syscalls.
[delayed-symfile] Improve startup performance by lazily read psymtabs.
[exception-rewind] Fix fatal C++ exceptions in an inferior function call.
[expr] Expressions, single-quote elimination, C++ input canonicalization.
[using-directive] C++ namespaces.
[vla] C variable length arrays / DW_FORM_block / Fortran dynamic arrays.
[misc] Fix debuginfoless `return' (BZ 365111), fix command-line macros for
    expected GCC (BZ 479914), new testcase for valgrind (for BZ 483262),
    implement `info common' for Fortran, fix Fortran logical-kind=8 (BZ
    465310), fix static variable in C++ constructors (BZ 445912), fix
    power7 (BZ 485319).
- Upgrade to the FSF GDB gdb-6.8.50 snapshot.
- Fix parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457187).
- Turn on 64-bit BFD support, globally enable AC_SYS_LARGEFILE.
2009-03-02 23:14:15 +00:00

77 lines
2.8 KiB
Diff

Index: gdb-6.8.50.20090228/gdb/dwarf2read.c
===================================================================
--- gdb-6.8.50.20090228.orig/gdb/dwarf2read.c 2009-03-02 01:07:36.000000000 +0100
+++ gdb-6.8.50.20090228/gdb/dwarf2read.c 2009-03-02 01:07:50.000000000 +0100
@@ -1996,6 +1996,7 @@ scan_partial_symbols (struct partial_die
add_partial_subprogram (pdi, lowpc, highpc, need_pc, cu);
break;
case DW_TAG_variable:
+ case DW_TAG_constant:
case DW_TAG_typedef:
case DW_TAG_union_type:
if (!pdi->is_declaration)
@@ -2211,6 +2212,7 @@ add_partial_symbol (struct partial_die_i
}
break;
case DW_TAG_variable:
+ case DW_TAG_constant:
if (pdi->is_external)
{
/* Global Variable.
@@ -4213,7 +4215,8 @@ dwarf2_add_field (struct field_info *fip
fip->non_public_fields = 1;
}
}
- else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable)
+ else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable
+ || die->tag == DW_TAG_constant)
{
/* C++ static member. */
@@ -4703,7 +4706,8 @@ read_structure_type (struct die_info *di
while (child_die && child_die->tag)
{
if (child_die->tag == DW_TAG_member
- || child_die->tag == DW_TAG_variable)
+ || child_die->tag == DW_TAG_variable
+ || child_die->tag == DW_TAG_constant)
{
/* NOTE: carlton/2002-11-05: A C++ static data member
should be a DW_TAG_member that is a declaration, but
@@ -4822,6 +4826,7 @@ process_structure_scope (struct die_info
{
if (child_die->tag == DW_TAG_member
|| child_die->tag == DW_TAG_variable
+ || child_die->tag == DW_TAG_constant
|| child_die->tag == DW_TAG_inheritance)
{
/* Do nothing. */
@@ -6455,6 +6460,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
&& abbrev->tag != DW_TAG_subprogram
&& abbrev->tag != DW_TAG_lexical_block
&& abbrev->tag != DW_TAG_variable
+ && abbrev->tag != DW_TAG_constant
&& abbrev->tag != DW_TAG_namespace
&& abbrev->tag != DW_TAG_member)
{
@@ -6562,6 +6568,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
if (load_all
|| abbrev->tag == DW_TAG_subprogram
|| abbrev->tag == DW_TAG_variable
+ || abbrev->tag == DW_TAG_constant
|| abbrev->tag == DW_TAG_namespace
|| part_die->is_declaration)
{
@@ -8341,6 +8348,11 @@ new_symbol (struct die_info *die, struct
/* Do not add the symbol to any lists. It will be found via
BLOCK_FUNCTION from the blockvector. */
break;
+ case DW_TAG_constant:
+ SYMBOL_TYPE (sym) = make_cv_type (1,
+ TYPE_VOLATILE (SYMBOL_TYPE (sym)),
+ SYMBOL_TYPE (sym), NULL);
+ /* PASSTHRU */
case DW_TAG_variable:
/* Compilation with minimal debug info may result in variables
with missing type entries. Change the misleading `void' type