On 11/25/2015 08:31 AM, Ben Gamari wrote:
> ---
>  src/readelf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/readelf.c b/src/readelf.c
> index 7c3237f..3b6b4a0 100644
> --- a/src/readelf.c
> +++ b/src/readelf.c
> @@ -4973,7 +4973,7 @@ print_cfa_program (const unsigned char *readp, const 
> unsigned char *const endp,
>             goto invalid;
>           op1 = read_addr_unaligned_inc (ptr_size, dbg, readp);
>           op1 += vma_base;
> -         printf ("     set_loc %" PRIu64 "\n", op1 * code_align);
> +         printf ("     set_loc 0x%" PRIx64 "\n", op1 * code_align);
>           break;
>         case DW_CFA_advance_loc1:
>           if ((uint64_t) (endp - readp) < 1)
> 

Other addresses in this code are printed with ("%#" PRIx64).
(AFAIK '#' here will always give "0x", but lets keep it consistent).


It's also curious that nothing is done with op1 after printing it.
Shouldn't this set pc, at least?

Reply via email to