[PATCH] Set a debugger "target" to guide DWARF choices

Paul Robinson Paul_Robinson at playstation.sony.com
Thu Jun 25 12:51:02 PDT 2015


================
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:
> 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.


================
Comment at: test/DebugInfo/X86/dwarf-public-names.ll:42
@@ -41,3 +41,3 @@
 ; NOPUB: debug_pubnames
-; NOPUB: {{^$}}
+; NOPUB-NEXT: {{^$}}
 
----------------
probinson wrote:
> dblaikie wrote:
> > what happened to these two checks in this test?
> As originally written, this check does not fail if there is actually a debug_pubnames section, because it didn't insist that the empty line was immediately following the "debug_pubnames" header line.  Instead it would match the empty line at the end of the debug_pubnames dump, and pass.
> I made the same change on the LINUX path just for consistency.
> 
> This test update could actually be committed independently if you'd rather, as it's fixing a bug in the test rather than actually testing something I did in the rest of the patch.
> 
Committed separately as r240679.

http://reviews.llvm.org/D8506

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list