5a86319
--- ./gdb/dwarf2read.c	21 Aug 2008 18:57:34 -0000	1.276
5a86319
+++ ./gdb/dwarf2read.c	26 Aug 2008 17:54:37 -0000
5a86319
@@ -1798,6 +1798,7 @@ scan_partial_symbols (struct partial_die
5a86319
 		}
5a86319
 	      break;
5a86319
 	    case DW_TAG_variable:
5a86319
+	    case DW_TAG_constant:
5a86319
 	    case DW_TAG_typedef:
5a86319
 	    case DW_TAG_union_type:
5a86319
 	      if (!pdi->is_declaration)
5a86319
@@ -1983,6 +1984,7 @@ add_partial_symbol (struct partial_die_i
5a86319
 	}
5a86319
       break;
5a86319
     case DW_TAG_variable:
5a86319
+    case DW_TAG_constant:
5a86319
       if (pdi->is_external)
5a86319
 	{
5a86319
 	  /* Global Variable.
5a86319
@@ -3590,7 +3593,8 @@ dwarf2_add_field (struct field_info *fip
5a86319
 	  fip->non_public_fields = 1;
5a86319
 	}
5a86319
     }
5a86319
-  else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable)
5a86319
+  else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable
5a86319
+	   || die->tag == DW_TAG_constant)
5a86319
     {
5a86319
       /* C++ static member.  */
5a86319
 
5a86319
@@ -4069,7 +4073,8 @@ read_structure_type (struct die_info *di
5a86319
       while (child_die && child_die->tag)
5a86319
 	{
5a86319
 	  if (child_die->tag == DW_TAG_member
5a86319
-	      || child_die->tag == DW_TAG_variable)
5a86319
+	      || child_die->tag == DW_TAG_variable
5a86319
+	      || child_die->tag == DW_TAG_constant)
5a86319
 	    {
5a86319
 	      /* NOTE: carlton/2002-11-05: A C++ static data member
5a86319
 		 should be a DW_TAG_member that is a declaration, but
5a86319
@@ -4188,6 +4193,7 @@ process_structure_scope (struct die_info
5a86319
     {
5a86319
       if (child_die->tag == DW_TAG_member
5a86319
 	  || child_die->tag == DW_TAG_variable
5a86319
+	  || child_die->tag == DW_TAG_constant
5a86319
 	  || child_die->tag == DW_TAG_inheritance)
5a86319
 	{
5a86319
 	  /* Do nothing.  */
5a86319
@@ -5565,6 +5571,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
5a86319
 	  && abbrev->tag != DW_TAG_enumerator
5a86319
 	  && abbrev->tag != DW_TAG_subprogram
5a86319
 	  && abbrev->tag != DW_TAG_variable
5a86319
+	  && abbrev->tag != DW_TAG_constant
5a86319
 	  && abbrev->tag != DW_TAG_namespace
5a86319
 	  && abbrev->tag != DW_TAG_member)
5a86319
 	{
5a86319
@@ -5672,6 +5679,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
5a86319
       if (load_all
5a86319
 	  || abbrev->tag == DW_TAG_subprogram
5a86319
 	  || abbrev->tag == DW_TAG_variable
5a86319
+	  || abbrev->tag == DW_TAG_constant
5a86319
 	  || abbrev->tag == DW_TAG_namespace
5a86319
 	  || part_die->is_declaration)
5a86319
 	{
5a86319
@@ -7404,6 +7412,11 @@ new_symbol (struct die_info *die, struct
5a86319
 	      add_symbol_to_list (sym, cu->list_in_scope);
5a86319
 	    }
5a86319
 	  break;
5a86319
+	case DW_TAG_constant:
5a86319
+	  SYMBOL_TYPE (sym) = make_cv_type (1,
5a86319
+					    TYPE_VOLATILE (SYMBOL_TYPE (sym)),
5a86319
+					    SYMBOL_TYPE (sym), NULL);
5a86319
+	  /* PASSTHRU */
5a86319
 	case DW_TAG_variable:
5a86319
 	  /* Compilation with minimal debug info may result in variables
5a86319
 	     with missing type entries. Change the misleading `void' type