|
|
a97b573 |
Index: gdb-6.8.50.20090811/gdb/dwarf2read.c
|
|
|
407ebe9 |
===================================================================
|
|
|
a97b573 |
--- gdb-6.8.50.20090811.orig/gdb/dwarf2read.c 2009-08-13 10:14:45.000000000 +0200
|
|
|
a97b573 |
+++ gdb-6.8.50.20090811/gdb/dwarf2read.c 2009-08-13 10:22:36.000000000 +0200
|
|
|
a97b573 |
@@ -2480,6 +2480,7 @@ scan_partial_symbols (struct partial_die
|
|
|
a1707b2 |
add_partial_subprogram (pdi, lowpc, highpc, need_pc, cu);
|
|
|
e3c8b47 |
break;
|
|
|
e3c8b47 |
case DW_TAG_variable:
|
|
|
e3c8b47 |
+ case DW_TAG_constant:
|
|
|
e3c8b47 |
case DW_TAG_typedef:
|
|
|
e3c8b47 |
case DW_TAG_union_type:
|
|
|
e3c8b47 |
if (!pdi->is_declaration)
|
|
|
a97b573 |
@@ -2675,6 +2676,7 @@ add_partial_symbol (struct partial_die_i
|
|
|
e3c8b47 |
}
|
|
|
e3c8b47 |
break;
|
|
|
e3c8b47 |
case DW_TAG_variable:
|
|
|
e3c8b47 |
+ case DW_TAG_constant:
|
|
|
e3c8b47 |
if (pdi->is_external)
|
|
|
e3c8b47 |
{
|
|
|
e3c8b47 |
/* Global Variable.
|
|
|
a97b573 |
@@ -2805,6 +2807,7 @@ die_needs_namespace (struct die_info *di
|
|
|
a97b573 |
return 1;
|
|
|
a97b573 |
|
|
|
a97b573 |
case DW_TAG_variable:
|
|
|
a97b573 |
+ case DW_TAG_constant:
|
|
|
a97b573 |
{
|
|
|
a97b573 |
struct attribute *attr;
|
|
|
a97b573 |
attr = dwarf2_attr (die, DW_AT_specification, cu);
|
|
|
a97b573 |
@@ -4741,7 +4744,8 @@ dwarf2_add_field (struct field_info *fip
|
|
|
e3c8b47 |
fip->non_public_fields = 1;
|
|
|
e3c8b47 |
}
|
|
|
e3c8b47 |
}
|
|
|
e3c8b47 |
- else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable)
|
|
|
e3c8b47 |
+ else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable
|
|
|
e3c8b47 |
+ || die->tag == DW_TAG_constant)
|
|
|
e3c8b47 |
{
|
|
|
e3c8b47 |
/* C++ static member. */
|
|
|
e3c8b47 |
|
|
|
a97b573 |
@@ -5233,7 +5237,8 @@ read_structure_type (struct die_info *di
|
|
|
e3c8b47 |
while (child_die && child_die->tag)
|
|
|
e3c8b47 |
{
|
|
|
e3c8b47 |
if (child_die->tag == DW_TAG_member
|
|
|
e3c8b47 |
- || child_die->tag == DW_TAG_variable)
|
|
|
e3c8b47 |
+ || child_die->tag == DW_TAG_variable
|
|
|
e3c8b47 |
+ || child_die->tag == DW_TAG_constant)
|
|
|
e3c8b47 |
{
|
|
|
e3c8b47 |
/* NOTE: carlton/2002-11-05: A C++ static data member
|
|
|
e3c8b47 |
should be a DW_TAG_member that is a declaration, but
|
|
|
a97b573 |
@@ -5352,6 +5357,7 @@ process_structure_scope (struct die_info
|
|
|
e3c8b47 |
{
|
|
|
e3c8b47 |
if (child_die->tag == DW_TAG_member
|
|
|
e3c8b47 |
|| child_die->tag == DW_TAG_variable
|
|
|
e3c8b47 |
+ || child_die->tag == DW_TAG_constant
|
|
|
e3c8b47 |
|| child_die->tag == DW_TAG_inheritance)
|
|
|
e3c8b47 |
{
|
|
|
e3c8b47 |
/* Do nothing. */
|
|
|
a97b573 |
@@ -6980,6 +6986,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
|
|
e3c8b47 |
&& abbrev->tag != DW_TAG_subprogram
|
|
|
407ebe9 |
&& abbrev->tag != DW_TAG_lexical_block
|
|
|
e3c8b47 |
&& abbrev->tag != DW_TAG_variable
|
|
|
e3c8b47 |
+ && abbrev->tag != DW_TAG_constant
|
|
|
e3c8b47 |
&& abbrev->tag != DW_TAG_namespace
|
|
|
a97b573 |
&& abbrev->tag != DW_TAG_module
|
|
|
e3c8b47 |
&& abbrev->tag != DW_TAG_member)
|
|
|
a97b573 |
@@ -7088,6 +7095,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
|
|
|
e3c8b47 |
if (load_all
|
|
|
e3c8b47 |
|| abbrev->tag == DW_TAG_subprogram
|
|
|
e3c8b47 |
|| abbrev->tag == DW_TAG_variable
|
|
|
e3c8b47 |
+ || abbrev->tag == DW_TAG_constant
|
|
|
e3c8b47 |
|| abbrev->tag == DW_TAG_namespace
|
|
|
e3c8b47 |
|| part_die->is_declaration)
|
|
|
e3c8b47 |
{
|
|
|
a97b573 |
@@ -8901,6 +8909,11 @@ new_symbol (struct die_info *die, struct
|
|
|
e3c8b47 |
/* Do not add the symbol to any lists. It will be found via
|
|
|
e3c8b47 |
BLOCK_FUNCTION from the blockvector. */
|
|
|
e3c8b47 |
break;
|
|
|
e3c8b47 |
+ case DW_TAG_constant:
|
|
|
e3c8b47 |
+ SYMBOL_TYPE (sym) = make_cv_type (1,
|
|
|
e3c8b47 |
+ TYPE_VOLATILE (SYMBOL_TYPE (sym)),
|
|
|
e3c8b47 |
+ SYMBOL_TYPE (sym), NULL);
|
|
|
e3c8b47 |
+ /* PASSTHRU */
|
|
|
e3c8b47 |
case DW_TAG_variable:
|
|
|
e3c8b47 |
/* Compilation with minimal debug info may result in variables
|
|
|
e3c8b47 |
with missing type entries. Change the misleading `void' type
|