aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDenis Pilat <denis.pilat@st.com>2007-04-18 13:25:04 +0000
committerDenis Pilat <denis.pilat@st.com>2007-04-18 13:25:04 +0000
commit3d1f72c2311203ec590529ccfcc8efb17fb85856 (patch)
tree0f13970389a0c52aebc82ed697eec5939ffd7568 /gdb/dwarf2read.c
parentee5c21a00edd649f4305fbfc3722746f83055ce2 (diff)
downloadgdb-3d1f72c2311203ec590529ccfcc8efb17fb85856.zip
gdb-3d1f72c2311203ec590529ccfcc8efb17fb85856.tar.gz
gdb-3d1f72c2311203ec590529ccfcc8efb17fb85856.tar.bz2
2007-04-18 Denis Pilat <denis.pilat@st.com>
* dwarf2read.c (read_subrange_type): Use DW_ATE_signed default type when missing from DW_TAG_subrange_type. Remove the handling of null return from die_type.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index d0a1bb1..550c62a 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -4914,16 +4914,13 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
return;
base_type = die_type (die, cu);
- if (base_type == NULL)
+ if (TYPE_CODE (base_type) == TYPE_CODE_VOID)
{
complaint (&symfile_complaints,
_("DW_AT_type missing from DW_TAG_subrange_type"));
- return;
+ base_type = dwarf_base_type (DW_ATE_signed, TARGET_ADDR_BIT / 8, cu);
}
- if (TYPE_CODE (base_type) == TYPE_CODE_VOID)
- base_type = alloc_type (NULL);
-
if (cu->language == language_fortran)
{
/* FORTRAN implies a lower bound of 1, if not given. */