diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-03-03 19:01:58 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-03-03 19:01:58 -0500 |
commit | c108ad66d2218a1311b8891f1194d08179ae7c19 (patch) | |
tree | 66b3e148a84447d69f1340447c5edba8bf2055cd /loc2c.c | |
parent | 378f9227b04b876ff06af099715e7d60cdc49903 (diff) | |
parent | b0be9bdb8c6972d847cad50a1e699f1fa806ad99 (diff) | |
download | systemtap-steved-c108ad66d2218a1311b8891f1194d08179ae7c19.tar.gz systemtap-steved-c108ad66d2218a1311b8891f1194d08179ae7c19.tar.xz systemtap-steved-c108ad66d2218a1311b8891f1194d08179ae7c19.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'loc2c.c')
-rw-r--r-- | loc2c.c | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -1601,6 +1601,37 @@ c_translate_addressof (struct obstack *pool, int indent, } +/* Translate a fragment to write the given pointer value, + where *INPUT is the location of the pointer with that type. +*/ + +void +c_translate_pointer_store (struct obstack *pool, int indent, + Dwarf_Addr dwbias __attribute__ ((unused)), + Dwarf_Die *typedie, struct location **input, + const char *rvalue) +{ + assert (dwarf_tag (typedie) == DW_TAG_pointer_type); + + Dwarf_Attribute attr_mem; + Dwarf_Word byte_size; + if (dwarf_attr_integrate (typedie, DW_AT_byte_size, &attr_mem) == NULL) + byte_size = 0; + else if (dwarf_formudata (&attr_mem, &byte_size) != 0) + FAIL (*input, + N_("cannot get byte_size attribute for type %s: %s"), + dwarf_diename (typedie) ?: "<anonymous>", + dwarf_errmsg (-1)); + + translate_base_store (pool, indent + 1, byte_size, + input, *input, rvalue); + + // XXX: what about multiple-location lvalues? +} + + + + /* Determine the element stride of an array type. */ static Dwarf_Word array_stride (Dwarf_Die *typedie, struct location *origin) |