[PATCH] Emit DWARF info for all code section in an assembly file

Eric Christopher echristo at gmail.com
Mon Apr 14 15:53:42 PDT 2014


  Looks pretty good. I'd split the DwarfVersion out of this commit and go ahead and put that in separately.

  The rest of the patch looks good outside of the comments and the discussion about address base that is going on.

  Thanks for all of the work!


================
Comment at: lib/MC/MCContext.cpp:32
@@ -31,2 +31,3 @@
 
+
 typedef std::pair<std::string, std::string> SectionGroupPair;
----------------
Extraneous whitespace addition.

================
Comment at: lib/MC/MCContext.cpp:365
@@ -363,1 +364,3 @@
 
+void MCContext::finalizeDwarfSections(MCStreamer &MCOS) {
+  MCContext &context = MCOS.getContext();
----------------
Comment what's going on in the function.

================
Comment at: lib/MC/MCContext.cpp:368
@@ +367,3 @@
+
+  MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *> >::iterator
+    sec = SectionStartEndSyms.begin();
----------------
auto?

================
Comment at: lib/MC/MCDwarf.cpp:656
@@ -649,1 +655,3 @@
+  // The 2 byte DWARF version.
+  MCOS->EmitIntValue(context.getDwarfVersion(), 2);
 
----------------
This can go in separately yes?

================
Comment at: lib/MC/MCParser/ELFAsmParser.cpp:552
@@ +551,3 @@
+
+  if (getContext().getGenDwarfForAssembly()) {
+    auto &Sections = getContext().getGenDwarfSectionSyms();
----------------
Think this can probably go in separately along with the refactor you've done for the section handling. If it doesn't make sense don't worry about it.


http://reviews.llvm.org/D2697






More information about the llvm-commits mailing list