Changeset 83084 in vbox for trunk/src/VBox/Debugger
- Timestamp:
- Feb 15, 2020 3:16:11 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 136139
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGPlugInDarwin.cpp
r83083 r83084 548 548 * Process the load commands. 549 549 */ 550 RTUUID Uuid = RTUUID_INITIALIZE_NULL; 550 551 RTDBGSEGMENT aSegs[24]; 551 552 uint32_t cSegs = 0; 552 RTUUID Uuid = RTUUID_INITIALIZE_NULL;553 bool fHasLinkEdit = false; 553 554 uint32_t cLeft = uBuf.Hdr32.ncmds; 554 555 uint32_t cbLeft = uBuf.Hdr32.sizeofcmds; … … 559 560 segment_command_32_t const *pSeg32; 560 561 segment_command_64_t const *pSeg64; 561 section_32_t const *pSect32;562 section_64_t const *pSect64;563 symtab_command_t const *pSymTab;564 562 uuid_command_t const *pUuid; 565 563 } uLCmd; … … 580 578 return VERR_INVALID_NAME; 581 579 if ( !strcmp(uLCmd.pSeg32->segname, "__LINKEDIT") 582 && ! dbgDiggerDarwinIsSegmentPresent(pUVM, uLCmd.pSeg32->vmaddr, uLCmd.pSeg32->vmsize,583 uModAddr, uModAddr + _64M))580 && !(fHasLinkEdit = dbgDiggerDarwinIsSegmentPresent(pUVM, uLCmd.pSeg32->vmaddr, uLCmd.pSeg32->vmsize, 581 uModAddr, uModAddr + _64M))) 584 582 break; /* This usually is discarded or not loaded at all. */ 585 583 if (cSegs >= RT_ELEMENTS(aSegs)) … … 601 599 return VERR_INVALID_NAME; 602 600 if ( !strcmp(uLCmd.pSeg64->segname, "__LINKEDIT") 603 && ! dbgDiggerDarwinIsSegmentPresent(pUVM, uLCmd.pSeg64->vmaddr, uLCmd.pSeg64->vmsize,604 uModAddr, uModAddr + _128M))601 && !(fHasLinkEdit = dbgDiggerDarwinIsSegmentPresent(pUVM, uLCmd.pSeg64->vmaddr, uLCmd.pSeg64->vmsize, 602 uModAddr, uModAddr + _128M))) 605 603 break; /* This usually is discarded or not loaded at all. */ 606 604 if (cSegs >= RT_ELEMENTS(aSegs)) … … 637 635 638 636 if (cbLeft != 0) 637 { 638 LogRel(("OSXDig: uModAddr=%#RX64 - %u bytes of command left over!\n", uModAddr, cbLeft)); 639 639 return VERR_BAD_EXE_FORMAT; 640 } 640 641 641 642 /* … … 657 658 RTDBGMOD hMod; 658 659 rc = RTDbgModCreateFromMachOImage(&hMod, pszName, NULL, f64Bit ? RTLDRARCH_AMD64 : RTLDRARCH_X86_32, 0 /*cbImage*/, 659 cSegs, aSegs, &Uuid, DBGFR3AsGetConfig(pUVM), RTDBGMOD_F_NOT_DEFERRED); 660 cSegs, aSegs, &Uuid, DBGFR3AsGetConfig(pUVM), 661 RTDBGMOD_F_NOT_DEFERRED | (fHasLinkEdit ? RTDBGMOD_F_MACHO_LOAD_LINKEDIT : 0)); 660 662 661 663 if (RT_FAILURE(rc))
Note:
See TracChangeset
for help on using the changeset viewer.