mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
add NimFrameFilter to nim-gdb.py (#10873)
This commit is contained in:
committed by
Andreas Rumpf
parent
bc29094af9
commit
04f901b63b
@@ -561,6 +561,20 @@ class NimTablePrinter:
|
||||
# raise ValueError("RTI is absent or incomplete, can't find union definition in RTI")
|
||||
|
||||
|
||||
################################################################################
|
||||
|
||||
class NimFrameFilter:
|
||||
def __init__(self):
|
||||
self.name = "nim-frame-filter"
|
||||
self.enabled = True
|
||||
self.priority = 100
|
||||
self.hidden = {"NimMainInner","NimMain", "main"}
|
||||
|
||||
def filter(self, iterator):
|
||||
for framedecorator in iterator:
|
||||
if framedecorator.function() not in self.hidden:
|
||||
yield framedecorator
|
||||
|
||||
################################################################################
|
||||
|
||||
def makematcher(klass):
|
||||
@@ -593,3 +607,5 @@ def new_object_handler(event):
|
||||
register_nim_pretty_printers_for_object(event.new_objfile)
|
||||
|
||||
gdb.events.new_objfile.connect(new_object_handler)
|
||||
|
||||
gdb.frame_filters = {"nim-frame-filter": NimFrameFilter()}
|
||||
|
||||
Reference in New Issue
Block a user