From 4b1ad75ead48645adb7f8e6115aff95b76c2f32a Mon Sep 17 00:00:00 2001 From: roland Date: Thu, 18 Aug 2005 08:51:30 +0000 Subject: 2005-08-18 Roland McGrath * loc2c.c (struct location): New member `emit_address'. (alloc_location): Initialize new member from ORIGIN. (location_from_address): New argument EMIT_ADDRESS. Initialize new member. (translate): Use LOC->emit_address hook to format DW_OP_addr constant. (location_relative): Die if DW_OP_addr is used. (default_emit_address): New function. (c_translate_location): New argument EMIT_ADDRESS, pass it down. Use default_emit_address if argument is null. * loc2c.h: Update decl. * loc2c-test.c (handle_variable): Update caller. * tapsets.cxx (dwflpp::literal_stmt_for_local): Update caller. (dwflpp::loc2c_emit_address): New static method. --- loc2c-test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'loc2c-test.c') diff --git a/loc2c-test.c b/loc2c-test.c index aab92144..26734096 100644 --- a/loc2c-test.c +++ b/loc2c-test.c @@ -85,7 +85,8 @@ handle_variable (Dwarf_Die *scopes, int nscopes, int out, #define emit(fmt, ...) printf (" addr = " fmt "\n", ## __VA_ARGS__) struct location *head, *tail = NULL; - head = c_translate_location (&pool, &fail, NULL, 1, cubias, &attr_mem, pc, + head = c_translate_location (&pool, &fail, NULL, NULL, + 1, cubias, &attr_mem, pc, &tail, fb_attr); if (dwarf_attr_integrate (vardie, DW_AT_type, &attr_mem) == NULL) @@ -176,7 +177,8 @@ handle_variable (Dwarf_Die *scopes, int nscopes, int out, *fields, dwarf_errmsg (-1)); } else - c_translate_location (&pool, NULL, NULL, 1, cubias, &attr_mem, pc, + c_translate_location (&pool, NULL, NULL, NULL, + 1, cubias, &attr_mem, pc, &tail, NULL); ++fields; break; -- cgit