mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 00:49:22 -06:00
https://llvm.org/docs/CommandGuide/llvm-dwarfdump.html This dumps the DWARF debugging information in a human readable form: ``` <source>: file format ELF64-x86-64 .debug_info contents: 0x00000000: Compile Unit: length = 0x00000063 version = 0x0004 abbr_offset = ... 0x0000000b: DW_TAG_compile_unit DW_AT_producer ("GNU C17 9.4.0 ...) ``` This tool would be useful to have when comparing the debug output of two compiler versions or compiler targets. For instance I wanted to find out recently how AArch64 and X86 targets represent TLS variables. The tool runs on the compiled binary, so is post compilation. If the binary has no debug information the tool does not crash, it just tells you that there is no information. To fit the other llvm/clang tools, I've just added an "llvm-dwarfdump (trunk)" like llvm-mca has done. Added it to c/c++/objc/objc++ (open CL can't compile to binary so skipped those). MSVC is excluded because it produces PDB files instead. The tool works for at least ELF and XCOFF files, I haven't been able to test any others.
43 lines
2.2 KiB
TypeScript
43 lines
2.2 KiB
TypeScript
// Copyright (c) 2022, Compiler Explorer Authors
|
|
// All rights reserved.
|
|
//
|
|
// Redistribution and use in source and binary forms, with or without
|
|
// modification, are permitted provided that the following conditions are met:
|
|
//
|
|
// * Redistributions of source code must retain the above copyright notice,
|
|
// this list of conditions and the following disclaimer.
|
|
// * Redistributions in binary form must reproduce the above copyright
|
|
// notice, this list of conditions and the following disclaimer in the
|
|
// documentation and/or other materials provided with the distribution.
|
|
//
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
// POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
export {ClangFormatTool} from './clang-format-tool.js';
|
|
export {ClangQueryTool} from './clang-query-tool.js';
|
|
export {ClangTidyTool} from './clang-tidy-tool.js';
|
|
export {CompilerDropinTool} from './compiler-dropin-tool.js';
|
|
export {LLVMMcaTool} from './llvm-mca-tool.js';
|
|
export {LLVMCovTool} from './llvm-cov-tool.js';
|
|
export {LLVMDWARFDumpTool} from './llvm-dwarfdump-tool.js';
|
|
export {MicrosoftAnalysisTool} from './microsoft-analysis-tool.js';
|
|
export {NmTool} from './nm-tool.js';
|
|
export {OSACATool} from './osaca-tool.js';
|
|
export {PaholeTool} from './pahole-tool.js';
|
|
export {PvsStudioTool} from './pvs-studio-tool.js';
|
|
export {ReadElfTool} from './readelf-tool.js';
|
|
export {RustFmtTool} from './rustfmt-tool.js';
|
|
export {SonarTool} from './sonar-tool.js';
|
|
export {StringsTool} from './strings-tool.js';
|
|
export {x86to6502Tool} from './x86to6502-tool.js';
|
|
export {TestingTool} from './testing-tool.js';
|