This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
common tree nodes question
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Cc: ezannoni at redhat dot com
- Date: Mon, 25 Feb 2002 19:26:38 +1100
- Subject: common tree nodes question
as yall might recall, for dwarf, vectors are treated as a structure
containing an array. so:
vector int foo;
will really be passed to gdb as:
struct {
int xxx[4];
} foo;
elena pointed out that type of the base type for the array elements (xxx)
comes out with unknown:
<1><b7>: Abbrev Number: 4 (DW_TAG_base_type)
DW_AT_name : __unknown__
DW_AT_byte_size : 4
DW_AT_encoding : 5 (signed)
i debuged this and found out that base_type_die() cannot find a
TYPE_NAME() for the SImode, consequently putting an __unknown__ for
it's name.
the culprit is build_common_tree_nodes():
intQI_type_node = make_signed_type (GET_MODE_BITSIZE (QImode));
intHI_type_node = make_signed_type (GET_MODE_BITSIZE (HImode));
etc
which doesn't define the TYPE_NAME field, just makes the raw types.
what's the right solution here?
i could change build_common_tree_nodes to stick the appropriate
TYPE_NAME, but i don't think i can do that. for example,
SI might not be an "int", QI might not be "char", etc etc for
some weird architecture.
comments?