[PATCH] Set a debugger "target" to guide DWARF choices
Eric Christopher
echristo at gmail.com
Thu Jun 25 19:13:25 PDT 2015
Some inline comments.
-eric
================
Comment at: include/llvm/CodeGen/CommandFlags.h:236
@@ +235,3 @@
+cl::opt<DebuggerKind>
+DebuggerTuning("debugger-tune",
+ cl::desc("Tune debug info for a particular debugger"),
----------------
probinson wrote:
> probinson wrote:
> > dblaikie wrote:
> > > What's the command line argument for? I mean convenience of testing LLVM, a bit, but in general we don't want to use backend options like this when actually interacting with LLVM from Clang and other frontends. This should probably end up as a part of the CU debug info metadata? Or a module-level debug info metadata flag? (ala DWARF version)
> > The command line option is precisely for testing; it is not how Clang communicates to LLVM.
> > CommandFlags.h exists to define command-line options for the tools (llc, opt etc) only. It does not define a command-line option that is accessible to Clang.
> > Clang will set the TargetOptions field directly.
> >
> David pointed out in email that using a TargetOptions field, it is hard to test that Clang got it right, and might not play nicely with LTO. I'll look at doing it with module-level metadata.
>
Module level metadata is a possibility if we think it's something that we'll need to make sure stays consistent at LTO time etc. You'll need to define a way for the metadata to merge, etc. I don't necessarily like encoding the data this way, but without a later LTO codegen pass we can pass options to it's your best bet.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:222-223
@@ -212,3 +221,4 @@
+
// Turn on accelerator tables for Darwin by default, pubnames by
- // default for non-Darwin/PS4, and handle split dwarf.
+ // default for GDB, and handle split dwarf.
if (DwarfAccelTables == Default)
----------------
Feel free to update this comment separately.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:245
@@ -234,3 +244,3 @@
// Everybody else uses GNU's.
- UseGNUTLSOpcode = !(IsDarwin || IsPS4) || DwarfVersion < 3;
+ UseGNUTLSOpcode = !(IsDarwin || TT.isPS4CPU()) || DwarfVersion < 3;
----------------
I don't like the use of TT.isPS4CPU() here on first look, can you explain a bit?
http://reviews.llvm.org/D8506
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list