From: Yao Qi <qiyaoltc@gmail.com>
To: Johannes Stoelp <Johannes.Stoelp@synopsys.com>
Cc: "gdb\@sourceware.org" <gdb@sourceware.org>,
Andreas Ropers <Andreas.Ropers@synopsys.com>,
Marc Mones <Marc.Mones@synopsys.com>,
"Kai Schuetz" <Kai.Schuetz@synopsys.com>
Subject: Re: Infinite Stack Unwinding ARM
Date: Mon, 10 Apr 2017 12:01:00 -0000 [thread overview]
Message-ID: <8660iclbdo.fsf@gmail.com> (raw)
In-Reply-To: <6ECCE8A0904A1643BE093611EF2098CE01475738@DE02WEMBXB.internal.synopsys.com> (Johannes Stoelp's message of "Fri, 7 Apr 2017 07:15:21 +0000")
Johannes Stoelp <Johannes.Stoelp@synopsys.com> writes:
> I understand that gdb does not have to understand every hand written
> assembler routine, but I would like to emphasize that gdb in this
> particular case ends in an "infinite" loop printing the backtrace line
> by line (I put infinite in quotes because the loop is limited by the
> lower boundary of an integer).
> I would expect gdb to be more defensive in this case and either try
> other unwinding techniques like backward unwinding (from bottom up) or
> just stop unwinding because of to less information.
Don't understand what do you mean by "backward unwinding". IIUC,
el1_irq are vector entry points, so I expect GDB unwinding stops on
el1_irq, but I want to check with kernel people to see their
expectation. Can you post me the backtrace, as a sample output?
We may end up with having some Linux kernel specific stuff, and this
should fall in "Linux kernel debugging for aarch64". Note that we had
patches for general Linux kernel debugging
https://sourceware.org/ml/gdb-patches/2017-03/msg00268.html (well, I
need to review them soon)
> In my understanding situations like this can also occur when the stack
> gets corrupted. There I would also expect gdb to not end in an
> infinite loop since gdb is intended to analyze the non-expected
> situation.
>
> One other question that came up by comparing the arm and the aarch64 analyzer:
> * Is there a special reason/trick why the arm analyzer
> (gdb/arm-tdep.c:arm_analyze_prologue(...)) skips instructions that it
> doesn't recognize while the aarch64 analyzer
> (gdb/aarch64-tdep.c:aarch64_prologue_analyzer(...)) stops when the
> first unrecognized instruction is hit?
I don't see any reason here, just because they are two different
architectures.
--
Yao (齐尧)
next prev parent reply other threads:[~2017-04-10 12:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 12:54 Johannes Stoelp
2017-04-05 11:09 ` Yao Qi
2017-04-07 7:15 ` Johannes Stoelp
2017-04-08 5:00 ` Duane Ellis
2017-04-10 12:01 ` Yao Qi [this message]
2017-04-11 16:20 ` Johannes Stoelp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8660iclbdo.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=Andreas.Ropers@synopsys.com \
--cc=Johannes.Stoelp@synopsys.com \
--cc=Kai.Schuetz@synopsys.com \
--cc=Marc.Mones@synopsys.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox