[PATCH 2/3] record-btrace, disas: omit pc prefix

Metzger, Markus T markus.t.metzger@intel.com
Thu Feb 28 08:45:00 GMT 2013


> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Thursday, February 28, 2013 8:17 AM


> On Thu, 28 Feb 2013 08:03:04 +0100, Metzger, Markus T wrote:
> > Within a loop, you will see repeating => very frequently.
> >
> > (gdb) rec inst -
> >    0x00000000004006ec <_ZL4loopPv+8>:	mov    0x200955(%rip),%rax        # 0x601048 <_ZL6shared>
> > => 0x00000000004006f3 <_ZL4loopPv+15>:	add    $0x1,%rax
> >    0x00000000004006f7 <_ZL4loopPv+19>:	mov    %rax,0x20094a(%rip)        # 0x601048 <_ZL6shared>
> >    0x00000000004006fe <_ZL4loopPv+26>:	jmp    0x4006ec <_ZL4loopPv+8>
> >    0x00000000004006ec <_ZL4loopPv+8>:	mov    0x200955(%rip),%rax        # 0x601048 <_ZL6shared>
> > => 0x00000000004006f3 <_ZL4loopPv+15>:	add    $0x1,%rax
> >    0x00000000004006f7 <_ZL4loopPv+19>:	mov    %rax,0x20094a(%rip)        # 0x601048 <_ZL6shared>
> >    0x00000000004006fe <_ZL4loopPv+26>:	jmp    0x4006ec <_ZL4loopPv+8>
> >    0x00000000004006ec <_ZL4loopPv+8>:	mov    0x200955(%rip),%rax        # 0x601048 <_ZL6shared>
> > => 0x00000000004006f3 <_ZL4loopPv+15>:	add    $0x1,%rax
> > (gdb)
> 
> I did not think about this case but I still find it correct, => should display
> the current PC and it is the current PC.

I did not say that it is incorrect. I said I find it confusing if => appears several
times within the trace.

OK to make it optional, say, with a /p modifier?


> > > (gdb) record instruction-history
> > > warning: Recorded trace may be corrupted.
> > > warning: Recorded trace may be corrupted.
> > > warning: Recorded trace may be corrupted.
> >
> > That's unexpected. If you can reproduce this, would you please send
> > me the reproducer so I can have a look at it?
> 
> I have patched intel_supports_btrace on my model 0x1a, couldn't it be the
> reason?

Yes, that might explain it.

Thanks,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052



More information about the Gdb-patches mailing list