diff options
author | Joel Brobecker <brobecker@gnat.com> | 2007-02-28 16:35:49 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2007-02-28 16:35:49 +0000 |
commit | c26f2453abb778e5b449608bb6fd9719f2a748f2 (patch) | |
tree | c3dc09e008f95ffcc23289d657250bb78b935549 | |
parent | e26f076c6745533e416851dc6294262cf801b3ca (diff) | |
download | gdb-c26f2453abb778e5b449608bb6fd9719f2a748f2.zip gdb-c26f2453abb778e5b449608bb6fd9719f2a748f2.tar.gz gdb-c26f2453abb778e5b449608bb6fd9719f2a748f2.tar.bz2 |
* gdbtypes.c (check_typedef): Do not replace stub type if
the resolved type is not defined in the same objfile.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 22e31fb..096d9be 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2007-02-28 Jerome Guitton <guitton@adacore.com> + Joel Brobecker <brobecker@adacore.com> + + * gdbtypes.c (check_typedef): Do not replace stub type if + the resolved type is not defined in the same objfile. + 2007-02-28 Daniel Jacobowitz <dan@codesourcery.com> * top.c (gdb_readline_wrapper_cleanup): Remove invalid assertion. diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 5d56de0..30b5362 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1514,7 +1514,15 @@ check_typedef (struct type *type) } sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0, (struct symtab **) NULL); if (sym) - make_cv_type (is_const, is_volatile, SYMBOL_TYPE (sym), &type); + { + /* Same as above for opaque types, we can replace the stub + with the complete type only if they are int the same + objfile. */ + if (TYPE_OBJFILE (SYMBOL_TYPE(sym)) == TYPE_OBJFILE (type)) + make_cv_type (is_const, is_volatile, SYMBOL_TYPE (sym), &type); + else + type = SYMBOL_TYPE (sym); + } } if (TYPE_TARGET_STUB (type)) |