This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]