[PATCH] D20885: [COFF] Expose the PE debug data directory and dump it

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 1 16:52:01 PDT 2016


rnk added inline comments.

================
Comment at: lib/Object/COFFObjectFile.cpp:462
@@ +461,3 @@
+    uint32_t SectionStart = Section->VirtualAddress;
+    uint32_t SectionEnd = Section->VirtualAddress + Section->VirtualSize;
+    if (SectionStart <= RVA && RVA + Size <= SectionEnd) {
----------------
majnemer wrote:
> What about overflow? I reckon we should return an error if SectionEnd < SectionStart.
I tried to tighten this up. PTAL

================
Comment at: tools/llvm-readobj/COFFDumper.cpp:691-692
@@ +690,4 @@
+    } else {
+      // FIXME: Types of 0xC and 0xD are commonly observed but are not in the
+      // documented type enum.  Figure out what they mean.
+      ArrayRef<uint8_t> RawData;
----------------
majnemer wrote:
> Really, 12 and 13?
Sure. The enum is defined in decimal, but printEnum prints in hex, so I'm not sure which is more obvious.


http://reviews.llvm.org/D20885





More information about the llvm-commits mailing list