From: "Alex Bennée" <alex.bennee@linaro.org>
To: Lucien Anti-Spam <lucienmp_antispam@yahoo.com>
Cc: "Emilio G. Cota" <cota@braap.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Laurent Vivier <laurent@vivier.eu>
Subject: Re: [Qemu-devel] m68k gdb has stopped single stepping correctly
Date: Thu, 24 Jan 2019 13:38:51 +0000 [thread overview]
Message-ID: <87va2eyy38.fsf@linaro.org> (raw)
In-Reply-To: <70145779.391347.1548334794441@mail.yahoo.com>
Lucien Anti-Spam via Qemu-devel <qemu-devel@nongnu.org> writes:
>
>
> > On Thursday, January 24, 2019, 3:08:07 AM GMT+9, Emilio G. Cota <cota@braap.org> wrote: > > On Wed, Jan 23, 2019 at 15:58:27 +0000, Lucien Anti-Spam via Qemu-devel wrote:> > Hi folks,
>> > I noticed that with 3.x release that the GDB options (-S -s) for certain CPU results in very weird stepping.Usually stops afer a few steps, whilst the stub continues responding the PC doesnt update, however, I have only deeply looked at the m68k.
>> > In the case of the m68K the SR gets the trace bit set (T=10b), and the PC doesnt update.The m68k gdbstub, and main gdbstub seem mostly unchanged.But it seems the INSN handling has changed greatly for the m68k.
>> > Does anyone have any ideas what happened?>> Can you please bisect to find at which point things start misbehaving?
>>
>> Thanks,
>> Emilio
> Understood, I was hoping my original post might jog someone's memory about the issue.
> Apparently not, so after some digging I found that it was introduced with the refactor to TranslatorOps, specifically two lines got dropped that update the PC if single-stepping is being performed ( commit 11ab74b01e0a8ea4973eed89c6b90fa6e4fb9fb6 )
> Since its not valid to revert, shall I go ahead and submit a patch for
> these two lines?
Yes please!
> Also I noticed a lack of gdb-stub tests, but there are cpu tests (eg. check-qtest-m68k). I was considering it might be interesting to write some basic network code to send / receive gdb packets to re-use these cpu tests for step, break-point, register update, and so on.
> I saw a gdb-python test but I felt this would need specific kernel \
> gdb for each cpu with is likely to end in a lot of problems getting
> right gdbs - simple packet send/receive/check would be better?
The gdb-python test works should work with pretty much any kernel image
but is currently only run manually. It only really sets breakpoints at
common points in the kernel and doesn't need a rootfs to complete.
So it's useful for bisecting but it would be nice to have proper
integrated tests. I basically submitted it so it wouldn't just languish
in my own magic directory of random tests.
> What do people think, what would be the right approach to this?
Once thing we have now is tests/tcg and the infrastructure for building
foreign binaries on most developer systems. We can certainly leverage
those to have a nice test binary which we can use to exercise gdbstub
for linux-user debugging with the appropriate wrapping of gdb and
launching a guest.
There is also a WIP series I posted:
Subject: [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris
Date: Mon, 10 Dec 2018 15:28:16 +0000
Message-Id: <20181210152829.29271-1-alex.bennee@linaro.org>
Which makes the tests/tcg infrastructure aware of softmmu targets (used
for system emulation). We could certainly build a mini-stub of an OS
using this to exercise the system gdbstub. You could just use the
existing binaries we use for migration testing although it would be nice
to have them in source form as well.
You might want to look at the avocado tests - they may be better suited
for coordinating several binaries talking to each other (although the
existing qtest tests do do something similar).
>
> Cheers,Luc
>
>
--
Alex Bennée
next prev parent reply other threads:[~2019-01-24 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <251451940.431966.1548259107629.ref@mail.yahoo.com>
2019-01-23 15:58 ` [Qemu-devel] m68k gdb has stopped single stepping correctly Lucien Anti-Spam
2019-01-23 18:08 ` Emilio G. Cota
2019-01-24 12:59 ` Lucien Anti-Spam
2019-01-24 13:38 ` Laurent Vivier
2019-01-24 13:38 ` Alex Bennée [this message]
2019-02-20 15:38 ` Thomas Huth
2019-02-21 7:39 ` Lucien Anti-Spam
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=87va2eyy38.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=cota@braap.org \
--cc=laurent@vivier.eu \
--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).