This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/18567] Frame filters apply to 'backtrace' but not 'frame' command
- From: "adinn at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 14 Apr 2016 08:36:24 +0000
- Subject: [Bug python/18567] Frame filters apply to 'backtrace' but not 'frame' command
- Auto-submitted: auto-generated
- References: <bug-18567-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18567
Andrew Dinn <adinn at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adinn at redhat dot com
--- Comment #4 from Andrew Dinn <adinn at redhat dot com> ---
(In reply to Phil Muldoon from comment #2)
> Yes, that's a design intent. They only apply (at the moment) to backtraces
> (in MI and CLI). That being said, let's revisit that decision.
>
> I'm not sure how a frame filter can apply to a single line of output? Frame
> filters receive and return an iterator of frame decorators that are printed
> out when the frame filter chain is exausted. If one frame is only ever
> printed (regardless, say, if the iterator had more than one), then a frame
> filter is not needed: there's nothing to filter. Perhaps we could apply a
> single frame decorator?
Can you not achieve this by subclassing the frame_iter so that only produces
one frame at the required index in the frame list? That way when you only need
one frame decorated you can pass a subclassed iter to the frame filter and get
a single frame decorator back but for the case where you want all frames
decorated (under bt) you can pass the current iter.
> However, that would be a pain as previously written frame filters that would
> apply to backtraces would have to adapt to just returning one frame for
> these and other commands. I suppose we could, in fact, take a frame filter
> here and just print the first frame as a compromise; this would allow
> existing frame filters to just work.
I think it would be better for performance if only the one frame were presented
to the filter.
--
You are receiving this mail because:
You are on the CC list for the bug.