summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--solenv/gdb/libreoffice/sw.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 2b5cc7c7278b..50d0f2221f2e 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -194,7 +194,12 @@ class BigPtrArrayPrinter(object):
# libstdc++ unique_ptr is a std::tuple which contains multiple
# _M_head_impl members and gdb may pick the wrong one by default
# so have to manually cast it to the one that contains the array
- self.blocks = array['m_ppInf']['_M_t']['_M_t'].cast(gdb.lookup_type("std::_Head_base<0ul, BlockInfo**, false>"))['_M_head_impl']
+ try:
+ # supposedly works on Debian gdb 13.2
+ self.blocks = array['m_ppInf']['_M_t']['_M_t'].cast(gdb.lookup_type("std::_Head_base<0ul, BlockInfo**, false>"))['_M_head_impl']
+ except gdb.error:
+ # works on Fedora gdb 13.2
+ self.blocks = array['m_ppInf']['_M_t']['_M_t'].cast(gdb.lookup_type("std::_Head_base<0, BlockInfo**, false>"))['_M_head_impl']
self.count = array['m_nSize']
self.pos = 0
self.block_count = array['m_nBlock']