diff options
author | Fred Fish <fnf@specifix.com> | 1992-02-17 23:26:54 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-02-17 23:26:54 +0000 |
commit | 9e4c1921e564e417bc1ad9f76404161c59456ce2 (patch) | |
tree | 55ec102f19043808032bbd13ac2f6fe78574f6d8 /gdb/dwarfread.c | |
parent | 1584d0697df73819981fac5cb57f8b0061c13ca0 (diff) | |
download | gdb-9e4c1921e564e417bc1ad9f76404161c59456ce2.zip gdb-9e4c1921e564e417bc1ad9f76404161c59456ce2.tar.gz gdb-9e4c1921e564e417bc1ad9f76404161c59456ce2.tar.bz2 |
Add code to handle TAG_pointer_type DIE's (DWARF Information Entries)
that are produced by the i486/SVR4 MetaWare compiler, but not by the
AT&T or GCC compilers.
Diffstat (limited to 'gdb/dwarfread.c')
-rw-r--r-- | gdb/dwarfread.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index 68b479d..a5496fc 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -331,6 +331,9 @@ static void EXFUN(dwarf_read_array_type, (struct dieinfo *dip)); static void +EXFUN(read_tag_pointer_type, (struct dieinfo *dip)); + +static void EXFUN(read_subroutine_type, (struct dieinfo *dip AND char *thisdie AND char *enddie)); @@ -1209,6 +1212,51 @@ DEFUN(dwarf_read_array_type, (dip), struct dieinfo *dip) LOCAL FUNCTION + read_tag_pointer_type -- read TAG_pointer_type DIE + +SYNOPSIS + + static void read_tag_pointer_type (struct dieinfo *dip) + +DESCRIPTION + + Extract all information from a TAG_pointer_type DIE and add to + the user defined type vector. + */ + +static void +DEFUN(read_tag_pointer_type, (dip), struct dieinfo *dip) +{ + struct type *type; + struct type *utype; + char *sub; + char *subend; + short temp; + + type = decode_die_type (dip); + if ((utype = lookup_utype (dip -> dieref)) == NULL) + { + utype = lookup_pointer_type (type); + (void) alloc_utype (dip -> dieref, utype); + } + else + { + TYPE_TARGET_TYPE (utype) = type; + TYPE_POINTER_TYPE (type) = utype; + + /* We assume the machine has only one representation for pointers! */ + /* FIXME: This confuses host<->target data representations, and is a + poor assumption besides. */ + + TYPE_LENGTH (utype) = sizeof (char *); + TYPE_CODE (utype) = TYPE_CODE_PTR; + } +} + +/* + +LOCAL FUNCTION + read_subroutine_type -- process TAG_subroutine_type dies SYNOPSIS @@ -1623,6 +1671,9 @@ DEFUN(process_dies, (thisdie, enddie, objfile), case TAG_array_type: dwarf_read_array_type (&di); break; + case TAG_pointer_type: + read_tag_pointer_type (&di); + break; default: (void) new_symbol (&di); break; |