diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-08-19 15:48:31 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-08-20 16:40:07 +0200 |
commit | 4f211a0d0c4ef0c248fd3d4493994c1a122c2eb9 (patch) | |
tree | 51d0618f04bbc0d0b7063a2aa57fb6886f10fcd7 /solenv | |
parent | b3d985230968fe8987023db6353d09d4567be74c (diff) |
gdb: print the SwNodeIndex properly if there are multiple blocks
Change-Id: I178d365e71ef3377b1a2cfc115bb297640161efe
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gdb/libreoffice/sw.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py index 515718e9ae2e..97cba136b937 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.''' |