solenv/gdb/libreoffice/sw.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ea858ca92488309789e83666681a358af1d9f6f6
Author:     Julien Nabet <[email protected]>
AuthorDate: Thu Jun 15 12:22:57 2023 +0200
Commit:     Julien Nabet <[email protected]>
CommitDate: Thu Jun 15 17:12:50 2023 +0200

    gdb: BigPtrArrayPrinter, add the suffix, so 0->0ul
    
    On pc Debian testing with GNU gdb (Debian 13.2-1) 13.2, I got this trying 
to debug tdf#131173
    
    Thread 1 "soffice.bin" hit Breakpoint 1, SwUndoTableMerge::UndoImpl 
(this=0x5599a0d302b0, rContext=...) at sw/source/core/undo/untbl.cxx:1878
    1878            SwStartNode* pSttNd = rDoc.GetNodes().MakeTextSection( 
aIdx.GetNode(),
    (gdb) p rDoc.GetNodes()
    $1 = (SwNodes &) @0x5599a0477000: {<BigPtrArray> = BigPtrArray of length 
18Python Exception <class 'gdb.error'>: No type named std::_Head_base<0, 
BlockInfo**, false>.
    , m_vIndices = 0x5599a04a4478, m_rMyDoc = @0x5599a0479590, m_pEndOfPostIts 
= 0x5599a04739b0, m_pEndOfInserts = 0x5599a042da70,
      m_pEndOfAutotext = 0x5599a04764b0, m_pEndOfRedlines = 0x5599a04765e0, 
m_pEndOfContent = std::unique_ptr<SwNode> = {get() = 0x5599a0478d20},
      m_aOutlineNodes = {<o3tl::sorted_vector<SwNode*, CompareSwOutlineNodes, 
o3tl::find_unique, true>> = {m_vector = std::__debug::vector of length 0, 
capacity 0}, static npos = 18446744073709551615},
      m_bInNodesDel = false, m_bInDelUpdOutline = false}
    
    with the patch, I got:
    (gdb) p rDoc.GetNodes()
    $1 = (SwNodes &) @0x55c379492b10: {<BigPtrArray> = BigPtrArray of length 18 
= {
    [   0] 0x55c37948c9a0            StartNode ,
    [   1] 0x55c3794859a0              EndNode ,
    [   2] 0x55c379492bb0            StartNode ,
    [   3] 0x55c37948a6c0              EndNode ,
    [   4] 0x55c3794925a0            StartNode ,
    [   5] 0x55c37948ff10              EndNode ,
    [   6] 0x55c379492630            StartNode ,
    [   7] 0x55c379490040              EndNode ,
    [   8] 0x55c3794926c0            StartNode ,
    [   9]  0x55c3795bd170           TableNode ,
    [  10]   0x55c379606280          StartNode ,
    [  11]    0x55c379616ee8          TextNode "",
    [  12]   0x55c37960cd70            EndNode ,
    [  13]  0x55c379612780             EndNode ,
    [  14]  0x55c3794b6628            TextNode "",
    [  15]  0x55c37962d848            TextNode "",
    [  16]  0x55c379616778            TextNode "",
    [  17] 0x55c37948fd20              EndNode }, m_vIndices = 0x55c3794bda68, 
m_rMyDoc = @0x55c379492f80, m_pEndOfPostIts = 0x55c3794859a0, m_pEndOfInserts = 
0x55c37948a6c0, m_pEndOfAutotext = 0x55c37948ff10,
      m_pEndOfRedlines = 0x55c379490040, m_pEndOfContent = 
std::unique_ptr<SwNode> = {get() = 0x55c37948fd20}, m_aOutlineNodes = 
{<o3tl::sorted_vector<SwNode*, CompareSwOutlineNodes, o3tl::find_unique, true>> 
= {
          m_vector = std::__debug::vector of length 0, capacity 0}, static npos 
= 18446744073709551615}, m_bInNodesDel = false, m_bInDelUpdOutline = false}
    
    Change-Id: I492b49dd1a554dc95abb0ed97fa99541c8dbd7f7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153111
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <[email protected]>

diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 206eda25fa18..2b5cc7c7278b 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -194,7 +194,7 @@ 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<0, 
BlockInfo**, false>"))['_M_head_impl']
+            self.blocks = 
array['m_ppInf']['_M_t']['_M_t'].cast(gdb.lookup_type("std::_Head_base<0ul, 
BlockInfo**, false>"))['_M_head_impl']
             self.count = array['m_nSize']
             self.pos = 0
             self.block_count = array['m_nBlock']

Reply via email to