From 53afce203bb1ab0e9a9676d3278b190dd11ebb6a Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Wed, 10 Dec 2014 23:16:42 +0000 Subject: [PATCH] gdbhooks.py (class DWDieRefPrinter): New class. * gdbhooks.py (class DWDieRefPrinter): New class. (build_pretty_printer): Register dw_die_ref's. From-SVN: r218612 --- gcc/ChangeLog | 5 +++++ gcc/gdbhooks.py | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b7021a051ae..dfff862a822 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-10 Aldy Hernandez + + * gdbhooks.py (class DWDieRefPrinter): New class. + (build_pretty_printer): Register dw_die_ref's. + 2014-12-10 Ilya Tocar * config.gcc: Support "knl". diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py index a74e712c1e1..6d9e41e611b 100644 --- a/gcc/gdbhooks.py +++ b/gcc/gdbhooks.py @@ -252,6 +252,26 @@ class CGraphNodePrinter: result += '>' return result +###################################################################### +# Dwarf DIE pretty-printers +###################################################################### + +class DWDieRefPrinter: + def __init__(self, gdbval): + self.gdbval = gdbval + + def to_string (self): + if long(self.gdbval) == 0: + return '' + result = '