From: David Malcolm Date: Fri, 7 Nov 2025 21:21:11 +0000 (-0500) Subject: gdbhooks.py: add printers for analyzer types (supernode and exploded_node) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90a7e657ba3f922eae90d7f5497e3bf22b9520ab;p=thirdparty%2Fgcc.git gdbhooks.py: add printers for analyzer types (supernode and exploded_node) Tested by hand; this leads to output like this: (gdb) p m_enode_for_diag $1 = (gdb) p m_enode_for_diag->get_supernode () $2 = gcc/ChangeLog: * gdbhooks.py (class AnaSupernodePrinter): New. (class AnaExplodedNodePrinter): New. (build_pretty_printer): Register the above. Signed-off-by: David Malcolm --- diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py index 4735d590e4d..a58181002fd 100644 --- a/gcc/gdbhooks.py +++ b/gcc/gdbhooks.py @@ -388,6 +388,32 @@ class CfgEdgePrinter: result += '>' return result +###################################################################### +# Pretty-printers for -fanalyzer (namespace ana) +###################################################################### + +class AnaSupernodePrinter: + def __init__(self, gdbval): + self.gdbval = gdbval + + def to_string (self): + result = '::node_t *'], + 'ana::exploded_node', + AnaExplodedNodePrinter) pp.add_printer_for_types(['edge', 'edge_def *'], 'edge', CfgEdgePrinter)