[llvm] [llvm-dwarfdump] Added --output-style option for controlling output format (PR #216559)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 02:57:50 PDT 2026


jh7370 wrote:

> @jh7370 I've finished the implementation for `.debug_abbrev`. Quick question about behavior: `llvm-dwarfdump --output-style=JSON --debug-abbrev <exe_file>` correctly dumps the abbreviation section after my changes, but for now if a user runs `llvm-dwarfdump --output-style=JSON <exe_file>`, i.e. without the section flag, should it suppress the `.debug_abbrev` JSON output entirely and show a warning that the sections have not been implemented or should it handle it differently?

Good question! I don't have a specific preference. I'd naturally say an error, but then you wouldn't get the other section outputs. A warning + empty output for the corresponding sections seems reasonable to me.

https://github.com/llvm/llvm-project/pull/216559


More information about the llvm-commits mailing list