diff options
author | Tom Tromey <tromey@redhat.com> | 2010-06-21 18:01:46 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-06-21 18:01:46 +0000 |
commit | d1d5e97967edf98a24d2013aa134d60f20a8042a (patch) | |
tree | af5267e2b8404b48546e493640baecf47eb06c3f /gdb/dwarf2read.c | |
parent | fbe59e99d1b2795aed2fbf87b3b85f21a11036fe (diff) | |
download | gdb-d1d5e97967edf98a24d2013aa134d60f20a8042a.tar.gz |
* p-valprint.c (pascal_val_print): Use TYPE_ERROR_NAME.
* p-typeprint.c (pascal_type_print_base): Use TYPE_ERROR_NAME.
* m2-valprint.c (m2_val_print): Use TYPE_ERROR_NAME.
* gdbtypes.h (TYPE_ERROR_NAME): New macro.
* f-valprint.c (f_val_print): Use TYPE_ERROR_NAME.
* f-typeprint.c (f_type_print_base): Use TYPE_ERROR_NAME.
* dwarf2read.c (tag_type_to_type): Create a new error type on
failure.
* c-valprint.c (c_val_print): Use TYPE_ERROR_NAME.
* c-typeprint.c (c_type_print_base): Use TYPE_ERROR_NAME.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 613f0219b87..f9abf0a9459 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -9173,9 +9173,18 @@ tag_type_to_type (struct die_info *die, struct dwarf2_cu *cu) this_type = read_type_die (die, cu); if (!this_type) { - dump_die_for_error (die); - error (_("Dwarf Error: Cannot find type of die [in module %s]"), - cu->objfile->name); + char *message, *saved; + + /* read_type_die already issued a complaint. */ + message = xstrprintf (_("<unknown type in %s, CU 0x%x, DIE 0x%x>"), + cu->objfile->name, + cu->header.offset, + die->offset); + saved = obstack_copy0 (&cu->objfile->objfile_obstack, + message, strlen (message)); + xfree (message); + + this_type = init_type (TYPE_CODE_ERROR, 0, 0, saved, cu->objfile); } return this_type; } |