]>
Commit | Line | Data |
---|---|---|
7566401a | 1 | Index: gdb-6.8.50.20090811/gdb/dwarf2read.c |
3a58abaf | 2 | =================================================================== |
7566401a ER |
3 | --- gdb-6.8.50.20090811.orig/gdb/dwarf2read.c 2009-08-13 10:14:45.000000000 +0200 |
4 | +++ gdb-6.8.50.20090811/gdb/dwarf2read.c 2009-08-13 10:22:36.000000000 +0200 | |
5 | @@ -2480,6 +2480,7 @@ scan_partial_symbols (struct partial_die | |
3a58abaf AM |
6 | add_partial_subprogram (pdi, lowpc, highpc, need_pc, cu); |
7 | break; | |
8 | case DW_TAG_variable: | |
9 | + case DW_TAG_constant: | |
10 | case DW_TAG_typedef: | |
11 | case DW_TAG_union_type: | |
12 | if (!pdi->is_declaration) | |
7566401a | 13 | @@ -2675,6 +2676,7 @@ add_partial_symbol (struct partial_die_i |
3a58abaf AM |
14 | } |
15 | break; | |
16 | case DW_TAG_variable: | |
17 | + case DW_TAG_constant: | |
18 | if (pdi->is_external) | |
19 | { | |
20 | /* Global Variable. | |
7566401a ER |
21 | @@ -2805,6 +2807,7 @@ die_needs_namespace (struct die_info *di |
22 | return 1; | |
23 | ||
24 | case DW_TAG_variable: | |
25 | + case DW_TAG_constant: | |
26 | { | |
27 | struct attribute *attr; | |
28 | attr = dwarf2_attr (die, DW_AT_specification, cu); | |
29 | @@ -4741,7 +4744,8 @@ dwarf2_add_field (struct field_info *fip | |
3a58abaf AM |
30 | fip->non_public_fields = 1; |
31 | } | |
32 | } | |
33 | - else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable) | |
34 | + else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable | |
35 | + || die->tag == DW_TAG_constant) | |
36 | { | |
37 | /* C++ static member. */ | |
38 | ||
7566401a | 39 | @@ -5233,7 +5237,8 @@ read_structure_type (struct die_info *di |
3a58abaf AM |
40 | while (child_die && child_die->tag) |
41 | { | |
42 | if (child_die->tag == DW_TAG_member | |
43 | - || child_die->tag == DW_TAG_variable) | |
44 | + || child_die->tag == DW_TAG_variable | |
45 | + || child_die->tag == DW_TAG_constant) | |
46 | { | |
47 | /* NOTE: carlton/2002-11-05: A C++ static data member | |
48 | should be a DW_TAG_member that is a declaration, but | |
7566401a | 49 | @@ -5352,6 +5357,7 @@ process_structure_scope (struct die_info |
3a58abaf AM |
50 | { |
51 | if (child_die->tag == DW_TAG_member | |
52 | || child_die->tag == DW_TAG_variable | |
53 | + || child_die->tag == DW_TAG_constant | |
54 | || child_die->tag == DW_TAG_inheritance) | |
55 | { | |
56 | /* Do nothing. */ | |
7566401a | 57 | @@ -6980,6 +6986,7 @@ load_partial_dies (bfd *abfd, gdb_byte * |
3a58abaf AM |
58 | && abbrev->tag != DW_TAG_subprogram |
59 | && abbrev->tag != DW_TAG_lexical_block | |
60 | && abbrev->tag != DW_TAG_variable | |
61 | + && abbrev->tag != DW_TAG_constant | |
62 | && abbrev->tag != DW_TAG_namespace | |
7566401a | 63 | && abbrev->tag != DW_TAG_module |
3a58abaf | 64 | && abbrev->tag != DW_TAG_member) |
7566401a | 65 | @@ -7088,6 +7095,7 @@ load_partial_dies (bfd *abfd, gdb_byte * |
3a58abaf AM |
66 | if (load_all |
67 | || abbrev->tag == DW_TAG_subprogram | |
68 | || abbrev->tag == DW_TAG_variable | |
69 | + || abbrev->tag == DW_TAG_constant | |
70 | || abbrev->tag == DW_TAG_namespace | |
71 | || part_die->is_declaration) | |
72 | { | |
7566401a | 73 | @@ -8901,6 +8909,11 @@ new_symbol (struct die_info *die, struct |
3a58abaf AM |
74 | /* Do not add the symbol to any lists. It will be found via |
75 | BLOCK_FUNCTION from the blockvector. */ | |
76 | break; | |
77 | + case DW_TAG_constant: | |
78 | + SYMBOL_TYPE (sym) = make_cv_type (1, | |
79 | + TYPE_VOLATILE (SYMBOL_TYPE (sym)), | |
80 | + SYMBOL_TYPE (sym), NULL); | |
81 | + /* PASSTHRU */ | |
82 | case DW_TAG_variable: | |
83 | /* Compilation with minimal debug info may result in variables | |
84 | with missing type entries. Change the misleading `void' type |