summaryrefslogtreecommitdiff
path: root/gdb/dwarf2expr.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-05-17 17:01:37 +0000
committerTom Tromey <tromey@redhat.com>2011-05-17 17:01:37 +0000
commitf51737c40e98b9201af17aa3a579fe184f5c069f (patch)
treea7d2f16b226440c22e3e4b912d957bfd8f869e95 /gdb/dwarf2expr.c
parent9df6e9ef9556d54d33b64e10e6045b9a2e317fd0 (diff)
downloadgdb-f51737c40e98b9201af17aa3a579fe184f5c069f.tar.gz
* 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 1fe8b796b50..5cd33a6df84 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"));
}