diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-10-30 22:32:30 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-10-30 22:32:30 +0000 |
commit | 02b8511364a61b559369d8dc36e82a486f42fec3 (patch) | |
tree | bc13784e5ba5e28e5c6345f62cc166baa9b306a0 /lib/Target/X86/X86ATTAsmPrinter.cpp | |
parent | 6ce644392e0dd182f2eda161b5e69206b58a7c5d (diff) | |
download | llvm-02b8511364a61b559369d8dc36e82a486f42fec3.tar.gz llvm-02b8511364a61b559369d8dc36e82a486f42fec3.tar.bz2 llvm-02b8511364a61b559369d8dc36e82a486f42fec3.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ATTAsmPrinter.cpp')
-rwxr-xr-x | lib/Target/X86/X86ATTAsmPrinter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/X86/X86ATTAsmPrinter.cpp b/lib/Target/X86/X86ATTAsmPrinter.cpp index dc2ecca7cb..42af5b69ac 100755 --- a/lib/Target/X86/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/X86ATTAsmPrinter.cpp @@ -52,7 +52,7 @@ std::string X86ATTAsmPrinter::getSectionForFunction(const Function &F) const { /// method to print assembly for each instruction. /// bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) { - if (Subtarget->isTargetDarwin()) { + if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) { // Let PassManager know we need debug information and relay // the MachineDebugInfo address on to DwarfWriter. DW.SetDebugInfo(&getAnalysis<MachineDebugInfo>()); @@ -111,7 +111,7 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) { F->getLinkage() == Function::WeakLinkage)) O << "_llvm$workaround$fake$stub_" << CurrentFnName << ":\n"; - if (Subtarget->isTargetDarwin()) { + if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) { // Emit pre-function debug information. DW.BeginFunction(&MF); } @@ -141,7 +141,7 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) { if (TAI->hasDotTypeDotSizeDirective()) O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n"; - if (Subtarget->isTargetDarwin()) { + if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) { // Emit post-function debug information. DW.EndFunction(); } |