All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] m68k gdb has stopped single stepping correctly
       [not found] <251451940.431966.1548259107629.ref@mail.yahoo.com>
@ 2019-01-23 15:58 ` Lucien Anti-Spam
  2019-01-23 18:08   ` Emilio G. Cota
  0 siblings, 1 reply; 7+ messages in thread
From: Lucien Anti-Spam @ 2019-01-23 15:58 UTC (permalink / raw)
  To: qemu-devel

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?
Cheers,Luc

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] m68k gdb has stopped single stepping correctly
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Emilio G. Cota @ 2019-01-23 18:08 UTC (permalink / raw)
  To: Lucien Anti-Spam; +Cc: qemu-devel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] m68k gdb has stopped single stepping correctly
  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
  0 siblings, 2 replies; 7+ messages in thread
From: Lucien Anti-Spam @ 2019-01-24 12:59 UTC (permalink / raw)
  To: Emilio G. Cota; +Cc: qemu-devel, Laurent Vivier

 

   > 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?
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?
What do people think, what would be the right approach to this?

Cheers,Luc

  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] m68k gdb has stopped single stepping correctly
  2019-01-24 12:59     ` Lucien Anti-Spam
@ 2019-01-24 13:38       ` Laurent Vivier
  2019-01-24 13:38       ` Alex Bennée
  1 sibling, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-01-24 13:38 UTC (permalink / raw)
  To: Lucien Anti-Spam, Emilio G. Cota; +Cc: qemu-devel, Richard Henderson

On 24/01/2019 13:59, Lucien Anti-Spam wrote:
> 
> 
>> 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?

It seems to me to be a good solution, but CC'ing Richard for that.

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] m68k gdb has stopped single stepping correctly
  2019-01-24 12:59     ` Lucien Anti-Spam
  2019-01-24 13:38       ` Laurent Vivier
@ 2019-01-24 13:38       ` Alex Bennée
  2019-02-20 15:38         ` Thomas Huth
  1 sibling, 1 reply; 7+ messages in thread
From: Alex Bennée @ 2019-01-24 13:38 UTC (permalink / raw)
  To: Lucien Anti-Spam; +Cc: Emilio G. Cota, qemu-devel, Laurent Vivier


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] m68k gdb has stopped single stepping correctly
  2019-01-24 13:38       ` Alex Bennée
@ 2019-02-20 15:38         ` Thomas Huth
  2019-02-21  7:39           ` Lucien Anti-Spam
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Huth @ 2019-02-20 15:38 UTC (permalink / raw)
  To: Alex Bennée, Lucien Anti-Spam
  Cc: Emilio G. Cota, qemu-devel, Laurent Vivier

On 24/01/2019 14.38, Alex Bennée wrote:
> 
> 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!

 Hi Lucien,

did you ever sent the patch? I can't find it on the mailing list, and I
think this bug is still pending?

 Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] m68k gdb has stopped single stepping correctly
  2019-02-20 15:38         ` Thomas Huth
@ 2019-02-21  7:39           ` Lucien Anti-Spam
  0 siblings, 0 replies; 7+ messages in thread
From: Lucien Anti-Spam @ 2019-02-21  7:39 UTC (permalink / raw)
  To: Alex Bennée, Thomas Huth; +Cc: Emilio G. Cota, qemu-devel, Laurent Vivier

 Hi Thomas,
> did you ever sent the patch? I can't find it on the mailing list, and I think this bug is still pending?Yes, I have patches but was waiting for my first one to be successful in order to make sure I got the process down.  I will finish that shortly.
CheersLuc
   
 On 24/01/2019 14.38, Alex Bennée wrote:
> 
> 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!

 Hi Lucien,

did you ever sent the patch? I can't find it on the mailing list, and I
think this bug is still pending?

 Thomas
  

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-02-21  7:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
2019-02-20 15:38         ` Thomas Huth
2019-02-21  7:39           ` Lucien Anti-Spam

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.