mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-28 18:07:37 +01:00
dwarf: Get correct return from expression evaluation
Currently the expression evaluation always succeeds, and possible error is not propagated to the caller. The ',' operator makes the condition always return 0. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Tested-by: Paul Pluzhnikov <ppluzhnikov@google.com>
This commit is contained in:
parent
cbc66b62c0
commit
69e300e8f6
1 changed files with 1 additions and 1 deletions
|
@ -785,7 +785,7 @@ apply_reg_state (struct dwarf_cursor *c, struct dwarf_reg_state *rs)
|
|||
|
||||
case DWARF_WHERE_EXPR:
|
||||
addr = rs->reg[i].val;
|
||||
if ((ret = eval_location_expr (c, as, a, addr, c->loc + i, arg)) , 0)
|
||||
if ((ret = eval_location_expr (c, as, a, addr, c->loc + i, arg)) < 0)
|
||||
return ret;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue