From d50f5149161d1e80553e09a75aa441961dd9359c Mon Sep 17 00:00:00 2001 From: roland Date: Thu, 18 Aug 2005 02:46:17 +0000 Subject: 2005-08-17 Roland McGrath * loc2c.c (c_translate_fetch): Take TYPEDIE instead of TYPEATTR. (c_translate_store): Likewise. * loc2c.h: Update decls. * loc2c-test.c (handle_variable): Update callers. Look up type, resolve typedefs, and check that it's DW_TAG_base_type. * tapsets.cxx (dwflpp::literal_stmt_for_local): Likewise. * loc2c.c (base_byte_size): Add assert on expected DIE tag. (c_translate_array, c_translate_pointer): Likewise. * loc2c.h: Amend comments to explicitly state type DIE tags expected. --- loc2c.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'loc2c.h') diff --git a/loc2c.h b/loc2c.h index af681bad..324de92c 100644 --- a/loc2c.h +++ b/loc2c.h @@ -21,13 +21,13 @@ struct location *c_translate_location (struct obstack *, int indent, struct location **input, Dwarf_Attribute *fb_attr); -/* Translate a fragment to dereference the given pointer type, +/* Translate a fragment to dereference the given DW_TAG_pointer_type DIE, where *INPUT is the location of the pointer with that type. */ void c_translate_pointer (struct obstack *pool, int indent, Dwarf_Addr dwbias, Dwarf_Die *typedie, struct location **input); -/* Translate a fragment to index an array (turning the location +/* Translate a fragment to index a DW_TAG_array_type DIE (turning the location of the array into the location of an element). If IDX is non-null, it's a string of C code to emit in the fragment as the array index. If the index is a known constant, IDX should be null and CONST_IDX @@ -48,18 +48,18 @@ void c_translate_addressof (struct obstack *pool, int indent, /* Translate a fragment to fetch the value of variable or member DIE at the *INPUT location and store it in lvalue TARGET. - This handles base integer types and bit fields. */ + This handles base integer types and bit fields, i.e. DW_TAG_base_type. */ void c_translate_fetch (struct obstack *pool, int indent, Dwarf_Addr dwbias __attribute__ ((unused)), - Dwarf_Die *die, Dwarf_Attribute *typeattr, + Dwarf_Die *die, Dwarf_Die *typedie, struct location **input, const char *target); /* Translate a fragment to locate the value of variable or member DIE at the *INPUT location and set it to the C expression RVALUE. - This handles base integer types and bit fields. */ + This handles base integer types and bit fields, i.e. DW_TAG_base_type. */ void c_translate_store (struct obstack *pool, int indent, Dwarf_Addr dwbias __attribute__ ((unused)), - Dwarf_Die *die, Dwarf_Attribute *typeattr, + Dwarf_Die *die, Dwarf_Die *typedie, struct location **input, const char *rvalue); /* Emit the C fragment built up at LOC (i.e., the return value from the -- cgit