summaryrefslogtreecommitdiffstats
path: root/src/readDwarf.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/readDwarf.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/readDwarf.cpp')
-rw-r--r--src/readDwarf.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/readDwarf.cpp b/src/readDwarf.cpp
index b77a1d0..1058c60 100644
--- a/src/readDwarf.cpp
+++ b/src/readDwarf.cpp
@@ -34,6 +34,11 @@ void DIECursor::setContext(PEImage* img_, DebugLevel debug_)
debug = debug_;
}
+// Read one compilation unit from `img`'s .debug_info section, starting at
+// offset `*off`, updating it in the process to the start of the next one in the
+// section.
+// Returns a pointer to the first DIE, skipping past the CU header, or NULL
+// on failure.
byte* DWARF_CompilationUnitInfo::read(DebugLevel debug, const PEImage& img, unsigned long *off)
{
byte* ptr = img.debug_info.byteAt(*off);