Re: [PATCH v2] decode_stacktrace: Support caller address decoding

From: Google

Date: Thu Mar 05 2026 - 19:31:56 EST


On Thu, 5 Mar 2026 15:47:23 -0500
Sasha Levin <sashal@xxxxxxxxxx> wrote:

> On Thu, Mar 05, 2026 at 06:05:59PM +0100, Matthieu Baerts wrote:
> >Hi Masami,
> >
> >Thank you for the new version, and your previous reply!
> >
> >On 05/03/2026 17:52, Masami Hiramatsu (Google) wrote:
> >> Add -c option to decodecall address instead of the return address.
> >> With this option, it decodes the line info 1byte before the return
> >> address which will be the call(branch) instruction address.
> >> If the return address is a symbol address, it falls back to
> >> decoding the return address.
> >
> >From what I got from Sasha, this "addr-1" trick seems quite common. Why
> >not using this new feature by default, and having an option to disable it?
>
> +1

OK, let's make it the default behavior.

>
> >Or no option if someone can validate the new behaviour on architectures
> >which have these delay slots you mentioned?
>
> I didn't think that delay slots were an issue because architectures with delay
> slots handle their stack unwinding and return address adjustment in their own
> arch-specific code before it ever reaches the script.

OK. In case this is an issue, I'll add an option to decode the return address.

Thank you,

>
> --
> Thanks,
> Sasha


--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>