This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH]Fix PR backtrace/16558: GDB Aarch64 signal frame unwinder issue
- From: Hui Zhu <teawater at gmail dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: Hui Zhu <hui_zhu at mentor dot com>, gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Wed, 12 Feb 2014 15:24:37 +0800
- Subject: Re: [PATCH]Fix PR backtrace/16558: GDB Aarch64 signal frame unwinder issue
- Authentication-results: sourceware.org; auth=none
- References: <52FAD930 dot 70604 at mentor dot com> <52FAE921 dot 2070104 at codesourcery dot com>
I think this pic is very odd and unclear. And the comments after this
pic is very clear to understand how to get registers from stack.
Maybe we can just remove this pic.
Thanks,
Hui
On Wed, Feb 12, 2014 at 11:23 AM, Yao Qi <yao@codesourcery.com> wrote:
> On 02/12/2014 10:15 AM, Hui Zhu wrote:
>> it will call cache init function of unwinder "aarch64_linux_sigframe_init".
>> The address or the value of the registers is get from this function.
>> So the bug is inside thie function.
>
> We also find that the diagram above function aarch64_linux_sigframe_init
> doesn't reflect the comments nor the code.
>
> +----------+ ^
> | saved lr | |
> +->| saved fp |--+
> | | |
> | | |
> | +----------+
> | | saved lr |
> +--| saved fp |
> ^ | |
> | | |
> | +----------+
> ^ | |
> | | signal |
> | | |
> | | saved lr |-->interrupted_function_pc
> +--| saved fp |
> | +----------+
> | | saved lr |--> default_restorer (movz x8, NR_sys_rt_sigreturn; svc 0)
> +--| saved fp |<- FP
> | |
> | |<- SP
> +----------+
>
> probably, it may be updated to this,
>
> | +----------+
> ^ | |
> | | signal |
> | | |
> | | saved pc | SIGTRAMP_FRAME
> +--| saved sp |
> | | saved lr |-->interrupted_function_pc
> | | saved fp |
> | +----------+
> | | saved lr |--> default_restorer (movz x8, NR_sys_rt_sigreturn; svc 0)
> +--| saved fp |<- FP
> | | NORMAL_FRAME
> | |<- SP
> +----------+
>
> because, SP is not saved in normal frames, but is saved in signal
> trampoline frames.
>
> --
> Yao (éå)