From: Tom Tromey Date: Mon, 24 Jul 2023 14:41:23 +0000 (-0600) Subject: Rename private member of FrameDecorator X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3337b1e944f379fb30e1e1639586d9392096795;p=binutils-gdb.git Rename private member of FrameDecorator In Python, a member name starting with "__" is specially handled to make it "more private" to the class -- it isn't truly private, but it is renamed to make it less likely to be reused by mistake. This patch ensures that this is done for the private method of FrameDecorator. --- diff --git a/gdb/python/lib/gdb/FrameDecorator.py b/gdb/python/lib/gdb/FrameDecorator.py index 050cb934b7c..c4a7806e434 100644 --- a/gdb/python/lib/gdb/FrameDecorator.py +++ b/gdb/python/lib/gdb/FrameDecorator.py @@ -53,7 +53,7 @@ class FrameDecorator(object): self._base = base @staticmethod - def _is_limited_frame(frame): + def __is_limited_frame(frame): """Internal utility to determine if the frame is special or limited.""" sal = frame.find_sal() @@ -148,7 +148,7 @@ class FrameDecorator(object): return self._base.frame_args() frame = self.inferior_frame() - if self._is_limited_frame(frame): + if self.__is_limited_frame(frame): return None args = FrameVars(frame) @@ -164,7 +164,7 @@ class FrameDecorator(object): return self._base.frame_locals() frame = self.inferior_frame() - if self._is_limited_frame(frame): + if self.__is_limited_frame(frame): return None args = FrameVars(frame) @@ -179,7 +179,7 @@ class FrameDecorator(object): return self._base.line() frame = self.inferior_frame() - if self._is_limited_frame(frame): + if self.__is_limited_frame(frame): return None sal = frame.find_sal()