[Libreoffice-commits] .: 2 commits - solenv/gdb
Miklos Vajna
vmiklos at kemper.freedesktop.org
Fri Jul 20 08:25:48 PDT 2012
solenv/gdb/libreoffice/sw.py | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
New commits:
commit 81d2dd00391dbc8a040e5c1f3059121863269d2c
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Fri Jul 20 16:48:11 2012 +0200
gdb: add SwIndex pretty-printer
Change-Id: I452038a80f9a091f2b7af36d236cebd5f176b5e9
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 7ea6a66..941f56d 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)
commit 0a31b57050b7f73e51d344a413f0171a8f6a2afd
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Fri Jul 20 16:41:25 2012 +0200
gdb: add SwNodeIndex pretty-printer
Change-Id: I6d233c2cf715021262a5de1bdc76f68b7eb17db3
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 581169d..7ea6a66 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)
More information about the Libreoffice-commits
mailing list