From: Joshua Kinard <kumba@gentoo.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Linux MIPS List <linux-mips@linux-mips.org>
Subject: Re: gcc-4.8+ and R10000+
Date: Mon, 29 Sep 2014 01:18:44 -0400 [thread overview]
Message-ID: <5428EBB4.7090509@gentoo.org> (raw)
In-Reply-To: <alpine.LFD.2.11.1409282017540.21156@eddie.linux-mips.org>
On 09/28/2014 15:34, Maciej W. Rozycki wrote:
> Joshua,
>
> I can't help you with the problem, but I can confirm one of your guesses:
>
>> I am guessing at a few things here:
>>
>> - Because ll/sc are atomic, gdb doesn't let you step through them, which is
>> why the instruction pointer jumps over the 'li' and 'sc' insns.
>
> -- this is exactly the case, GDB tries to be smart enough and when it sees
> an LL or LLD instruction it examines code that follows to find a matching
> SC or SCD instruction and any other exit points from the atomic section
> and sets internal breakpoints correctly to let the code fragment run at
> the full speed even if single stepping. Otherwise the exception taken at
> each single step would cause the conditional store instruction to always
> fail -- which might not be a big issue if you were knowingly stepping code
> e.g. with `stepi', but would cause big harm in implicit stepping through
> unknown or unrelated code such as when a software watchpoint is active.
>
> See `deal_with_atomic_sequence' in gdb/mips-tdep.c if curious about the
> details.
Ah ha, that does explain it! Though I don't think it's an issue with ll/sc in
the R10000. It's something with gcc's builtin __atomic_* functions I think,
though I still haven't ruled the kernel out yet, either. I have no way to step
through the kernel syscall to make that determination, though, so I'm focusing
more on gcc as time permits. Hopefully, the gcc maintainers will find time to
look into PR61538 some more soon.
Thanks!
--
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28
"The past tempts us, the present confuses us, the future frightens us. And our
lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
prev parent reply other threads:[~2014-09-29 5:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-07 8:25 gcc-4.8+ and R10000+ Joshua Kinard
2014-09-08 8:11 ` Miod Vallat
2014-09-08 9:44 ` Joshua Kinard
2014-09-22 9:31 ` Joshua Kinard
2014-09-22 9:31 ` Joshua Kinard
2014-09-28 19:34 ` Maciej W. Rozycki
2014-09-29 5:18 ` Joshua Kinard [this message]
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=5428EBB4.7090509@gentoo.org \
--to=kumba@gentoo.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.