[llvm] [llvm-objdump][macho] Add support for ObjC relative method lists (PR #84250)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 11:31:11 PDT 2024
================
@@ -4440,8 +4473,103 @@ static void print_layout_map32(uint32_t p, struct DisassembleInfo *info) {
print_layout_map(layout_map, left);
}
+// Return true if this is a delta method list, false otherwise
+static bool print_method_list_delta_t(uint64_t p, struct DisassembleInfo *info,
+ const char *indent,
+ uint32_t pointerBits) {
+ struct method_list_delta_t ml;
+ struct method_delta_t m;
+ const char *r, *name;
+ uint32_t offset, xoffset, left, i;
+ SectionRef S, xS;
+
+ r = get_pointer_32(p, offset, left, S, info);
+ if (r == nullptr)
+ return false;
+ memset(&ml, '\0', sizeof(struct method_list_delta_t));
+ if (left < sizeof(struct method_list_delta_t)) {
+ memcpy(&ml, r, left);
+ outs() << " (method_delta_t entends past the end of the section)\n";
----------------
alx32 wrote:
This is a tricky one. It is indeed a typo but in order to be align with the other typo's in the code - including xcode's llvm-objdump, I decided to keep the typo. See the rest of the typo's in the file, also in [apple's objdump](https://opensource.apple.com/source/cctools/cctools-877.5/otool/print_objc2_64bit.c.auto.html).
Should we stand out by fixing the typo in this case ?
https://github.com/llvm/llvm-project/pull/84250
More information about the llvm-commits
mailing list