RE: x86_64-m32 internal error for multi-thread-step.exp [Re: [PATCH v10 06/28] btrace: change branch trace data structure]

Metzger, Markus T
2015-01-23T07:45:55Z

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Jan Kratochvil
> Sent: Thursday, January 22, 2015 5:38 PM
> To: Metzger, Markus T
> Cc: Patrick Palka; palves@redhat.com; gdb-patches@sourceware.org
> Subject: Re: x86_64-m32 internal error for multi-thread-step.exp [Re:
> [PATCH v10 06/28] btrace: change branch trace data structure]
>
> On Thu, 22 Jan 2015 13:29:55 +0100, Metzger, Markus T wrote:
> > This fail seems to be caused by
> 588dcc3edbde19f90e76de969dbfa7ab3e17951a
> > "Consolidate the custom TUI query hook with the default query hook". It is
> not
> > related to btrace.
>
> I am sorry I did not retest the commits back to the initial btrace check-in.
> As I only now have a hardware capable of btrace I have assumed the FAILs
> are
> there since the initial btrace check-in.

I didn't mean to complain; I just wanted to point out that this fail is more
generic and affects debugging multi-threaded inferiors in general.

The other fails you reported do seem to be there since the beginning.

It looks like the is_kernel_addr heuristic gets it wrong for 32bit inferiors
on 64-bit systems. The heuristic checks whether the most significant bit
is set. On 64-bit systems, the kernel is loaded into the high 64-bit area
leaving the entire 32-bit address space to 32-bit processes. GDB checks
bit 31 since it is a 32-bit inferior. It should still check bit 63 since it is a 64-bit
kernel. Does GDB even know that the 32-bit inferior is running on a 64-bit
system?

There also seem to be some issues in reverse/replay stepping. The
reverse-next command keeps going when it reached the previous
source line; same for replay next. I need to investigate why this is.

> As I only now have a hardware capable of btrace

That's good. I hope this feature is useful for your own debugging work.
Let me know how you like it.

Regards,
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