[cfe-dev] DWARFv5 by default in clang?

via cfe-dev cfe-dev at lists.llvm.org
Thu Nov 4 17:20:22 PDT 2021


The default DWARF version is target-dependent, it’s a hook in ToolChain.h (GetDefaultDwarfVersion).  In the base class this returns 4;  Darwin currently picks 2 for OS X 10.10 / iOS 8 or previous, and 4 otherwise.

Some targets already pick 5.  It’s the ones that don’t explicitly pick that would be affected, of course.  PS4 among them, of course, but I think we know what to do about it. 😊
--paulr

From: David Blaikie <dblaikie at gmail.com>
Sent: Thursday, November 4, 2021 6:06 PM
To: Adrian Prantl <aprantl at apple.com>
Cc: Jonas Devlieghere <jdevlieghere at apple.com>; Robinson, Paul <paul.robinson at sony.com>; James Henderson <jh7370.2008 at my.bristol.ac.uk>; Clang Dev <cfe-dev at lists.llvm.org>
Subject: Re: DWARFv5 by default in clang?

On Thu, Nov 4, 2021 at 3:01 PM Adrian Prantl <aprantl at apple.com<mailto:aprantl at apple.com>> wrote:
On Darwin, we still have a sizeable number of test failures to go until we're there: https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/<https://urldefense.com/v3/__https:/green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/__;!!JmoZiZGBv3RvKRSx!rlnO92bXtV-KwQx2jCwIIqoKrdlZbt7P9csZLDaGq7tZ3YCJ1IN2S1nrALGLW9FybQ$>

I'm not sure what/where/how to read that - could you give me some pointers?

In any case, as I recall, Darwin had a different default for quite a while after we switched the default on other platforms to v4, so I guess we could do the same thing for v5.


-- adrian


Am 11/4/21 um 2:58 PM schrieb David Blaikie <dblaikie at gmail.com<mailto:dblaikie at gmail.com>>:

Should we change Clang's default to DWARFv5?

(I'm motivated by having fixed a bug because I only tested with v4 - I should've tested with v5, but got me thinking about maybe v5 is just a better default at this point)

Google's been using v5 as the default for the better part of a year at this point - not the most debugger usage, but we validated GDB and LLDB for v5 pretty well & haven't encountered major issues since the switch.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20211105/f0926ff7/attachment-0001.html>


More information about the cfe-dev mailing list