summaryrefslogtreecommitdiffstats
path: root/src/PEImage.cpp
diff options
context:
space:
mode:
authorAlex Budovski <alexbud@meta.com>2023-03-23 00:55:11 (GMT)
committerAlex Budovski <alexbud@meta.com>2023-03-24 14:49:51 (GMT)
commit9cd6183c5ecf823517ef6640831b635bfd3f888e (patch)
tree2057dac59c6ed2cafdce5222691510793c9f4756 /src/PEImage.cpp
parentd9b51b76e965fbc121b3c5e22fdd240039219670 (diff)
downloadcv2pdb-9cd6183c5ecf823517ef6640831b635bfd3f888e.zip
cv2pdb-9cd6183c5ecf823517ef6640831b635bfd3f888e.tar.gz
cv2pdb-9cd6183c5ecf823517ef6640831b635bfd3f888e.tar.bz2
Add comments to various files
This is just a preparatory change to improve the documentation in the code. No functional changes.
Diffstat (limited to 'src/PEImage.cpp')
-rw-r--r--src/PEImage.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/PEImage.cpp b/src/PEImage.cpp
index 247d514..4b39a3f 100644
--- a/src/PEImage.cpp
+++ b/src/PEImage.cpp
@@ -375,6 +375,7 @@ bool PEImage::_initFromCVDebugDir(IMAGE_DEBUG_DIRECTORY* ddir)
}
///////////////////////////////////////////////////////////////////////
+// Used for PE (EXE/DLL) files.
bool PEImage::initDWARFPtr(bool initDbgDir)
{
dos = DPV<IMAGE_DOS_HEADER> (0);
@@ -410,6 +411,7 @@ bool PEImage::initDWARFPtr(bool initDbgDir)
return true;
}
+// Used for COFF objects.
bool PEImage::initDWARFObject()
{
IMAGE_FILE_HEADER* hdr = DPV<IMAGE_FILE_HEADER> (0);
@@ -466,8 +468,11 @@ void PEImage::initSec(PESection& peSec, int secNo) const
peSec.secNo = secNo;
}
+// Initialize all the DWARF sections present in this PE or COFF file.
+// Common to both object and image modules.
void PEImage::initDWARFSegments()
{
+ // Scan all the PE sections in this image.
for(int s = 0; s < nsec; s++)
{
const char* name = (const char*) sec[s].Name;
@@ -477,6 +482,7 @@ void PEImage::initDWARFSegments()
name = strtable + off;
}
+ // Is 'name' one of the DWARF sections?
for (const SectionDescriptor *sec_desc : sec_descriptors) {
if (!strcmp(name, sec_desc->name)) {
PESection& peSec = this->*(sec_desc->pSec);