[Lldb-commits] [lldb] [lldb][AIX] Header Parsing for XCOFF Object File in AIX (PR #116338)

Dhruv Srivastava via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 10 03:38:41 PST 2024


================
@@ -98,9 +98,20 @@ class ObjectFileXCOFF : public lldb_private::ObjectFile {
                   const lldb::ProcessSP &process_sp, lldb::addr_t header_addr);
 
 protected:
+  typedef struct llvm::object::XCOFFFileHeader64 xcoff_header_t;
+
+  typedef struct llvm::object::XCOFFAuxiliaryHeader64 xcoff_aux_header_t;
+
   static lldb::WritableDataBufferSP
   MapFileDataWritable(const lldb_private::FileSpec &file, uint64_t Size,
                       uint64_t Offset);
+
+private:
+  bool CreateBinary();
+
+  xcoff_header_t m_xcoff_header = {};
+  xcoff_aux_header_t m_xcoff_aux_header = {};
----------------
DhruvSrivastavaX wrote:

The reason to keep these is for the ease of access and avoid calling the functions like `(file|auxiliary)Header(32|64)` functions repetitively whenever the values are required in different functions. 

https://github.com/llvm/llvm-project/pull/116338


More information about the lldb-commits mailing list