summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-08-23 07:10:46 +0000
committerEric Christopher <echristo@apple.com>2012-08-23 07:10:46 +0000
commit978fbff11bb048b8960284c253a9b62264025fff (patch)
treeb3e4a65b8aea351415afee1f95920f0e3166a39d /llvm/lib/CodeGen
parent4039eb357ed31c36168f1692d24f518eb7ecc972 (diff)
downloadbcm5719-llvm-978fbff11bb048b8960284c253a9b62264025fff.tar.gz
bcm5719-llvm-978fbff11bb048b8960284c253a9b62264025fff.zip
Add an option for darwin gdb compatibility.
llvm-svn: 162432
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 649684adbf0..02d86c7ad25 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud