DavidSpickett added a comment. Some random comments.
Also agree that a test for what happens when there is no header found would be good. ================ Comment at: lldb/test/API/macosx/unregistered-macho/TestUnregisteredMacho.py:21 + self.build() + (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( + self, "// break here", lldb.SBFileSpec("main.c")) ---------------- You can drop the `()` around the variable names. ================ Comment at: lldb/test/API/macosx/unregistered-macho/main.c:21 + mh.ncmds = 2; + mh.sizeofcmds = size_of_mh_and_cmds; + mh.flags = MH_NOUNDEFS | MH_DYLDLINK | MH_TWOLEVEL | MH_PIE; ---------------- It seems like this should be the size of the commands only, not including the header. Though I can't find documentation for it so maybe this is just an unfortunate name. ================ Comment at: lldb/test/API/macosx/unregistered-macho/main.c:33 + seg.vmsize = 0x1000; + seg.fileoff = 0; + seg.filesize = 0; ---------------- Does this need to be `sizeof (struct mach_header_64)`? Probably doesn't and/or it doesn't matter for this test. ================ Comment at: lldb/test/API/macosx/unregistered-macho/main.c:52 + + // If this needs to be debugged, the memory buffer can be written + // to a file with ---------------- No comment here other than I always like to see this kind of info in a test! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128956/new/ https://reviews.llvm.org/D128956 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits