aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2expr.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-05-17 17:01:46 +0000
committerTom Tromey <tromey@redhat.com>2011-05-17 17:01:46 +0000
commit9ff3b74fdb6c74f814fa23abc12dbcb62bbb3028 (patch)
tree3072ff4ec09e84603c235db7c9eabffdb0f76f38 /gdb/dwarf2expr.c
parent4e5115238452804a673f05409669fe3dc8cd7cb1 (diff)
downloadgdb-9ff3b74fdb6c74f814fa23abc12dbcb62bbb3028.zip
gdb-9ff3b74fdb6c74f814fa23abc12dbcb62bbb3028.tar.gz
gdb-9ff3b74fdb6c74f814fa23abc12dbcb62bbb3028.tar.bz2
* dwarf2read.c (dwarf2_get_die_type): Call
get_die_type_at_offset. * dwarf2expr.c (dwarf_get_base_type): Handle NULL return from get_base_type function.
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r--gdb/dwarf2expr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 1fe8b79..5cd33a6 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -447,6 +447,8 @@ dwarf_get_base_type (struct dwarf_expr_context *ctx, ULONGEST die, int size)
if (ctx->get_base_type)
{
result = ctx->get_base_type (ctx, die);
+ if (result == NULL)
+ error (_("Could not find type for DW_OP_GNU_const_type"));
if (size != 0 && TYPE_LENGTH (result) != size)
error (_("DW_OP_GNU_const_type has different sizes for type and data"));
}