From: Nikola Prica <nikola.prica@rt-rk.com>
To: gdb-patches@sourceware.org
Cc: "Ananthakrishna Sowda (asowda)" <asowda@cisco.com>,
"Ivan Baev (ibaev)" <ibaev@cisco.com>,
'Nemanja Popov' <nemanja.popov@rt-rk.com>,
Djordje Todorovic <Djordje.Todorovic@rt-rk.com>
Subject: [PING]Fix for prologue processing on PowerPC
Date: Thu, 26 Oct 2017 10:02:00 -0000 [thread overview]
Message-ID: <e3274bee-eb2d-3706-3af0-59f28c9c0899@rt-rk.com> (raw)
In-Reply-To: <f90d189e-7ec5-34f9-c776-8af42a3c07a6@rt-rk.com>
Can someone please take a look into this?
Thanks,
Nikola Prica
On 22.09.2017. 14:11, Nikola Prica wrote:
> After analyzing dump of ppc program, whose crash occurred after
> watchdog_force_here () function, GDB couldn't print full back trace
> because GDB couldn't unwind PC from the watchdog fucntion.
>
> The problem is introduced with the following patch:
>
> https://sourceware.org/ml/gdb-patches/2008-08/msg00245.html
>
> In function skip_prologue(), shifted lr_reg makes below condition always
> false because non-shifted lr_reg value is expected to be checked.
>
> else if (lr_reg >= 0 &&
> /* std Rx, NUM(r1) || stdu Rx, NUM(r1) */
> (((op & 0xffff0000) == (lr_reg | 0xf8010000)) ||
> /* stw Rx, NUM(r1) */
> ((op & 0xffff0000) == (lr_reg | 0x90010000)) ||
> /* stwu Rx, NUM(r1) */
> ((op & 0xffff0000) == (lr_reg | 0x94010000))))
>
> Before this fix unwinding was able to work because it relied on unwind
> directives or on some of the next frames to find PC. Problem came with
> watchdog_force_here() function which didn't contain unwind directives.
>
> I wasn't able to produce test case that would show improvements for end
> user. I suppose that changes would be visible if watchdog event was
> called, but I don't have valid ppc board to try this. I have tried this
> code on simple test case with few functions in back trace. The back
> trace is printed correctly with and without this fix, but the difference
> between those two runs is that the body of the upper condition was
> visited with this patch. After visiting the body there was no need to
> look for PC counter in next frames nor to use unwind directives.
next prev parent reply other threads:[~2017-10-26 10:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 12:11 Fix " Nikola Prica
2017-10-05 2:01 ` Kevin Buettner
2017-10-26 10:02 ` Nikola Prica [this message]
2017-11-08 16:58 ` [PING]Fix " Kevin Buettner
2017-11-09 18:15 ` [PING][PATCH] Fix " Nikola Prica
2017-12-01 19:37 ` pedromfc
2017-12-19 15:57 ` Nikola Prica
2017-12-29 18:05 ` Pedro Franco de Carvalho
2018-01-09 11:22 ` Nikola Prica
2018-01-10 17:26 ` Pedro Franco de Carvalho
2018-01-11 15:12 ` Nikola Prica
2018-01-19 7:49 ` Nikola Prica
2018-01-19 19:01 ` Pedro Franco de Carvalho
2018-01-19 19:08 ` Pedro Franco de Carvalho
2018-01-27 14:32 ` Nikola Prica
2018-01-31 18:04 ` Pedro Franco de Carvalho
2018-01-31 18:28 ` Ulrich Weigand
2018-02-01 13:09 ` Nikola Prica
2018-01-02 10:29 ` Yao Qi
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=e3274bee-eb2d-3706-3af0-59f28c9c0899@rt-rk.com \
--to=nikola.prica@rt-rk.com \
--cc=Djordje.Todorovic@rt-rk.com \
--cc=asowda@cisco.com \
--cc=gdb-patches@sourceware.org \
--cc=ibaev@cisco.com \
--cc=nemanja.popov@rt-rk.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).