RE: [patch v8 21/24] record-btrace: extend unwinder

Metzger, Markus T
2013-12-17T12:56:49Z

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Pedro Alves
> Sent: Monday, December 16, 2013 8:23 PM

> >>> @@ -222,7 +222,11 @@ enum frame_type
> >>> ARCH_FRAME,
> >>> /* Sentinel or registers frame. This frame obtains register values
> >>> direct from the inferior's registers. */
> >>> - SENTINEL_FRAME
> >>> + SENTINEL_FRAME,
> >>> + /* A branch tracing frame. */
> >>> + BTRACE_FRAME,
> >>> + /* A branch tracing tail call frame. */
> >>> + BTRACE_TAILCALL_FRAME
> >>> };
> >>
> >> Hmm? Why were these needed? Missing patch rationale... And missing
> >> comments, I suppose.
> >
> > The alternative would be to pretend that they are NORMAL_FRAME
> > and TAILCALL_FRAME, respectively. I thought it cleaner to add a new
> > frame type. Those frames don't have available stack.
> >
> > Do you want me to use NORMAL_FRAME and TAILCALL_FRAME, instead?
>
> If they behave example like those, then yes. I wouldn't call
> it "pretend" then. This is IMO just like we don't have other
> frames types for the many different implementations of
> NORMAL_FRAMEs or SIGTRAP_FRAME unwinders, etc., and likewise for
> when inspecting tracepoint traceframes with unavailable stack.
> IOW, is there any place in the common code that needs to
> distinguish NORMAL_FRAME vs BTRACE_FRAME and TAILCALL_FRAME
> vs BTRACE_TAILCALL_FRAME?

They behave the same. I'll remove the new frame types.

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