]>
Commit | Line | Data |
---|---|---|
51a5ef0f | 1 | Index: gdb-7.1.90.20100711/gdb/dwarf2read.c |
3a58abaf | 2 | =================================================================== |
51a5ef0f PS |
3 | --- gdb-7.1.90.20100711.orig/gdb/dwarf2read.c 2010-07-12 23:07:35.000000000 +0200 |
4 | +++ gdb-7.1.90.20100711/gdb/dwarf2read.c 2010-07-13 00:13:02.000000000 +0200 | |
5 | @@ -2251,6 +2251,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) | |
51a5ef0f | 13 | @@ -2452,6 +2453,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. | |
51a5ef0f | 21 | @@ -3289,6 +3291,7 @@ die_needs_namespace (struct die_info *di |
7566401a ER |
22 | return 1; |
23 | ||
24 | case DW_TAG_variable: | |
25 | + case DW_TAG_constant: | |
51a5ef0f PS |
26 | /* We only need to prefix "globally" visible variables. These include |
27 | any variable marked with DW_AT_external or any variable that | |
28 | lives in a namespace. [Variables in anonymous namespaces | |
29 | @@ -4638,7 +4641,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 | ||
51a5ef0f | 39 | @@ -5250,7 +5254,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 | |
51a5ef0f | 49 | @@ -5396,6 +5401,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. */ | |
51a5ef0f | 57 | @@ -7109,6 +7115,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) |
51a5ef0f | 65 | @@ -7217,6 +7224,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 | { | |
51a5ef0f | 73 | @@ -9059,6 +9067,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: | |
51a5ef0f | 83 | case DW_TAG_member: |
3a58abaf | 84 | /* Compilation with minimal debug info may result in variables |