[llvm-commits] [llvm] r77889 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h include/llvm/Target/TargetLoweringObjectFile.h lib/CodeGen/AsmPrinter/DwarfDebug.cpp lib/Target/ARM/ARMTargetAsmInfo.cpp lib/Target/COFFTargetAsmInfo.cpp lib/Target/CellSPU/SPUTargetAsmInfo.cpp lib/Target/DarwinTargetAsmInfo.cpp lib/Target/PowerPC/PPCTargetAsmInfo.cpp lib/Target/TargetAsmInfo.cpp lib/Target/TargetLoweringObjectFile.cpp lib/Target/X86/X86TargetAsmInfo.cpp lib/Target/XCore/XCoreTargetAsmInfo.cpp
Chris Lattner
sabre at nondot.org
Sun Aug 2 00:24:23 PDT 2009
Author: lattner
Date: Sun Aug 2 02:24:22 2009
New Revision: 77889
URL: http://llvm.org/viewvc/llvm-project?rev=77889&view=rev
Log:
move dwarf debug info section selection stuff from TAI to
TLOF, unifying all the dwarf targets at the same time.
Modified:
llvm/trunk/include/llvm/Target/TargetAsmInfo.h
llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp
llvm/trunk/lib/Target/COFFTargetAsmInfo.cpp
llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
llvm/trunk/lib/Target/TargetAsmInfo.cpp
llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp
Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Sun Aug 2 02:24:22 2009
@@ -315,58 +315,6 @@
/// DwarfSectionOffsetDirective - Special section offset directive.
const char* DwarfSectionOffsetDirective; // Defaults to NULL
- /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
- ///
- const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
-
- /// DwarfInfoSection - Section directive for Dwarf info.
- ///
- const char *DwarfInfoSection; // Defaults to ".debug_info".
-
- /// DwarfLineSection - Section directive for Dwarf info.
- ///
- 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".
-
- /// DwarfDebugInlineSection - Section directive for inline info.
- ///
- const char *DwarfDebugInlineSection; // Defaults to ".debug_inlined"
-
- /// 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".
-
- /// DwarfMacroInfoSection - Section directive for DWARF macro info.
- ///
- const char *DwarfMacroInfoSection; // Defaults to ".debug_macinfo".
-
- /// DwarfEHFrameSection - Section directive for Exception frames.
- ///
- const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
-
//===--- CBE Asm Translation Table -----------------------------------===//
const char *const *AsmTransCBE; // Defaults to empty
@@ -584,45 +532,6 @@
const char *getDwarfSectionOffsetDirective() const {
return DwarfSectionOffsetDirective;
}
- const char *getDwarfAbbrevSection() const {
- return DwarfAbbrevSection;
- }
- const char *getDwarfInfoSection() const {
- return DwarfInfoSection;
- }
- const char *getDwarfLineSection() const {
- return DwarfLineSection;
- }
- const char *getDwarfFrameSection() const {
- return DwarfFrameSection;
- }
- const char *getDwarfPubNamesSection() const {
- return DwarfPubNamesSection;
- }
- const char *getDwarfPubTypesSection() const {
- return DwarfPubTypesSection;
- }
- const char *getDwarfDebugInlineSection() const {
- return DwarfDebugInlineSection;
- }
- const char *getDwarfStrSection() const {
- return DwarfStrSection;
- }
- const char *getDwarfLocSection() const {
- return DwarfLocSection;
- }
- const char *getDwarfARangesSection() const {
- return DwarfARangesSection;
- }
- const char *getDwarfRangesSection() const {
- return DwarfRangesSection;
- }
- const char *getDwarfMacroInfoSection() const {
- return DwarfMacroInfoSection;
- }
- const char *getDwarfEHFrameSection() const {
- return DwarfEHFrameSection;
- }
const char *const *getAsmCBE() const {
return AsmTransCBE;
}
Modified: llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h Sun Aug 2 02:24:22 2009
@@ -66,6 +66,20 @@
/// the section the EH Frame is emitted to.
const MCSection *EHFrameSection;
+ // Dwarf sections for debug info. If a target supports debug info, these must
+ // be set.
+ const MCSection *DwarfAbbrevSection;
+ const MCSection *DwarfInfoSection;
+ const MCSection *DwarfLineSection;
+ const MCSection *DwarfFrameSection;
+ const MCSection *DwarfPubNamesSection;
+ const MCSection *DwarfPubTypesSection;
+ const MCSection *DwarfDebugInlineSection;
+ const MCSection *DwarfStrSection;
+ const MCSection *DwarfLocSection;
+ const MCSection *DwarfARangesSection;
+ const MCSection *DwarfRangesSection;
+ const MCSection *DwarfMacroInfoSection;
public:
// FIXME: NONPUB.
@@ -90,7 +104,23 @@
const MCSection *getStaticDtorSection() const { return StaticDtorSection; }
const MCSection *getLSDASection() const { return LSDASection; }
const MCSection *getEHFrameSection() const { return EHFrameSection; }
-
+ const MCSection *getDwarfAbbrevSection() const { return DwarfAbbrevSection; }
+ const MCSection *getDwarfInfoSection() const { return DwarfInfoSection; }
+ const MCSection *getDwarfLineSection() const { return DwarfLineSection; }
+ const MCSection *getDwarfFrameSection() const { return DwarfFrameSection; }
+ const MCSection *getDwarfPubNamesSection() const{return DwarfPubNamesSection;}
+ const MCSection *getDwarfPubTypesSection() const{return DwarfPubTypesSection;}
+ const MCSection *getDwarfDebugInlineSection() const {
+ return DwarfDebugInlineSection;
+ }
+ const MCSection *getDwarfStrSection() const { return DwarfStrSection; }
+ const MCSection *getDwarfLocSection() const { return DwarfLocSection; }
+ const MCSection *getDwarfARangesSection() const { return DwarfARangesSection;}
+ const MCSection *getDwarfRangesSection() const { return DwarfRangesSection; }
+ const MCSection *getDwarfMacroInfoSection() const {
+ return DwarfMacroInfoSection;
+ }
+
/// shouldEmitUsedDirectiveFor - This hook allows targets to selectively
/// decide not to emit the UsedDirective for some symbols in llvm.used.
/// FIXME: REMOVE this (rdar://7071300)
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sun Aug 2 02:24:22 2009
@@ -1866,31 +1866,32 @@
// Dwarf sections base addresses.
if (TAI->doesDwarfRequireFrameSection()) {
- Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfFrameSection());
EmitLabel("section_debug_frame", 0);
}
- Asm->SwitchToDataSection(TAI->getDwarfInfoSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfInfoSection());
EmitLabel("section_info", 0);
- Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfAbbrevSection());
EmitLabel("section_abbrev", 0);
- Asm->SwitchToDataSection(TAI->getDwarfARangesSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfARangesSection());
EmitLabel("section_aranges", 0);
- if (const char *LineInfoDirective = TAI->getDwarfMacroInfoSection()) {
- Asm->SwitchToDataSection(LineInfoDirective);
+ if (const MCSection *LineInfoDirective =
+ Asm->getObjFileLowering().getDwarfMacroInfoSection()) {
+ Asm->SwitchToSection(LineInfoDirective);
EmitLabel("section_macinfo", 0);
}
- Asm->SwitchToDataSection(TAI->getDwarfLineSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLineSection());
EmitLabel("section_line", 0);
- Asm->SwitchToDataSection(TAI->getDwarfLocSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLocSection());
EmitLabel("section_loc", 0);
- Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfPubNamesSection());
EmitLabel("section_pubnames", 0);
- Asm->SwitchToDataSection(TAI->getDwarfStrSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfStrSection());
EmitLabel("section_str", 0);
- Asm->SwitchToDataSection(TAI->getDwarfRangesSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfRangesSection());
EmitLabel("section_ranges", 0);
Asm->SwitchToSection(Asm->getObjFileLowering().getTextSection());
@@ -1997,7 +1998,7 @@
void DwarfDebug::EmitDebugInfo() {
// Start debug info section.
- Asm->SwitchToDataSection(TAI->getDwarfInfoSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfInfoSection());
EmitDebugInfoPerCU(ModuleCU);
}
@@ -2008,7 +2009,7 @@
// Check to see if it is worth the effort.
if (!Abbreviations.empty()) {
// Start the debug abbrev section.
- Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfAbbrevSection());
EmitLabel("abbrev_begin", 0);
@@ -2065,7 +2066,7 @@
const int MaxLineDelta = 255 + MinLineDelta;
// Start the dwarf line section.
- Asm->SwitchToDataSection(TAI->getDwarfLineSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLineSection());
// Construct the section header.
EmitDifference("line_end", 0, "line_begin", 0, true);
@@ -2225,7 +2226,7 @@
TD->getPointerSize() : -TD->getPointerSize();
// Start the dwarf frame section.
- Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfFrameSection());
EmitLabel("debug_frame_common", 0);
EmitDifference("debug_frame_common_end", 0,
@@ -2265,7 +2266,7 @@
return;
// Start the dwarf frame section.
- Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfFrameSection());
EmitDifference("debug_frame_end", DebugFrameInfo.Number,
"debug_frame_begin", DebugFrameInfo.Number, true);
@@ -2329,7 +2330,7 @@
///
void DwarfDebug::EmitDebugPubNames() {
// Start the dwarf pubnames section.
- Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfPubNamesSection());
EmitDebugPubNamesPerCU(ModuleCU);
}
@@ -2340,7 +2341,7 @@
// Check to see if it is worth the effort.
if (!StringPool.empty()) {
// Start the dwarf str section.
- Asm->SwitchToDataSection(TAI->getDwarfStrSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfStrSection());
// For each of strings in the string pool.
for (unsigned StringID = 1, N = StringPool.size();
@@ -2361,7 +2362,7 @@
///
void DwarfDebug::EmitDebugLoc() {
// Start the dwarf loc section.
- Asm->SwitchToDataSection(TAI->getDwarfLocSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLocSection());
Asm->EOL();
}
@@ -2369,7 +2370,7 @@
///
void DwarfDebug::EmitDebugARanges() {
// Start the dwarf aranges section.
- Asm->SwitchToDataSection(TAI->getDwarfARangesSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfARangesSection());
// FIXME - Mock up
#if 0
@@ -2405,16 +2406,17 @@
///
void DwarfDebug::EmitDebugRanges() {
// Start the dwarf ranges section.
- Asm->SwitchToDataSection(TAI->getDwarfRangesSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfRangesSection());
Asm->EOL();
}
/// EmitDebugMacInfo - Emit visible names into a debug macinfo section.
///
void DwarfDebug::EmitDebugMacInfo() {
- if (const char *LineInfoDirective = TAI->getDwarfMacroInfoSection()) {
+ if (const MCSection *LineInfo =
+ Asm->getObjFileLowering().getDwarfMacroInfoSection()) {
// Start the dwarf macinfo section.
- Asm->SwitchToDataSection(LineInfoDirective);
+ Asm->SwitchToSection(LineInfo);
Asm->EOL();
}
}
@@ -2444,7 +2446,7 @@
if (!ModuleCU)
return;
- Asm->SwitchToDataSection(TAI->getDwarfDebugInlineSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfDebugInlineSection());
Asm->EOL();
EmitDifference("debug_inlined_end", 1,
"debug_inlined_begin", 1, true);
Modified: llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp Sun Aug 2 02:24:22 2009
@@ -57,17 +57,6 @@
WeakRefDirective = "\t.weak\t";
SetDirective = "\t.set\t";
DwarfRequiresFrameSection = false;
- DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",%progbits";
- DwarfInfoSection = "\t.section\t.debug_info,\"\",%progbits";
- DwarfLineSection = "\t.section\t.debug_line,\"\",%progbits";
- DwarfFrameSection = "\t.section\t.debug_frame,\"\",%progbits";
- DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\",%progbits";
- DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\",%progbits";
- DwarfStrSection = "\t.section\t.debug_str,\"\",%progbits";
- DwarfLocSection = "\t.section\t.debug_loc,\"\",%progbits";
- DwarfARangesSection = "\t.section\t.debug_aranges,\"\",%progbits";
- DwarfRangesSection = "\t.section\t.debug_ranges,\"\",%progbits";
- DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",%progbits";
SupportsDebugInformation = true;
}
Modified: llvm/trunk/lib/Target/COFFTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/COFFTargetAsmInfo.cpp?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/lib/Target/COFFTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/COFFTargetAsmInfo.cpp Sun Aug 2 02:24:22 2009
@@ -33,16 +33,5 @@
AbsoluteEHSectionOffsets = false;
SupportsDebugInformation = true;
DwarfSectionOffsetDirective = "\t.secrel32\t";
- DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"dr\"";
- DwarfInfoSection = "\t.section\t.debug_info,\"dr\"";
- DwarfLineSection = "\t.section\t.debug_line,\"dr\"";
- DwarfFrameSection = "\t.section\t.debug_frame,\"dr\"";
- DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"dr\"";
- DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"dr\"";
- DwarfStrSection = "\t.section\t.debug_str,\"dr\"";
- DwarfLocSection = "\t.section\t.debug_loc,\"dr\"";
- DwarfARangesSection = "\t.section\t.debug_aranges,\"dr\"";
- DwarfRangesSection = "\t.section\t.debug_ranges,\"dr\"";
- DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"dr\"";
}
Modified: llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp Sun Aug 2 02:24:22 2009
@@ -34,17 +34,6 @@
SupportsDebugInformation = true;
NeedsSet = true;
- DwarfAbbrevSection = "\t.section .debug_abbrev,\"\", at progbits";
- DwarfInfoSection = "\t.section .debug_info,\"\", at progbits";
- DwarfLineSection = "\t.section .debug_line,\"\", at progbits";
- DwarfFrameSection = "\t.section .debug_frame,\"\", at progbits";
- DwarfPubNamesSection = "\t.section .debug_pubnames,\"\", at progbits";
- DwarfPubTypesSection = "\t.section .debug_pubtypes,\"\",progbits";
- DwarfStrSection = "\t.section .debug_str,\"MS\", at progbits,1";
- DwarfLocSection = "\t.section .debug_loc,\"\", at progbits";
- DwarfARangesSection = "\t.section .debug_aranges,\"\", at progbits";
- DwarfRangesSection = "\t.section .debug_ranges,\"\", at progbits";
- DwarfMacroInfoSection = 0; // macro info not supported.
// Exception handling is not supported on CellSPU (think about it: you only
// have 256K for code+data. Would you support exception handling?)
Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Sun Aug 2 02:24:22 2009
@@ -41,17 +41,5 @@
// doesn't hurt anything.
// FIXME: I need to get this from Triple.
Is_EHSymbolPrivate = false;
-
- DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
- DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
- DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
- DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
- DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
- DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
- DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
- DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
- DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
- DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
- DwarfMacroInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
}
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Sun Aug 2 02:24:22 2009
@@ -41,17 +41,6 @@
// Debug Information
AbsoluteDebugSectionOffsets = true;
SupportsDebugInformation = true;
- DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\", at progbits";
- DwarfInfoSection = "\t.section\t.debug_info,\"\", at progbits";
- DwarfLineSection = "\t.section\t.debug_line,\"\", at progbits";
- DwarfFrameSection = "\t.section\t.debug_frame,\"\", at progbits";
- DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\", at progbits";
- DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\", at progbits";
- DwarfStrSection = "\t.section\t.debug_str,\"\", at progbits";
- DwarfLocSection = "\t.section\t.debug_loc,\"\", at progbits";
- DwarfARangesSection = "\t.section\t.debug_aranges,\"\", at progbits";
- DwarfRangesSection = "\t.section\t.debug_ranges,\"\", at progbits";
- DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits";
PCSymbol = ".";
Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Sun Aug 2 02:24:22 2009
@@ -84,18 +84,7 @@
GlobalEHDirective = 0;
SupportsWeakOmittedEHFrame = true;
DwarfSectionOffsetDirective = 0;
- DwarfAbbrevSection = ".debug_abbrev";
- DwarfInfoSection = ".debug_info";
- DwarfLineSection = ".debug_line";
- DwarfFrameSection = ".debug_frame";
- DwarfPubNamesSection = ".debug_pubnames";
- DwarfPubTypesSection = ".debug_pubtypes";
- DwarfDebugInlineSection = ".debug_inlined";
- DwarfStrSection = ".debug_str";
- DwarfLocSection = ".debug_loc";
- DwarfARangesSection = ".debug_aranges";
- DwarfRangesSection = ".debug_ranges";
- DwarfMacroInfoSection = ".debug_macinfo";
+
AsmTransCBE = 0;
}
Modified: llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp Sun Aug 2 02:24:22 2009
@@ -38,6 +38,19 @@
StaticDtorSection = 0;
LSDASection = 0;
EHFrameSection = 0;
+
+ DwarfAbbrevSection = 0;
+ DwarfInfoSection = 0;
+ DwarfLineSection = 0;
+ DwarfFrameSection = 0;
+ DwarfPubNamesSection = 0;
+ DwarfPubTypesSection = 0;
+ DwarfDebugInlineSection = 0;
+ DwarfStrSection = 0;
+ DwarfLocSection = 0;
+ DwarfARangesSection = 0;
+ DwarfRangesSection = 0;
+ DwarfMacroInfoSection = 0;
}
TargetLoweringObjectFile::~TargetLoweringObjectFile() {
@@ -305,6 +318,7 @@
StaticDtorSection =
getOrCreateSection(".dtors", false, SectionKind::getDataRel());
+ // Exception Handling Sections.
// FIXME: We're emitting LSDA info into a readonly section on ELF, even though
// it contains relocatable pointers. In PIC mode, this is probably a big
@@ -314,6 +328,30 @@
getOrCreateSection(".gcc_except_table", false, SectionKind::getReadOnly());
EHFrameSection =
getOrCreateSection(".eh_frame", false, SectionKind::getDataRel());
+
+ // Debug Info Sections.
+ DwarfAbbrevSection =
+ getOrCreateSection(".debug_abbrev", false, SectionKind::getMetadata());
+ DwarfInfoSection =
+ getOrCreateSection(".debug_info", false, SectionKind::getMetadata());
+ DwarfLineSection =
+ getOrCreateSection(".debug_line", false, SectionKind::getMetadata());
+ DwarfFrameSection =
+ getOrCreateSection(".debug_frame", false, SectionKind::getMetadata());
+ DwarfPubNamesSection =
+ getOrCreateSection(".debug_pubnames", false, SectionKind::getMetadata());
+ DwarfPubTypesSection =
+ getOrCreateSection(".debug_pubtypes", false, SectionKind::getMetadata());
+ DwarfStrSection =
+ getOrCreateSection(".debug_str", false, SectionKind::getMetadata());
+ DwarfLocSection =
+ getOrCreateSection(".debug_loc", false, SectionKind::getMetadata());
+ DwarfARangesSection =
+ getOrCreateSection(".debug_aranges", false, SectionKind::getMetadata());
+ DwarfRangesSection =
+ getOrCreateSection(".debug_ranges", false, SectionKind::getMetadata());
+ DwarfMacroInfoSection =
+ getOrCreateSection(".debug_macinfo", false, SectionKind::getMetadata());
}
@@ -549,11 +587,52 @@
getOrCreateSection(".mod_term_func", true, SectionKind::getDataRel());
}
+ // Exception Handling.
LSDASection = getOrCreateSection("__DATA,__gcc_except_tab", false,
SectionKind::getDataRel());
EHFrameSection =
getOrCreateSection("__TEXT,__eh_frame,coalesced,no_toc+strip_static_syms"
"+live_support", false, SectionKind::getReadOnly());
+
+ // Debug Information.
+ // FIXME: Don't use 'directive' syntax: need flags for debug/regular??
+ // FIXME: Need __DWARF segment.
+ DwarfAbbrevSection =
+ getOrCreateSection(".section __DWARF,__debug_abbrev,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfInfoSection =
+ getOrCreateSection(".section __DWARF,__debug_info,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfLineSection =
+ getOrCreateSection(".section __DWARF,__debug_line,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfFrameSection =
+ getOrCreateSection(".section __DWARF,__debug_frame,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfPubNamesSection =
+ getOrCreateSection(".section __DWARF,__debug_pubnames,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfPubTypesSection =
+ getOrCreateSection(".section __DWARF,__debug_pubtypes,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfStrSection =
+ getOrCreateSection(".section __DWARF,__debug_str,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfLocSection =
+ getOrCreateSection(".section __DWARF,__debug_loc,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfARangesSection =
+ getOrCreateSection(".section __DWARF,__debug_aranges,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfRangesSection =
+ getOrCreateSection(".section __DWARF,__debug_ranges,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfMacroInfoSection =
+ getOrCreateSection(".section __DWARF,__debug_macinfo,regular,debug", true,
+ SectionKind::getMetadata());
+ DwarfDebugInlineSection =
+ getOrCreateSection(".section __DWARF,__debug_inlined,regular,debug", true,
+ SectionKind::getMetadata());
}
const MCSection *TargetLoweringObjectFileMachO::
@@ -665,6 +744,43 @@
getOrCreateSection(".ctors", false, SectionKind::getDataRel());
StaticDtorSection =
getOrCreateSection(".dtors", false, SectionKind::getDataRel());
+
+
+ // Debug info.
+ // FIXME: Don't use 'directive' mode here.
+ DwarfAbbrevSection =
+ getOrCreateSection("\t.section\t.debug_abbrev,\"dr\"",
+ true, SectionKind::getMetadata());
+ DwarfInfoSection =
+ getOrCreateSection("\t.section\t.debug_info,\"dr\"",
+ true, SectionKind::getMetadata());
+ DwarfLineSection =
+ getOrCreateSection("\t.section\t.debug_line,\"dr\"",
+ true, SectionKind::getMetadata());
+ DwarfFrameSection =
+ getOrCreateSection("\t.section\t.debug_frame,\"dr\"",
+ true, SectionKind::getMetadata());
+ DwarfPubNamesSection =
+ getOrCreateSection("\t.section\t.debug_pubnames,\"dr\"",
+ true, SectionKind::getMetadata());
+ DwarfPubTypesSection =
+ getOrCreateSection("\t.section\t.debug_pubtypes,\"dr\"",
+ true, SectionKind::getMetadata());
+ DwarfStrSection =
+ getOrCreateSection("\t.section\t.debug_str,\"dr\"",
+ true, SectionKind::getMetadata());
+ DwarfLocSection =
+ getOrCreateSection("\t.section\t.debug_loc,\"dr\"",
+ true, SectionKind::getMetadata());
+ DwarfARangesSection =
+ getOrCreateSection("\t.section\t.debug_aranges,\"dr\"",
+ true, SectionKind::getMetadata());
+ DwarfRangesSection =
+ getOrCreateSection("\t.section\t.debug_ranges,\"dr\"",
+ true, SectionKind::getMetadata());
+ DwarfMacroInfoSection =
+ getOrCreateSection("\t.section\t.debug_macinfo,\"dr\"",
+ true, SectionKind::getMetadata());
}
void TargetLoweringObjectFileCOFF::
Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Sun Aug 2 02:24:22 2009
@@ -74,7 +74,6 @@
ProtectedDirective = "\t.globl\t";
SupportsDebugInformation = true;
- DwarfDebugInlineSection = ".section __DWARF,__debug_inlined,regular,debug";
DwarfUsesInlineInfoSection = true;
// Exceptions handling
@@ -98,17 +97,6 @@
// Debug Information
AbsoluteDebugSectionOffsets = true;
SupportsDebugInformation = true;
- DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\", at progbits";
- DwarfInfoSection = "\t.section\t.debug_info,\"\", at progbits";
- DwarfLineSection = "\t.section\t.debug_line,\"\", at progbits";
- DwarfFrameSection = "\t.section\t.debug_frame,\"\", at progbits";
- DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\", at progbits";
- DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\", at progbits";
- DwarfStrSection = "\t.section\t.debug_str,\"\", at progbits";
- DwarfLocSection = "\t.section\t.debug_loc,\"\", at progbits";
- DwarfARangesSection = "\t.section\t.debug_aranges,\"\", at progbits";
- DwarfRangesSection = "\t.section\t.debug_ranges,\"\", at progbits";
- DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits";
// Exceptions handling
SupportsExceptionHandling = true;
Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp?rev=77889&r1=77888&r2=77889&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Sun Aug 2 02:24:22 2009
@@ -27,17 +27,5 @@
// Debug
HasLEB128 = true;
AbsoluteDebugSectionOffsets = true;
-
- DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\", at progbits";
- DwarfInfoSection = "\t.section\t.debug_info,\"\", at progbits";
- DwarfLineSection = "\t.section\t.debug_line,\"\", at progbits";
- DwarfFrameSection = "\t.section\t.debug_frame,\"\", at progbits";
- DwarfPubNamesSection = "\t.section\t.debug_pubnames,\"\", at progbits";
- DwarfPubTypesSection = "\t.section\t.debug_pubtypes,\"\", at progbits";
- DwarfStrSection = "\t.section\t.debug_str,\"\", at progbits";
- DwarfLocSection = "\t.section\t.debug_loc,\"\", at progbits";
- DwarfARangesSection = "\t.section\t.debug_aranges,\"\", at progbits";
- DwarfRangesSection = "\t.section\t.debug_ranges,\"\", at progbits";
- DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits";
}
More information about the llvm-commits
mailing list