Re: [PATCH v3] decode_stacktrace: Decode caller address

From: Matthieu Baerts

Date: Fri Mar 06 2026 - 04:48:50 EST


Hi Masami,

Thank you for the v3!

On 06/03/2026 01:50, Masami Hiramatsu (Google) wrote:
> From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> Decode the caller address instead of the return address by default.
> This also introduced -R option to provide return address decoding
> mode.
>
> This changes the decode_stacktrace.sh to decode the line info 1byte
> before the return address which will be the call(branch) instruction
> address. If the return address is a symbol address (zero offset from
> it), it falls back to decoding the return address.
>
> This improves results especially when optimizations have changed the
> order of the lines around the return address, or when the return
> address does not have the actual line information.

The new version looks good to me:

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>


When comparing results with an without your patch, it really looks like
this patch could be considered as a "fix" to avoid all these wrong
offsets. Then, I don't know if many people will use the new option :)

Cheers,
Matt
--
Sponsored by the NGI0 Core fund.