================ @@ -21,6 +21,24 @@ using namespace lldb; using namespace lldb_private; using namespace llvm::MachO; +/// Read a Mach-O load-command header (cmd + cmdsize) from \p data at ---------------- qiyao wrote:
I had three versions of this PRs. The one I posted here is v3, and v2 is like what you said, cast to `load_command` in the method, and the method has no template. I feel that the template one is better than the cast one, so I use v3 to create PR. I update this PR to add some compile-time check in `ReadMachOCommand<T>` to guarrentee that T must start with `uint32_t cmd` followed by `uint32_t cmdsize`. https://github.com/llvm/llvm-project/pull/205134 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
