add NimFrameFilter to nim-gdb.py (#10873)
This commit is contained in:
parent
bc29094af9
commit
04f901b63b
1 changed files with 16 additions and 0 deletions
|
|
@ -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()}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue