From 2e2a5d82cfd03db7be2e9ff1457b5ea50e46bc3a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 24 Sep 2009 13:05:41 -0700 Subject: Support DW_AT_const_value cases in loc2c and loc2c-test. * loc2c.c (c_translate_constant): New function. * loc2c.h: Declare it. * loc2c-test.c (main): Use it for DW_AT_const_value cases. --- loc2c.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'loc2c.h') diff --git a/loc2c.h b/loc2c.h index becf2d85..e97f4d9b 100644 --- a/loc2c.h +++ b/loc2c.h @@ -41,6 +41,20 @@ struct location *c_translate_location (struct obstack *, Dwarf_Attribute *fb_attr, const Dwarf_Op *cfa_ops); +/* Translate a fragment for a compile-time constant from DW_AT_const_value. + */ +struct location *c_translate_constant (struct obstack *, + void (*fail) (void *arg, + const char *fmt, ...) + __attribute__ ((noreturn, + format (printf, 2, 3))), + void *fail_arg, + void (*emit_address) (void *fail_arg, + struct obstack *, + Dwarf_Addr), + int indent, Dwarf_Addr dwbias, + Dwarf_Attribute *attr); + /* 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, -- cgit