This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH/v2] Fix PR backtrace/16558: GDB Aarch64 signal frame unwinder issue
- From: Hui Zhu <hui_zhu at mentor dot com>
- To: Yao Qi <yao at codesourcery dot com>, Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Mon, 24 Mar 2014 16:31:20 +0800
- Subject: Re: [PATCH/v2] Fix PR backtrace/16558: GDB Aarch64 signal frame unwinder issue
- Authentication-results: sourceware.org; auth=none
- References: <52FAD930 dot 70604 at mentor dot com> <5316C52B dot 4010408 at mentor dot com> <CAFqB+PxZfhRHqnyDdHkFPe3Ki_hK9Q2P-FnNnyjDkKG=bzJoNw at mail dot gmail dot com> <532F8BC5 dot 1060207 at codesourcery dot com>
On 03/24/14 09:35, Yao Qi wrote:
On 03/20/2014 12:01 AM, Marcus Shawcroft wrote:
Better no diagram than a broken diagram, but wouldn't it be better to
fix the diagram rather than just remove the whole comment?
Hi, Marcus,
I've updated the diagram per my understanding, is it correct?
https://sourceware.org/ml/gdb-patches/2014-02/msg00378.html
AFAK, this pic is not right.
| +----------+
^ | |
| | 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
+----------+
interrupted_function_pc is not set to lr, the code in Linux kernel is:
setup_sigframe
for (i = 0; i < 31; i++)
__put_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i],
err);
__put_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err);
__put_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err);
__put_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err);
The struct has a special part for pc,sp and pstate.
That is why I want to remove the pic and add the Linux function name to comments.
I think the code is more clear than a ascii pic. :P
I will post a new patch that add ascii pic back.
Thanks,
Hui