[PATCH v3 2/4] gdb/python doc: Add enable property to the unwinder example

Paulo Neves via Gdb-patches
2022-06-03T16:02:38Z

The enable property is now also in the example code making it clear how
it is used and how it influences the operation of an unwinder.
---
gdb/doc/python.texi | 3 +++
1 file changed, 3 insertions(+)

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 228d515a817..3e4833a4a41 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -2805,6 +2805,9 @@ class FrameId(object):
class MyUnwinder(Unwinder):
def __init__(....):
super(MyUnwinder, self).__init___(<expects unwinder name argument>)
+ # If set to True the unwinder will be enabled.
+ # gdb or code may change this value.
+ self.enabled = <True|False>

def __call__(pending_frame):
if not <we recognize frame>:
--
2.25.1