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 v9 11/29] record-btrace: optionally indent function call history


On 12/20/2013 12:53 PM, Metzger, Markus T wrote:
>> On 12/19/2013 04:44 PM, Markus Metzger wrote:
>>> Add a new modifier /c to the "record function-call-history" command to
>>> indent the function name based on its depth in the call stack.
>>>
>>> Also reorder the optional fields to have the indentation at the very
>> beginning.
>>> Prefix the insn range (/i modifier) with "inst ".
>>
>> I was a little surprised the manual didn't get an update for this one,
>> but I see an /i example is currently lacking.  Can one use both
>> /i and /l at the same time ?
> 
> Yes.  Does this need to be documented explicitly?

I think it'd be nice.

>>> There is one known bug regarding indentation that results from the fact
>> that we
>>> have the current instruction already inside the branch trace.  When the
>> current
>>> instruction is the first (and only) instruction in a function on the outermost
>>> level for which we have not seen the call, the indentation starts at level 1
>>> with 2 leading spaces.
>>
>> Hmm.  Why are we adding known bugs?  I'm not sure I understood it, but
>> from
>> your description it sounds like the condition should be detectable?
> 
> Yes, it is detectable.  You can't fix it up afterwards, though, so you need to
> check this when computing the trace for each instruction.  I have not tried
> to fix it because I think you wouldn't even notice it in practice.
>
> The fix is relatively easy, so I added it and updated the tests.  Looking back, I
> can't really say why I haven't just fixed it right away.

Alright, sounds great.  Thanks for going the extra mile.

-- 
Pedro Alves


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