[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - solenv/gdb
Michael Stahl
mstahl at redhat.com
Thu Aug 21 07:52:56 PDT 2014
solenv/gdb/libreoffice/sw.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 1a3dc6f8051060588eb242e377efc5c67e51bf67
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Aug 19 15:48:31 2014 +0200
gdb: print the SwNodeIndex properly if there are multiple blocks
Change-Id: I178d365e71ef3377b1a2cfc115bb297640161efe
(cherry picked from commit 4f211a0d0c4ef0c248fd3d4493994c1a122c2eb9)
Reviewed-on: https://gerrit.libreoffice.org/11045
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 515718e..97cba13 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -19,8 +19,10 @@ class SwPositionPrinter(object):
def to_string(self):
node = self.value['nNode']['pNd'].dereference();
+ block = node['pBlock'].dereference();
+ nodeindex = block['nStart'] + node['nOffset']
offset = self.value['nContent']['m_nIndex']
- return "%s (node %d, offset %d)" % (self.typename, node['nOffset'], offset)
+ return "%s (node %d, offset %d)" % (self.typename, nodeindex, offset)
class SwNodeIndexPrinter(object):
'''Prints SwNodeIndex.'''
@@ -31,7 +33,9 @@ class SwNodeIndexPrinter(object):
def to_string(self):
node = self.value['pNd'].dereference();
- return "%s (node %d)" % (self.typename, node['nOffset'])
+ block = node['pBlock'].dereference();
+ nodeindex = block['nStart'] + node['nOffset']
+ return "%s (node %d)" % (self.typename, nodeindex)
class SwIndexPrinter(object):
'''Prints SwIndex.'''
More information about the Libreoffice-commits
mailing list