diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-07-20 16:41:25 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-07-20 17:25:14 +0200 |
commit | 0a31b57050b7f73e51d344a413f0171a8f6a2afd (patch) | |
tree | 8d253c3e744531766dc067b4a5e4502af5943d32 /solenv/gdb | |
parent | 6ee666c53da83982784ea59894479a8b93c8ecd7 (diff) |
gdb: add SwNodeIndex pretty-printer
Change-Id: I6d233c2cf715021262a5de1bdc76f68b7eb17db3
Diffstat (limited to 'solenv/gdb')
-rw-r--r-- | solenv/gdb/libreoffice/sw.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py index 581169d24ad0..7ea6a664cc6e 100644 --- a/solenv/gdb/libreoffice/sw.py +++ b/solenv/gdb/libreoffice/sw.py @@ -39,6 +39,17 @@ class SwPositionPrinter(object): offset = self.value['nContent']['m_nIndex'] return "%s (node %d, offset %d)" % (self.typename, node['nOffset'], offset) +class SwNodeIndexPrinter(object): + '''Prints SwNodeIndex.''' + + def __init__(self, typename, value): + self.typename = typename + self.value = value + + def to_string(self): + node = self.value['pNd'].dereference(); + return "%s (node %d)" % (self.typename, node['nOffset']) + class SwPaMPrinter(object): '''Prints SwPaM.''' @@ -188,6 +199,7 @@ def build_pretty_printers(): printer = printing.Printer("libreoffice/sw") printer.add('BigPtrArray', BigPtrArrayPrinter) printer.add('SwPosition', SwPositionPrinter) + printer.add('SwNodeIndex', SwNodeIndexPrinter) printer.add('SwPaM', SwPaMPrinter) printer.add('SwRect', SwRectPrinter) |