This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]Fix PR backtrace/16558: GDB Aarch64 signal frame unwinder issue


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 (éå)


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