[Lldb-commits] [PATCH] D155221: [lldb] Support compressed CTF
    Jason Molenda via Phabricator via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Thu Jul 13 13:07:19 PDT 2023
    
    
  
jasonmolenda accepted this revision.
jasonmolenda added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp:151
+                                                  sizeof(ctf_header_t));
+    zstr.avail_in = m_data.GetByteSize();
+    zstr.next_out =
----------------
Should this be `m_data.GetByteSize() - sizeof(ctf_header_t)` ? `m_data` is a compressed `ctf_header_t` plus a compressed data payload?
================
Comment at: lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp:183
+
+    m_data = DataExtractor(decompressed_data, m_data.GetByteOrder(),
+                           m_data.GetAddressByteSize());
----------------
Do you need to copy the `ctf_header_t` from `m_data` into the `decompressed_data` buffer, then decompressing the compressed data, to get header + data in `m_data`?   Oh wait, I see, after you've copied the header into your `ctf_header` local, you don't need it any longer in `m_data` and `m_body_offset` either points to the end of the header (uncompressed CTF) or it points to the start of `m_data` which doesn't include the header.  ok.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155221/new/
https://reviews.llvm.org/D155221
    
    
More information about the lldb-commits
mailing list