mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-31 09:25:42 +00:00
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
This commit is contained in:
@@ -114,6 +114,9 @@ bool X86SharedAsmPrinter::doInitialization(Module &M) {
|
||||
if (!Subtarget->is64Bit())
|
||||
X86PICStyle = PICStyle::Stub;
|
||||
|
||||
// Emit initial debug information.
|
||||
DW.BeginModule(&M);
|
||||
} else if (Subtarget->isTargetELF()) {
|
||||
// Emit initial debug information.
|
||||
DW.BeginModule(&M);
|
||||
}
|
||||
@@ -278,7 +281,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
|
||||
O << "\t.long\t0\n";
|
||||
}
|
||||
|
||||
// Emit initial debug information.
|
||||
// Emit final debug information.
|
||||
DW.EndModule();
|
||||
|
||||
// Funny Darwin hack: This flag tells the linker that no global symbols
|
||||
@@ -287,6 +290,9 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
|
||||
// linker can safely perform dead code stripping. Since LLVM never
|
||||
// generates code that does this, it is always safe to set.
|
||||
O << "\t.subsections_via_symbols\n";
|
||||
} else if (Subtarget->isTargetELF()) {
|
||||
// Emit final debug information.
|
||||
DW.EndModule();
|
||||
}
|
||||
|
||||
AsmPrinter::doFinalization(M);
|
||||
|
Reference in New Issue
Block a user