summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-07-20 16:48:11 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-07-20 17:25:15 +0200
commit81d2dd00391dbc8a040e5c1f3059121863269d2c (patch)
treec55482230fc275cf53d8628f5071fccedbdf52fb /solenv
parent0a31b57050b7f73e51d344a413f0171a8f6a2afd (diff)
gdb: add SwIndex pretty-printer
Change-Id: I452038a80f9a091f2b7af36d236cebd5f176b5e9
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gdb/libreoffice/sw.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 7ea6a664cc6e..941f56dd3eb9 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -50,6 +50,17 @@ class SwNodeIndexPrinter(object):
node = self.value['pNd'].dereference();
return "%s (node %d)" % (self.typename, node['nOffset'])
+class SwIndexPrinter(object):
+ '''Prints SwIndex.'''
+
+ def __init__(self, typename, value):
+ self.typename = typename
+ self.value = value
+
+ def to_string(self):
+ offset = self.value['m_nIndex']
+ return "%s (offset %d)" % (self.typename, offset)
+
class SwPaMPrinter(object):
'''Prints SwPaM.'''
@@ -200,6 +211,7 @@ def build_pretty_printers():
printer.add('BigPtrArray', BigPtrArrayPrinter)
printer.add('SwPosition', SwPositionPrinter)
printer.add('SwNodeIndex', SwNodeIndexPrinter)
+ printer.add('SwIndex', SwIndexPrinter)
printer.add('SwPaM', SwPaMPrinter)
printer.add('SwRect', SwRectPrinter)