This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch v8 21/24] record-btrace: extend unwinder
- From: Pedro Alves <palves at redhat dot com>
- To: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- Cc: "jan dot kratochvil at redhat dot com" <jan dot kratochvil at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 16 Dec 2013 19:22:42 +0000
- Subject: Re: [patch v8 21/24] record-btrace: extend unwinder
- Authentication-results: sourceware.org; auth=none
- References: <1386839747-8860-1-git-send-email-markus dot t dot metzger at intel dot com> <1386839747-8860-22-git-send-email-markus dot t dot metzger at intel dot com> <52AB63BB dot 30206 at redhat dot com> <A78C989F6D9628469189715575E55B230AA38CD0 at IRSMSX104 dot ger dot corp dot intel dot com>
On 12/16/2013 12:42 PM, Metzger, Markus T wrote:
>>> @@ -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?
--
Pedro Alves