X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdbtypes.c;h=9069a1122e768e0e629a41d7de3973e14a60a58d;hb=99ad94278d293fb7f5a823caf92221ff4419e556;hp=6c809a401a3511583a365e2acfa565ad7ceb3717;hpb=c8a62302a53ba460e181f0c7cf03a5facc346d57;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 6c809a401a..9069a1122e 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -239,6 +239,21 @@ get_type_arch (const struct type *type) return TYPE_OWNER (type).gdbarch; } +/* See gdbtypes.h. */ + +struct type * +get_target_type (struct type *type) +{ + if (type != NULL) + { + type = TYPE_TARGET_TYPE (type); + if (type != NULL) + type = check_typedef (type); + } + + return type; +} + /* Alloc a new type instance structure, fill it with some defaults, and point it at OLDTYPE. Allocate the new type instance from the same place as OLDTYPE. */