From: Richard Henderson <richard.henderson@linaro.org>
To: Lucien Murray-Pitts <lucienmp.qemu@gmail.com>
Cc: Lucien Anti-Spam <lucienmp_antispam@yahoo.com>,
qemu-devel@nongnu.org, Laurent Vivier <laurent@vivier.eu>
Subject: Re: [Qemu-devel] RFC: Why does target/m68k RTE insn. use gen_exception
Date: Fri, 28 Jun 2019 11:35:48 +0200 [thread overview]
Message-ID: <eadb57ae-256d-0bb7-5988-f493662a5caf@linaro.org> (raw)
In-Reply-To: <20190628002713.GA19257@localhost.localdomain>
On 6/28/19 2:27 AM, Lucien Murray-Pitts wrote:
> The original way of handling it was causing single step to malfunction, I dont
> rightly know why but the effect was that step would step twice and end up
> inside the ISR function again OR just stepping past the RTE as if it didnt
> exist.
>
> I have made a quick hack to implement it the way you suggest and confirm that
> works better.
>
> HOWEVER, the "return" address is the instruction that causes the exception.
> So it immediately does return to the ISR.
>
> This is a different issue, but I think interrelated to the original problem.
Is this a synchronous exception, like a SIGSEGV, that the instruction is
causing? I have made attempts at fixing asynchronous interrupts, like the
clock, in the presence of single-stepping. I haven't tested that in a while
and I hope it's still working...
> Further single stepping INTO the failing instruction results in ending up
> at the ISR +1 instruction
For a synchronous exception, that sounds like a real bug.
Probably within cpu_handle_exception,
#else
if (replay_exception()) {
CPUClass *cc = CPU_GET_CLASS(cpu);
qemu_mutex_lock_iothread();
cc->do_interrupt(cpu);
qemu_mutex_unlock_iothread();
+ /* Single-step into the exception handler. */
+ if (cpu->singlestep_enabled) {
+ cpu_handle_debug_exception(cpu);
+ }
cpu->exception_index = -1;
} else if (!replay_has_interrupt()) {
r~
next prev parent reply other threads:[~2019-06-28 9:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2136180936.260219.1561641583358.ref@mail.yahoo.com>
2019-06-27 13:19 ` [Qemu-devel] RFC: Why does target/m68k RTE insn. use gen_exception Lucien Anti-Spam via Qemu-devel
2019-06-27 13:22 ` Lucien Anti-Spam via Qemu-devel
2019-06-27 17:09 ` Richard Henderson
2019-06-28 0:27 ` Lucien Murray-Pitts
2019-06-28 9:35 ` Richard Henderson [this message]
2019-06-28 15:50 ` Lucien Murray-Pitts
2019-06-29 10:15 ` Richard Henderson
2019-06-29 16:36 ` Lucien Murray-Pitts
2019-06-30 8:20 ` Richard Henderson
2019-07-01 9:10 ` Peter Maydell
2019-07-01 12:04 ` Lucien Anti-Spam via Qemu-devel
2019-07-01 12:11 ` Peter Maydell
2019-07-09 16:58 ` Lucien Murray-Pitts
2019-07-09 17:06 ` Peter Maydell
2019-07-09 19:04 ` Richard Henderson
2019-07-10 13:35 ` Lucien Murray-Pitts
2019-07-10 17:50 ` Lucien Murray-Pitts
2019-07-10 18:15 ` Alex Bennée
2019-07-11 9:00 ` Peter Maydell
2019-07-11 9:18 ` Richard Henderson
2019-07-12 20:55 ` Lucien Murray-Pitts
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=eadb57ae-256d-0bb7-5988-f493662a5caf@linaro.org \
--to=richard.henderson@linaro.org \
--cc=laurent@vivier.eu \
--cc=lucienmp.qemu@gmail.com \
--cc=lucienmp_antispam@yahoo.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).