diff options
author | Tom Tromey <tromey@redhat.com> | 2010-06-21 18:01:51 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-06-21 18:01:51 +0000 |
commit | b00fdb78327b18ba0d4240724647bee58ff6b71e (patch) | |
tree | f06a4e33efde39bded42f8e1d518e2fc6904ded2 /gdb/dwarf2read.c | |
parent | 84951ab5849cbb0cf00091eb8e9fe83c660fe1d6 (diff) | |
download | gdb-b00fdb78327b18ba0d4240724647bee58ff6b71e.zip gdb-b00fdb78327b18ba0d4240724647bee58ff6b71e.tar.gz gdb-b00fdb78327b18ba0d4240724647bee58ff6b71e.tar.bz2 |
* 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 613f021..f9abf0a 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; } |