Add frame work for additional dwarf sections. Comments will improve as code
authorJim Laskey <jlaskey@mac.com>
Tue, 17 Jan 2006 20:41:40 +0000 (20:41 +0000)
committerJim Laskey <jlaskey@mac.com>
Tue, 17 Jan 2006 20:41:40 +0000 (20:41 +0000)
is added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25410 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/DwarfWriter.h
lib/CodeGen/DwarfWriter.cpp
lib/Target/PowerPC/PPCAsmPrinter.cpp

index 78b024c38bfdc36870b4915b0a60b4100b7b31b0..2745f69cc8a193f17b3bb6643edb1fe90292b297 100644 (file)
@@ -744,6 +744,38 @@ namespace llvm {
     ///
     const char *DwarfLineSection; /// Defaults to ".debug_line".
     
+    /// DwarfFrameSection - Section directive for Dwarf info.
+    ///
+    const char *DwarfFrameSection; /// Defaults to ".debug_frame".
+    
+    /// DwarfPubNamesSection - Section directive for Dwarf info.
+    ///
+    const char *DwarfPubNamesSection; /// Defaults to ".debug_pubnames".
+    
+    /// DwarfPubTypesSection - Section directive for Dwarf info.
+    ///
+    const char *DwarfPubTypesSection; /// Defaults to ".debug_pubtypes".
+    
+    /// DwarfStrSection - Section directive for Dwarf info.
+    ///
+    const char *DwarfStrSection; /// Defaults to ".debug_str".
+
+    /// DwarfLocSection - Section directive for Dwarf info.
+    ///
+    const char *DwarfLocSection; /// Defaults to ".debug_loc".
+
+    /// DwarfARangesSection - Section directive for Dwarf info.
+    ///
+    const char *DwarfARangesSection; /// Defaults to ".debug_aranges".
+
+    /// DwarfRangesSection - Section directive for Dwarf info.
+    ///
+    const char *DwarfRangesSection; /// Defaults to ".debug_ranges".
+
+    /// DwarfMacInfoSection - Section directive for Dwarf info.
+    ///
+    const char *DwarfMacInfoSection; /// Defaults to ".debug_macinfo".
+
     /// TextSection - Section directive for standard text.
     ///
     const char *TextSection; /// Defaults to ".text".
@@ -877,6 +909,38 @@ private:
     ///
     void EmitDebugLines() const;
 
+    /// EmitDebugFrame - Emit info into a debug frame section.
+    ///
+    void DwarfWriter::EmitDebugFrame();
+    
+    /// EmitDebugPubNames - Emit info into a debug pubnames section.
+    ///
+    void DwarfWriter::EmitDebugPubNames();
+    
+    /// EmitDebugPubTypes - Emit info into a debug pubtypes section.
+    ///
+    void DwarfWriter::EmitDebugPubTypes();
+    
+    /// EmitDebugStr - Emit info into a debug str section.
+    ///
+    void DwarfWriter::EmitDebugStr();
+    
+    /// EmitDebugLoc - Emit info into a debug loc section.
+    ///
+    void DwarfWriter::EmitDebugLoc();
+    
+    /// EmitDebugARanges - Emit info into a debug aranges section.
+    ///
+    void DwarfWriter::EmitDebugARanges();
+    
+    /// EmitDebugRanges - Emit info into a debug ranges section.
+    ///
+    void DwarfWriter::EmitDebugRanges();
+    
+    /// EmitDebugMacInfo - Emit info into a debug macinfo section.
+    ///
+    void DwarfWriter::EmitDebugMacInfo();
+    
     /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made.
     /// When called it also checks to see if debug info is newly available.  if
     /// so the initial Dwarf headers are emitted.
index 67a6464e1644ca39202f658a8f2da860a00db81c..65b83bfedf60866d2f941c9ee1be295a4427e1ad 100644 (file)
@@ -1293,6 +1293,46 @@ void DwarfWriter::EmitDebugLines() const {
   
   EmitLabel("line_end", 0);
 }
+  
+/// EmitDebugFrame - Emit visible names into a debug frame section.
+///
+void DwarfWriter::EmitDebugFrame() {
+}
+
+/// EmitDebugPubNames - Emit visible names into a debug pubnames section.
+///
+void DwarfWriter::EmitDebugPubNames() {
+}
+
+/// EmitDebugPubTypes - Emit visible names into a debug pubtypes section.
+///
+void DwarfWriter::EmitDebugPubTypes() {
+}
+
+/// EmitDebugStr - Emit visible names into a debug str section.
+///
+void DwarfWriter::EmitDebugStr() {
+}
+
+/// EmitDebugLoc - Emit visible names into a debug loc section.
+///
+void DwarfWriter::EmitDebugLoc() {
+}
+
+/// EmitDebugARanges - Emit visible names into a debug aranges section.
+///
+void DwarfWriter::EmitDebugARanges() {
+}
+
+/// EmitDebugRanges - Emit visible names into a debug ranges section.
+///
+void DwarfWriter::EmitDebugRanges() {
+}
+
+/// EmitDebugMacInfo - Emit visible names into a debug macinfo section.
+///
+void DwarfWriter::EmitDebugMacInfo() {
+}
 
 /// ShouldEmitDwarf - Determine if Dwarf declarations should be made.
 ///
@@ -1329,6 +1369,14 @@ bool DwarfWriter::ShouldEmitDwarf() {
   , DwarfAbbrevSection(".debug_abbrev")
   , DwarfInfoSection(".debug_info")
   , DwarfLineSection(".debug_line")
+  , DwarfFrameSection(".debug_frame")
+  , DwarfPubNamesSection(".debug_pubnames")
+  , DwarfPubTypesSection(".debug_pubtypes")
+  , DwarfStrSection(".debug_str")
+  , DwarfLocSection(".debug_loc")
+  , DwarfARangesSection(".debug_aranges")
+  , DwarfRangesSection(".debug_ranges")
+  , DwarfMacInfoSection(".debug_macinfo")
   , TextSection(".text")
   , DataSection(".data")
   {}
@@ -1377,6 +1425,30 @@ void DwarfWriter::EndModule() {
   
   // Emit source line correspondence into a debug line section.
   EmitDebugLines();
+  
+  // Emit info into a debug frame section.
+  EmitDebugFrame();
+  
+  // Emit info into a debug pubnames section.
+  EmitDebugPubNames();
+  
+  // Emit info into a debug pubtypes section.
+  EmitDebugPubTypes();
+  
+  // Emit info into a debug str section.
+  EmitDebugStr();
+  
+  // Emit info into a debug loc section.
+  EmitDebugLoc();
+  
+  // Emit info into a debug aranges section.
+  EmitDebugARanges();
+  
+  // Emit info into a debug ranges section.
+  EmitDebugRanges();
+  
+  // Emit info into a debug macinfo section.
+  EmitDebugMacInfo();
 }
 
 /// BeginFunction - Emit pre-function debug information.
index 55f54c4bae5be713cee6b2356315eb1f60db2d5b..c1285ae207ca4fd52e8c441412449374946c119e 100644 (file)
@@ -215,9 +215,17 @@ namespace {
     : DwarfWriter(o, ap)
     {
       needsSet = true;
-      DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
-      DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
-      DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
+      DwarfAbbrevSection = ".section __DWARFA,__debug_abbrev,regular,debug";
+      DwarfInfoSection = ".section __DWARFA,__debug_info,regular,debug";
+      DwarfLineSection = ".section __DWARFA,__debug_line,regular,debug";
+      DwarfFrameSection = ".section __DWARFA,__debug_frame,regular,debug";
+      DwarfPubNamesSection = ".section __DWARFA,__debug_pubnames,regular,debug";
+      DwarfPubTypesSection = ".section __DWARFA,__debug_pubtypes,regular,debug";
+      DwarfStrSection = ".section __DWARFA,__debug_str,regular,debug";
+      DwarfLocSection = ".section __DWARFA,__debug_loc,regular,debug";
+      DwarfARangesSection = ".section __DWARFA,__debug_aranges,regular,debug";
+      DwarfRangesSection = ".section __DWARFA,__debug_ranges,regular,debug";
+      DwarfMacInfoSection = ".section __DWARFA,__debug_macinfo,regular,debug";
       TextSection = ".text";
       DataSection = ".data";
     }