diff options
author | Eric Christopher <echristo@apple.com> | 2012-08-23 07:10:46 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-08-23 07:10:46 +0000 |
commit | 10cb744f194dc2a0ce0c3d52965aafb2b190068b (patch) | |
tree | 5efee2b0f1ee3d358e28fafc0f6dbf2d5ccf9438 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 1df46c36b6142d50acfa21063a6e682e7f055e8e (diff) |
Add an option for darwin gdb compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 649684adbf..02d86c7ad2 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -58,6 +58,10 @@ static cl::opt<bool> DwarfAccelTables("dwarf-accel-tables", cl::Hidden, cl::desc("Output prototype dwarf accelerator tables."), cl::init(false)); +static cl::opt<bool> DarwinGDBCompat("darwin-gdb-compat", cl::Hidden, + cl::desc("Compatibility with Darwin gdb."), + cl::init(false)); + namespace { const char *DWARFGroupName = "DWARF Emission"; const char *DbgTimerName = "DWARF Debug Writer"; @@ -135,9 +139,12 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M) DwarfDebugRangeSectionSym = DwarfDebugLocSectionSym = 0; FunctionBeginSym = FunctionEndSym = 0; - // Turn on accelerator tables for Darwin. - if (Triple(M->getTargetTriple()).isOSDarwin()) + // Turn on accelerator tables and older gdb compatibility + // for Darwin. + if (Triple(M->getTargetTriple()).isOSDarwin()) { DwarfAccelTables = true; + DarwinGDBCompat = true; + } { NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled); |