This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA v2 00/13] various frame filter fixes and cleanups
On 14/08/17 14:20, Pedro Alves wrote:
> On 08/14/2017 04:40 AM, Tom Tromey wrote:
>
>>> So "bt elide" means "elide the elided frames", not "show me the
>>> elided frames too". It's fine with me, though I mildly wonder whether
>>> users will be confused by the "double negative".
>>
>> "Elide" means "drop", so really "bt elide" should mean "drop whatever
>> frames are droppable". Having "bt elide" mean "show the dropped
>> frames" would be confusing. But maybe another word would be better
>> here, I don't know.
>
> Maybe "bt no-elided", to go with "bt no-filters".
>
> Because "elided frames" are a preexisting concept, and "elide" is
> actually referring to that concept.
I suggest hidden or show-hidden or something like that.
>
> @item backtrace no-elided
> A Python frame filter might decide to ``elide'' some frames. Normally
> such elided frames are still printed, but they are indented relative
> to the filtered frames that cause them to be elided. The @code{no-elided}
> option causes elided frames to not be printed at all.
>
> Or alternatively, to make gdb not print elided frames by default and
> add a "bt elided" switch to print them:
>
> @item backtrace elided
> A Python frame filter might decide to ``elide'' some frames. Normally
> such elided frames are not printed. The @code{elided} option causes
> elided frames to be printed, indented relative to the filtered frames
> that cause them to be elided.
I'd prefer a "hidden" attribute to the frame decorators (or a callback
API like the rest of the functions). Returns True or False. GDB would
honour this and print/not print the frame according to the value
returned. This is better, to me, than a global override printing/not
printing all elided frames. The bt command should still have a global
override (IE, elide, or hidden, or show-hidden, or whatever) as
discussed in the patch, and that would allow the user final and manual
control of what is printed or not. I prefer frame decorators to be
able to decide what should, or should not, be printed as the default
as it's the presentation layer.
What do you think?
Cheers
Phil