All of lore.kernel.org
 help / color / mirror / Atom feed
* Commit abb0cd93494 breaks -singlestep -d in_asm,cpu with qemu-system-sh4
@ 2021-10-25 21:16 BALATON Zoltan
  2021-10-25 21:27 ` Philippe Mathieu-Daudé
  2021-10-26  2:14 ` Richard Henderson
  0 siblings, 2 replies; 4+ messages in thread
From: BALATON Zoltan @ 2021-10-25 21:16 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Richard Henderson

Hello,

Commit abb0cd93494 (accel/tcg: Split out log_cpu_exec) seems to have 
broken -singlestep -d in_asm,cpu output with qemu-system-sh4 after a delay 
slot. Since that commit I get:

pc=0xac80003e sr=0x500000f1 pr=0x00000000 fpscr=0x00040001
spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
sgr=0x00000000 dbr=0x00000000 delayed_pc=0x00000000 fpul=0x00000000
r0=0x8cc9d000 r1=0xacc9d000 r2=0xe0000000 r3=0x8c800000
r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
----------------
IN:
0xac800040:  bt.s       0xac80001a

pc=0xac800040 sr=0x500000f1 pr=0x00000000 fpscr=0x00040001
spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
sgr=0x00000000 dbr=0x00000000 delayed_pc=0x00000000 fpul=0x00000000
r0=0x8cc9cfe0 r1=0xacc9d000 r2=0xe0000000 r3=0x8c800000
r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
----------------
IN:
0xac800042:  add        #-32,r1

pc=0xac800042 sr=0x500000f1 pr=0x00000000 fpscr=0x00040001
spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
sgr=0x00000000 dbr=0x00000000 delayed_pc=0xac80001a fpul=0x00000000
r0=0x8cc9cfe0 r1=0xacc9d000 r2=0xe0000000 r3=0x8c800000
r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
in conditional delay slot (delayed_pc=0xac80001a)
pc=0xac80001a sr=0x500000f1 pr=0x00000000 fpscr=0x00040001
spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
sgr=0x00000000 dbr=0x00000000 delayed_pc=0xac80001a fpul=0x00000000
r0=0x8cc9cfe0 r1=0xacc9cfe0 r2=0xe0000000 r3=0x8c800000
r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
pc=0xac80001c sr=0x500000f1 pr=0x00000000 fpscr=0x00040001
spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
sgr=0x00000000 dbr=0x00000000 delayed_pc=0xac80001a fpul=0x00000000
r0=0x8cc9cfe0 r1=0xacc9cfe0 r2=0xe0000000 r3=0x8c800000
r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000

After the first delay slot no more in_asm output is printed. Going back to 
the commit before or reverting that commit I get normal output:

----------------
IN:
0x8c801574:  bra        0x8c801528

pc=0x8c801574 sr=0x500000f0 pr=0x8c8013d6 fpscr=0x00040001
spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
sgr=0x00000000 dbr=0x00000000 delayed_pc=0x8c801594 fpul=0x00000000
r0=0x00000007 r1=0x0000000e r2=0x8cca1084 r3=0xfffffff9
r4=0x00000137 r5=0xfffffffa r6=0x8cca1570 r7=0x00000012
r8=0x8cca1044 r9=0x00000011 r10=0x00000005 r11=0x00097d36
r12=0x8cca1014 r13=0x0000000f r14=0x8cc0183c r15=0x8cca0f80
r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
----------------
IN:
0x8c801576:  add        #-7,r5

pc=0x8c801576 sr=0x500000f0 pr=0x8c8013d6 fpscr=0x00040001
spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
sgr=0x00000000 dbr=0x00000000 delayed_pc=0x8c801528 fpul=0x00000000
r0=0x00000007 r1=0x0000000e r2=0x8cca1084 r3=0xfffffff9
r4=0x00000137 r5=0xfffffffa r6=0x8cca1570 r7=0x00000012
r8=0x8cca1044 r9=0x00000011 r10=0x00000005 r11=0x00097d36
r12=0x8cca1014 r13=0x0000000f r14=0x8cc0183c r15=0x8cca0f80
r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
in delay slot (delayed_pc=0x8c801528)
----------------
IN:
0x8c800964:  .word 0x0000

pc=0x8c800964 sr=0x500000f1 pr=0x8c801654 fpscr=0x00040001
spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
sgr=0x00000000 dbr=0x00000000 delayed_pc=0x8c800964 fpul=0x00000000
r0=0x0000001b r1=0xac8009ca r2=0x8cc9956d r3=0xfffffefe
r4=0x8cca1014 r5=0x00000000 r6=0x0142850a r7=0x8cc5001e
r8=0x8cca1044 r9=0x00000102 r10=0x00000000 r11=0x00000000
r12=0xac8009ca r13=0xac8009aa r14=0x00000000 r15=0x8cca0f28
r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
----------------
IN:
0xac800000:  mov.l      0xac80007c,r1   ! 0x500000f0

pc=0xac800000 sr=0x700000f0 pr=0x00000000 fpscr=0x00040001
spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
sgr=0x00000000 dbr=0x00000000 delayed_pc=0x00000000 fpul=0x00000000
r0=0x00000000 r1=0x00000000 r2=0x00000000 r3=0x00000000
r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
r16=0x00000000 r17=0x00000000 r18=0x00000000 r19=0x00000000
r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000

However I still don't understand how the delayed branch ends up at 
0x8c800964 instead of 0x8c801528 above. Is this ouput not showing some 
already translated TBs even with -singlestep -d in_asm,cpu,nochain and 
that's why I see those cpu dumps without instructions? What's the correct 
way to get a trace of all executed instructions?

Regards,
BALATON Zoltan


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

* Re: Commit abb0cd93494 breaks -singlestep -d in_asm,cpu with qemu-system-sh4
  2021-10-25 21:16 Commit abb0cd93494 breaks -singlestep -d in_asm,cpu with qemu-system-sh4 BALATON Zoltan
@ 2021-10-25 21:27 ` Philippe Mathieu-Daudé
  2021-10-25 22:46   ` BALATON Zoltan
  2021-10-26  2:14 ` Richard Henderson
  1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-10-25 21:27 UTC (permalink / raw)
  To: BALATON Zoltan, QEMU Developers; +Cc: Richard Henderson

On 10/25/21 23:16, BALATON Zoltan wrote:
> Hello,
> 
> Commit abb0cd93494 (accel/tcg: Split out log_cpu_exec) seems to have
> broken -singlestep -d in_asm,cpu output with qemu-system-sh4 after a
> delay slot.
[...]
> However I still don't understand how the delayed branch ends up at
> 0x8c800964 instead of 0x8c801528 above. Is this ouput not showing some
> already translated TBs even with -singlestep -d in_asm,cpu,nochain and
> that's why I see those cpu dumps without instructions? What's the
> correct way to get a trace of all executed instructions?

IIUC this commit you now need to use both cpu,exec to get the output?


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

* Re: Commit abb0cd93494 breaks -singlestep -d in_asm,cpu with qemu-system-sh4
  2021-10-25 21:27 ` Philippe Mathieu-Daudé
@ 2021-10-25 22:46   ` BALATON Zoltan
  0 siblings, 0 replies; 4+ messages in thread
From: BALATON Zoltan @ 2021-10-25 22:46 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: Richard Henderson, QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]

On Mon, 25 Oct 2021, Philippe Mathieu-Daudé wrote:
> On 10/25/21 23:16, BALATON Zoltan wrote:
>> Hello,
>>
>> Commit abb0cd93494 (accel/tcg: Split out log_cpu_exec) seems to have
>> broken -singlestep -d in_asm,cpu output with qemu-system-sh4 after a
>> delay slot.
> [...]
>> However I still don't understand how the delayed branch ends up at
>> 0x8c800964 instead of 0x8c801528 above. Is this ouput not showing some
>> already translated TBs even with -singlestep -d in_asm,cpu,nochain and
>> that's why I see those cpu dumps without instructions? What's the
>> correct way to get a trace of all executed instructions?
>
> IIUC this commit you now need to use both cpu,exec to get the output?

Nope, I get the same even adding exec. I think it now also prints 
registers for already translated instructions where in_asm produces no 
ouput whereas before it was only dumping state when in_asm also had ouput. 
So now we get a lot more cpu state but we don't really know what they are 
for. Not sure what's the use of that, the previous output looked more 
useful.

Regards,
BALATON Zoltan

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

* Re: Commit abb0cd93494 breaks -singlestep -d in_asm,cpu with qemu-system-sh4
  2021-10-25 21:16 Commit abb0cd93494 breaks -singlestep -d in_asm,cpu with qemu-system-sh4 BALATON Zoltan
  2021-10-25 21:27 ` Philippe Mathieu-Daudé
@ 2021-10-26  2:14 ` Richard Henderson
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2021-10-26  2:14 UTC (permalink / raw)
  To: BALATON Zoltan, QEMU Developers

On 10/25/21 2:16 PM, BALATON Zoltan wrote:
> Hello,
> 
> Commit abb0cd93494 (accel/tcg: Split out log_cpu_exec) seems to have broken -singlestep -d 
> in_asm,cpu output with qemu-system-sh4 after a delay slot. Since that commit I get:
> 
> pc=0xac80003e sr=0x500000f1 pr=0x00000000 fpscr=0x00040001
> spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
> sgr=0x00000000 dbr=0x00000000 delayed_pc=0x00000000 fpul=0x00000000
> r0=0x8cc9d000 r1=0xacc9d000 r2=0xe0000000 r3=0x8c800000
> r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
> r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
> r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
> r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
> r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
> ----------------
> IN:
> 0xac800040:  bt.s       0xac80001a
> 
> pc=0xac800040 sr=0x500000f1 pr=0x00000000 fpscr=0x00040001
> spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
> sgr=0x00000000 dbr=0x00000000 delayed_pc=0x00000000 fpul=0x00000000
> r0=0x8cc9cfe0 r1=0xacc9d000 r2=0xe0000000 r3=0x8c800000
> r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
> r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
> r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
> r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
> r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
> ----------------
> IN:
> 0xac800042:  add        #-32,r1
> 
> pc=0xac800042 sr=0x500000f1 pr=0x00000000 fpscr=0x00040001
> spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
> sgr=0x00000000 dbr=0x00000000 delayed_pc=0xac80001a fpul=0x00000000
> r0=0x8cc9cfe0 r1=0xacc9d000 r2=0xe0000000 r3=0x8c800000
> r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
> r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
> r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
> r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
> r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
> in conditional delay slot (delayed_pc=0xac80001a)
> pc=0xac80001a sr=0x500000f1 pr=0x00000000 fpscr=0x00040001
> spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
> sgr=0x00000000 dbr=0x00000000 delayed_pc=0xac80001a fpul=0x00000000
> r0=0x8cc9cfe0 r1=0xacc9cfe0 r2=0xe0000000 r3=0x8c800000
> r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
> r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
> r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
> r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
> r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
> pc=0xac80001c sr=0x500000f1 pr=0x00000000 fpscr=0x00040001
> spc=0x00000000 ssr=0x00000000 gbr=0x00000000 vbr=0x00000000
> sgr=0x00000000 dbr=0x00000000 delayed_pc=0xac80001a fpul=0x00000000
> r0=0x8cc9cfe0 r1=0xacc9cfe0 r2=0xe0000000 r3=0x8c800000
> r4=0x00000000 r5=0x00000000 r6=0x00000000 r7=0x00000000
> r8=0x00000000 r9=0x00000000 r10=0x00000000 r11=0x00000000
> r12=0x00000000 r13=0x00000000 r14=0x00000000 r15=0x00000000
> r16=0x00000000 r17=0x500000f0 r18=0x00000000 r19=0x00000000
> r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
> 
> After the first delay slot no more in_asm output is printed.

I don't think it's broken, it's just logging more (lots more) than it used to do -- that 
was part of the changes in that patch set.  If I turn off logging, and let -singlestep run 
by itself, it takes some time but I do get to a login prompt.


r~


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

end of thread, other threads:[~2021-10-26  2:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 21:16 Commit abb0cd93494 breaks -singlestep -d in_asm,cpu with qemu-system-sh4 BALATON Zoltan
2021-10-25 21:27 ` Philippe Mathieu-Daudé
2021-10-25 22:46   ` BALATON Zoltan
2021-10-26  2:14 ` Richard Henderson

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.