On Mon, Jan 20, 2014 at 3:41 AM, Tim Deegan <[email protected]> wrote: > Ubuntu's libc-bin (2.15-0ubuntu20.2) on x86_64 uses DW_CFA_val_expression > in describing the pthread spinlock operations __lll_unlock_wake() and > __lll_lock_wait(). libunwind 1.1 doesn't understand that opcode and > so backtraces from those operations are truncated. >
Thanks for submitting this! A couple of minor nits. > static inline int > @@ -172,9 +183,12 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, > unw_word_t val) > if (DWARF_IS_REG_LOC (loc)) > return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), &val, > 1, c->as_arg); > - else > + if (DWARF_IS_MEM_LOC (loc)) > return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), &val, > 1, c->as_arg); > + assert(DWARF_IS_VAL_LOC (loc)); > + loc = DWARF_VAL_LOC(c, val); Is this code necessary? > + case DWARF_WHERE_EXPR_VAL: DWARF_WHERE_VAL_EXPR reads better. > + addr = rs->reg[i].val; > + if ((ret = eval_location_expr (c, as, a, addr, c->loc + i, arg, 1)) > < 0) > return ret; This is fine. Another way to do it would be to update the DWARF_LOC_TYPE after the eval() instead of passing in an extra parameter (is_val). https://sourceware.org/bugzilla/show_bug.cgi?id=15771 seems related. -Arun _______________________________________________ Libunwind-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
