Lines Matching defs:cbImage

232     uint32_t            cbImage;
312 uint32_t offNextMap = i + 1 < pThis->cMappings ? pThis->aMappings[i + 1].offFile : pThis->cbImage;
399 * @param cbImage The image size reported by NT.
404 * cbImage and virtual range of the section tables.
409 * a page aligned cbImage.
411 static bool dbgDiggerWinNtCheckSectHdrsAndImgSize(PCIMAGE_SECTION_HEADER paShs, uint32_t cShs, uint32_t cbImage,
414 *pcbImageCorrect = cbImage;
446 if ( cbImage < uRvaEnd
448 cbImage = RT_ALIGN(uRvaEnd, cbSectAlign);
451 if (uRvaEnd > cbImage)
453 Log(("DigWinNt: Section header #%u has a virtual address range beyond the image: %#x TO %#x cbImage=%#x\n",
454 i, paShs[i].VirtualAddress, uRvaEnd, cbImage));
459 Assert(*pcbImageCorrect == cbImage || !(*pcbImageCorrect & 0xfff));
460 *pcbImageCorrect = cbImage;
469 uint32_t cbImage, uint8_t *pbBuf, size_t cbBuf,
483 pRdr->cbImage = cbImage;
484 pRdr->cbCorrectImageSize = cbImage;
501 if ( offShs + cbShs <= RT_MIN(cbImage, cbBuf)
502 && dbgDiggerWinNtCheckSectHdrsAndImgSize(paShs, cShs, cbImage, uRvaRsrc,
528 pRdr->cbImage = paShs[i].PointerToRawData + paShs[i].SizeOfRawData;
535 pRdr->aMappings[0].cbMem = pRdr->cMappings ? pRdr->aMappings[1].offFile : pRdr->cbImage;
553 pRdr->aMappings[0].cbMem = pRdr->cbImage;
557 if (pRdr->cbCorrectImageSize != cbImage)
559 Log(("DigWinNT: The image is really %#x bytes long, not %#x as mapped by NT!\n", pRdr->cbCorrectImageSize, cbImage));
570 int rc = RTLdrOpenInMemory(pszName, RTLDR_O_FOR_DEBUG, RTLDRARCH_WHATEVER, pRdr->cbImage,
588 * @param cbImage The size of the image.
590 * RT_MIN(cbBuf, cbImage) bytes of the image.
594 PCDBGFADDRESS pImageAddr, uint32_t cbImage,
597 LogFlow(("DigWinNt: %RGp %#x %s\n", pImageAddr->FlatPtr, cbImage, pszName));
604 if ( cbImage < sizeof(IMAGE_NT_HEADERS64)
605 || cbImage >= _1M * 256)
607 Log(("DigWinNt: %s: Bad image size: %#x\n", pszName, cbImage));
620 else if ( pMzHdr->e_lfanew >= cbImage
622 || pMzHdr->e_lfanew + sizeof(IMAGE_NT_HEADERS64) > cbImage)
624 Log(("DigWinNt: %s: PE header to far into image: %#x cbImage=%#x\n", pMzHdr->e_lfanew, cbImage));
670 if (RT_ALIGN(cbImageFromHdr, _4K) != RT_ALIGN(cbImage, _4K))
672 Log(("DigWinNt: %s: Invalid OH.SizeOfImage: %#x, expected %#x\n", pszName, cbImageFromHdr, cbImage));
686 int rc = dbgDiggerWinNtCreateLdrMod(pThis, pUVM, pszName, pImageAddr, cbImage, pbBuf, cbBuf, offHdrs, pHdrs,
699 rc = RTDbgModCreate(&hMod, pszName, cbImage, 0);
703 rc = RTDbgModSymbolAdd(hMod, "Headers", 0 /*iSeg*/, 0, cbImage, 0 /*fFlags*/, NULL);