This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] readelf: DW_CFA_set_loc operand is an address


On Thu, 2015-11-26 at 00:05 +0100, Ben Gamari wrote:
> Previously this was incorrectly assumed to be an ULEB128. Hilarity
> ensued.
> 
> This appears to be the case in both DWARF 3, DWARF 4, and LSB 5.
> 
> Also show set_loc argument as hexadecimal
> 
> Finally, add a test for this behavior. This was derived from the
> following testsuite extract from output from the Glasgow Haskell
> Compiler,
> [...]
> Update styule
> [...]
> diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c
> index 39509b7..365da48 100644
> --- a/libdwfl/frame_unwind.c
> +++ b/libdwfl/frame_unwind.c
> @@ -559,8 +559,24 @@ handle_cfi (Dwfl_Frame *state, Dwarf_Addr pc, Dwarf_CFI *cfi, Dwarf_Addr bias)
>    bool ra_set = false;
>    ebl_dwarf_to_regno (ebl, &ra);
>  
> +  fprintf(stderr, "\n");
> +  fprintf(stderr, "Unwinding from %lx:\n", pc);
> +  char *modname = "null";
> +  if (cfi->dbg) modname = elf_getident(cfi->dbg->elf, NULL);
> +  fprintf(stderr, "  mod        = %s\n", modname ? modname : "null");
> +  fprintf(stderr, "  CIE offset = %lx\n", frame->fde->cie->offset);
> +  if (frame->fde->cie->signal_frame)
> +    fprintf(stderr, "  signal frame\n");
> +

Looks like this patch wasn't fully finished/cleaned up yet.

Cheers,

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]