From 068ddd4357ea29d4cfb611d2ac01dc0e0507d1cf Mon Sep 17 00:00:00 2001 From: roland Date: Fri, 14 Oct 2005 11:30:40 +0000 Subject: 2005-10-14 Roland McGrath * loc2c-test.c (handle_variable): Check for "=" before fetching DIE from ATTR_MEM. --- loc2c-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loc2c-test.c') diff --git a/loc2c-test.c b/loc2c-test.c index 833894c2..2967b9ed 100644 --- a/loc2c-test.c +++ b/loc2c-test.c @@ -99,8 +99,6 @@ handle_variable (Dwarf_Die *scopes, int nscopes, int out, Dwarf_Die die_mem, *die = vardie; while (*fields != NULL) { - die = dwarf_formref_die (&attr_mem, &die_mem); - if (!strcmp (*fields, "=")) { store = true; @@ -109,6 +107,8 @@ handle_variable (Dwarf_Die *scopes, int nscopes, int out, break; } + die = dwarf_formref_die (&attr_mem, &die_mem); + const int typetag = dwarf_tag (die); switch (typetag) { -- cgit