diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-31 15:29:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-01 08:58:01 +0200 |
commit | 739f3bb7228fa8c33029af46093b4646f848814b (patch) | |
tree | fb9872c49a543b4c58a445b907e95bca68288d07 /solenv | |
parent | 019501e6827e176c70480822725f7fc7b6a59de4 (diff) |
improve the SwContentIndex debug pretty printer
Change-Id: I7fa4f25b285c4cf7a62e3aa4616dbbca4e1c1e76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139114
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gdb/libreoffice/sw.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py index e669320fb41a..fc5ff62dad0e 100644 --- a/solenv/gdb/libreoffice/sw.py +++ b/solenv/gdb/libreoffice/sw.py @@ -46,8 +46,14 @@ class SwContentIndexPrinter(object): self.value = value def to_string(self): + pNode = self.value['m_pContentNode'] + nodeindex = 'none' + if pNode: + node = pNode.dereference() + block = node['m_pBlock'].dereference(); + nodeindex = block['nStart'] + node['m_nOffset'] offset = self.value['m_nIndex'] - return "%s (offset %d)" % (self.typename, offset) + return "%s (node %d offset %d)" % (self.typename, nodeindex, offset) class SwPaMPrinter(object): '''Prints SwPaM.''' |