gdb/gdb-6.8-fortran-tag-constant.patch
Jan Kratochvil e3c8b47c74 - Remove `gdb-6.3-nonthreaded-wp-20050117.patch' as obsoleted + regressing
now.
- Make the GDB quit processing non-abortable to cleanup everything
    properly.
- Support DW_TAG_constant for Fortran in recent Fedora/RH GCCs.
- Fix crash on DW_TAG_module for Fortran in recent Fedora/RH GCCs.
- Readd resolving of bare names of constructors and destructors.
- Include various vendor testcases:
- Leftover zombie process (BZ 243845).
- Multithreaded watchpoints (`gdb.threads/watchthreads2.exp').
- PIE testcases (`gdb.pie/*').
- C++ contructors/destructors (`gdb.cp/constructortest.exp').
2008-08-27 11:07:47 +00:00

75 lines
2.6 KiB
Diff

--- ./gdb/dwarf2read.c 21 Aug 2008 18:57:34 -0000 1.276
+++ ./gdb/dwarf2read.c 26 Aug 2008 17:54:37 -0000
@@ -1798,6 +1798,7 @@ scan_partial_symbols (struct partial_die
}
break;
case DW_TAG_variable:
+ case DW_TAG_constant:
case DW_TAG_typedef:
case DW_TAG_union_type:
if (!pdi->is_declaration)
@@ -1983,6 +1984,7 @@ add_partial_symbol (struct partial_die_i
}
break;
case DW_TAG_variable:
+ case DW_TAG_constant:
if (pdi->is_external)
{
/* Global Variable.
@@ -3590,7 +3593,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. */
@@ -4069,7 +4073,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
@@ -4188,6 +4193,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. */
@@ -5565,6 +5571,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
&& abbrev->tag != DW_TAG_enumerator
&& abbrev->tag != DW_TAG_subprogram
&& abbrev->tag != DW_TAG_variable
+ && abbrev->tag != DW_TAG_constant
&& abbrev->tag != DW_TAG_namespace
&& abbrev->tag != DW_TAG_member)
{
@@ -5672,6 +5679,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)
{
@@ -7579,6 +7579,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