]>
Commit | Line | Data |
---|---|---|
3a58abaf AM |
1 | Index: gdb-6.8.50.20090228/gdb/dwarf2read.c |
2 | =================================================================== | |
3 | --- gdb-6.8.50.20090228.orig/gdb/dwarf2read.c 2009-03-02 01:07:36.000000000 +0100 | |
4 | +++ gdb-6.8.50.20090228/gdb/dwarf2read.c 2009-03-02 01:07:50.000000000 +0100 | |
5 | @@ -1996,6 +1996,7 @@ scan_partial_symbols (struct partial_die | |
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) | |
13 | @@ -2211,6 +2212,7 @@ add_partial_symbol (struct partial_die_i | |
14 | } | |
15 | break; | |
16 | case DW_TAG_variable: | |
17 | + case DW_TAG_constant: | |
18 | if (pdi->is_external) | |
19 | { | |
20 | /* Global Variable. | |
21 | @@ -4213,7 +4215,8 @@ dwarf2_add_field (struct field_info *fip | |
22 | fip->non_public_fields = 1; | |
23 | } | |
24 | } | |
25 | - else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable) | |
26 | + else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable | |
27 | + || die->tag == DW_TAG_constant) | |
28 | { | |
29 | /* C++ static member. */ | |
30 | ||
31 | @@ -4703,7 +4706,8 @@ read_structure_type (struct die_info *di | |
32 | while (child_die && child_die->tag) | |
33 | { | |
34 | if (child_die->tag == DW_TAG_member | |
35 | - || child_die->tag == DW_TAG_variable) | |
36 | + || child_die->tag == DW_TAG_variable | |
37 | + || child_die->tag == DW_TAG_constant) | |
38 | { | |
39 | /* NOTE: carlton/2002-11-05: A C++ static data member | |
40 | should be a DW_TAG_member that is a declaration, but | |
41 | @@ -4822,6 +4826,7 @@ process_structure_scope (struct die_info | |
42 | { | |
43 | if (child_die->tag == DW_TAG_member | |
44 | || child_die->tag == DW_TAG_variable | |
45 | + || child_die->tag == DW_TAG_constant | |
46 | || child_die->tag == DW_TAG_inheritance) | |
47 | { | |
48 | /* Do nothing. */ | |
49 | @@ -6455,6 +6460,7 @@ load_partial_dies (bfd *abfd, gdb_byte * | |
50 | && abbrev->tag != DW_TAG_subprogram | |
51 | && abbrev->tag != DW_TAG_lexical_block | |
52 | && abbrev->tag != DW_TAG_variable | |
53 | + && abbrev->tag != DW_TAG_constant | |
54 | && abbrev->tag != DW_TAG_namespace | |
55 | && abbrev->tag != DW_TAG_member) | |
56 | { | |
57 | @@ -6562,6 +6568,7 @@ load_partial_dies (bfd *abfd, gdb_byte * | |
58 | if (load_all | |
59 | || abbrev->tag == DW_TAG_subprogram | |
60 | || abbrev->tag == DW_TAG_variable | |
61 | + || abbrev->tag == DW_TAG_constant | |
62 | || abbrev->tag == DW_TAG_namespace | |
63 | || part_die->is_declaration) | |
64 | { | |
65 | @@ -8341,6 +8348,11 @@ new_symbol (struct die_info *die, struct | |
66 | /* Do not add the symbol to any lists. It will be found via | |
67 | BLOCK_FUNCTION from the blockvector. */ | |
68 | break; | |
69 | + case DW_TAG_constant: | |
70 | + SYMBOL_TYPE (sym) = make_cv_type (1, | |
71 | + TYPE_VOLATILE (SYMBOL_TYPE (sym)), | |
72 | + SYMBOL_TYPE (sym), NULL); | |
73 | + /* PASSTHRU */ | |
74 | case DW_TAG_variable: | |
75 | /* Compilation with minimal debug info may result in variables | |
76 | with missing type entries. Change the misleading `void' type |