[BUG]: clang default dwarf version being over-ridden?
See original GitHub issueDescribe the bug
Consider: https://godbolt.org/z/3Wd8q8fax
I’m trying to find which version of clang defaulted to dwarf-v5 implicitly when -g is used. I know clang switched to dwarf-v5 recently, but godbolt shows clang trunk emitting dwarf-v4 (there’s an assembler directive denoting the dwarf version in the output).
.short 4 # DWARF version number
Steps to reproduce
enable -g for clang trunk (should be clang-16 today)
Expected behavior
.short 5 # DWARF version number
is what I get locally for clang trunk.
Is godbolt overriding this somehow?
Reproduction link
https://godbolt.org/z/3Wd8q8fax
Screenshots
Not applicable
Operating System
No response
Browser version
No response
Issue Analytics
- State:
- Created a year ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
⚙ D69822 [clang] Add new -fdebug-default-version flag.
This adds a new flag '-fdebug-default-version=N' that sets the version of DWARF to be generated, but does not turn on/off debug info generation....
Read more >Clang Compiler User's Manual
Introduction¶. The Clang Compiler is an open-source compiler for the C family of programming languages, aiming to be the best in class implementation...
Read more >Clang command line argument reference
Default is 'hash'. This option will be overridden by option '-cuid=[ID]' if it is specified. Don't error out if the detected version of...
Read more >Diagnostic flags in Clang — Clang 16.0.0git documentation
warning: checker plugin 'A' is not compatible with this version of the analyzer ... This diagnostic is an error by default, but the...
Read more >Clang 16.0.0git (In-Progress) Release Notes
Due to the extended period of time this bug was present in major C++ implementations (including Clang), this error has the ability to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems like GNU objdump can’t figure this out.
so testing [g++, clang++] x [objdump, llvm-objdump], it seems that it is GNU objdump that doesn’t understand the output from clang++; llvm-objdump supports both compilers.
I’ve filed https://sourceware.org/bugzilla/show_bug.cgi?id=29529 against GNU objdump.
This has been fixed up ToT GNU objdump. It just missed the 2.39 release, so probably whatever is after that should have the fix. Leaving this open until that release exists.