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: Yao Qi <yao at codesourcery dot com>
- To: Hui Zhu <hui_zhu at mentor dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Wed, 12 Feb 2014 11:23:13 +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>
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 (éå)