diff options
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r-- | gdb/gdbtypes.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 6c809a401a3..9069a1122e7 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. */ |