[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Reid Spencer
reid at x10sys.com
Mon Oct 30 14:32:46 PST 2006
Changes in directory llvm/lib/CodeGen:
DwarfWriter.cpp updated: 1.87 -> 1.88
---
Log message:
Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.
---
Diffs of the changes: (+12 -8)
DwarfWriter.cpp | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.87 llvm/lib/CodeGen/DwarfWriter.cpp:1.88
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.87 Mon Oct 30 09:59:54 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp Mon Oct 30 16:32:29 2006
@@ -1921,8 +1921,8 @@
unsigned ID) {
// Construct debug information entry.
DIE *Die = new DIE(DW_TAG_compile_unit);
- Die->AddDelta (DW_AT_stmt_list, DW_FORM_data4, DWLabel("line", 0),
- DWLabel("section_line", 0));
+ Die->AddDelta (DW_AT_stmt_list, DW_FORM_data4, DWLabel("section_line", 0),
+ DWLabel("section_line", 0));
// Die->AddLabel (DW_AT_high_pc, DW_FORM_addr, DWLabel("text_end", 0));
// Die->AddLabel (DW_AT_low_pc, DW_FORM_addr, DWLabel("text_begin", 0));
Die->AddString(DW_AT_producer, DW_FORM_string, UnitDesc->getProducer());
@@ -2175,21 +2175,20 @@
didInitial = true;
// Dwarf sections base addresses.
- Asm->SwitchToDataSection(TAI->getDwarfFrameSection(), 0);
- EmitLabel("section_frame", 0);
+ if (TAI->getDwarfRequiresFrameSection()) {
+ Asm->SwitchToDataSection(TAI->getDwarfFrameSection(), 0);
+ EmitLabel("section_frame", 0);
+ }
Asm->SwitchToDataSection(TAI->getDwarfInfoSection(), 0);
EmitLabel("section_info", 0);
- EmitLabel("info", 0);
Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection(), 0);
EmitLabel("section_abbrev", 0);
- EmitLabel("abbrev", 0);
Asm->SwitchToDataSection(TAI->getDwarfARangesSection(), 0);
EmitLabel("section_aranges", 0);
Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection(), 0);
EmitLabel("section_macinfo", 0);
Asm->SwitchToDataSection(TAI->getDwarfLineSection(), 0);
EmitLabel("section_line", 0);
- EmitLabel("line", 0);
Asm->SwitchToDataSection(TAI->getDwarfLocSection(), 0);
EmitLabel("section_loc", 0);
Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection(), 0);
@@ -2198,7 +2197,6 @@
EmitLabel("section_str", 0);
Asm->SwitchToDataSection(TAI->getDwarfRangesSection(), 0);
EmitLabel("section_ranges", 0);
-
Asm->SwitchToTextSection(TAI->getTextSection(), 0);
EmitLabel("text_begin", 0);
Asm->SwitchToDataSection(TAI->getDataSection(), 0);
@@ -2629,6 +2627,9 @@
/// EmitInitialDebugFrame - Emit common frame info into a debug frame section.
///
void Dwarf::EmitInitialDebugFrame() {
+ if (TAI->getDwarfRequiresFrameSection())
+ return;
+
int stackGrowth =
Asm->TM.getFrameInfo()->getStackGrowthDirection() ==
TargetFrameInfo::StackGrowsUp ?
@@ -2664,6 +2665,9 @@
/// EmitFunctionDebugFrame - Emit per function frame info into a debug frame
/// section.
void Dwarf::EmitFunctionDebugFrame() {
+ if (TAI->getDwarfRequiresFrameSection())
+ return;
+
// Start the dwarf frame section.
Asm->SwitchToDataSection(TAI->getDwarfFrameSection(), 0);
More information about the llvm-commits
mailing list