diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-07-17 14:16:24 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-07-17 16:39:16 +0200 |
commit | 2c524ab87e336418c3ee7370f76284a53dff1c82 (patch) | |
tree | d0a265f8526d8f5e36cb99c6ed65bd5c98b1782d | |
parent | 0821457cdb6476b2b1860c8aeda718b130ab808e (diff) |
solenv: gdb: BigPtrArrayPrinter, try both 0 and 0ul
Apparently commit ea858ca92488309789e83666681a358af1d9f6f6 broke it on
Fedora 38, where i now get:
gdb.error: No type named std::_Head_base<0ul, BlockInfo**, false>.
So try both variants.
Change-Id: If344077df7a6b329286bc1296446562301305946
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154525
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | solenv/gdb/libreoffice/sw.py | 7 |
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'] |