[PATCH 4/6] Full paths in DAP stackTrace responses
Lancelot SIX
lsix@lancelotsix.com
Fri Jul 28 15:29:08 GMT 2023
Hi Tom,
> +class FrameDecorator(_FrameDecoratorBase):
> + """Basic implementation of a Frame Decorator"""
> +
I can see that this pre-existed your patch, but is it expected to have
two docstrings instead of one with empty lines to separate paragraphs?
> + """ This base frame decorator decorates a frame or another frame
> + decorator, and provides convenience methods. If this object is
> + wrapping a frame decorator, defer to that wrapped object's method
> + if it has one. This allows for frame decorators that have
> + sub-classed FrameDecorator object, but also wrap other frame
> + decorators on the same frame to correctly execute.
> +
> @@ -172,7 +172,11 @@ def _frame_iterator(frame, frame_low, frame_high, always):
>
> # Apply a basic frame decorator to all gdb.Frames. This unifies
> # the interface.
> - frame_iterator = map(FrameDecorator, frame_iterator)
> + if always:
> + decorator = DAPFrameDecorator
> + else:
> + decorator = FrameDecorator
> + frame_iterator = map(decorator, frame_iterator)
The purpose of always (always return an iterator) seems orthogonal to
the way `filename()` behaves. I find this confusing. Should the
parameter be renamed / a new parameter added?
Best,
Lancelot.
More information about the Gdb-patches
mailing list