diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-07-07 14:35:10 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-07-08 16:20:48 +0200 |
commit | 619d9aaf011c975159a79d34259083a596162bf1 (patch) | |
tree | 16599882e087d793b4ba69c602b46271204f0ec2 /loc2c.h | |
parent | 51305196f1d078849da1718bb6ccfbed5af182ed (diff) | |
download | systemtap-steved-619d9aaf011c975159a79d34259083a596162bf1.tar.gz systemtap-steved-619d9aaf011c975159a79d34259083a596162bf1.tar.xz systemtap-steved-619d9aaf011c975159a79d34259083a596162bf1.zip |
Add support for constant struct member field offsets.
* loc2c.h (c_translate_add_offset): New function prototype.
* loc2c.c (c_translate_add_offset): New function implementation.
* loc2c-test.c (handle_variable): Use c_translate_add_offset if appropriate.
* dwflpp.cxx (translate_location): Likewise.
Diffstat (limited to 'loc2c.h')
-rw-r--r-- | loc2c.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -85,6 +85,13 @@ c_translate_pointer_store (struct obstack *pool, int indent, Dwarf_Die *typedie, struct location **input, const char *rvalue); +/* Translate a fragment to add an offset to the currently calculated + address of the input location. Used for struct fields. Only works + when location is already an actual base address. */ +void +c_translate_add_offset (struct obstack *pool, int indent, const char *comment, + Dwarf_Sword off, struct location **input); + /* Translate a C fragment for a direct argument VALUE. On errors, call FAIL, which should not return. Any later errors will use FAIL and FAIL_ARG from this translate call. On success, return the fragment created. */ |