Open cjdb opened 4 months ago
llvm-dwp doesn't have a default value for the output file name - so it's trying to write to a file named "". -o hello.dwp would address this, though presumably binutils dwp -e behavior defaults to <binary>.dwp
and that could be implemented in llvm-dwp too
Looking at the respective help menus, I see that the interfaces are quite different.
$ dwp --help
Usage: dwp [options] [file...]
-h, --help Print this help message
-e EXE, --exec EXE Get list of dwo files from EXE (defaults output to EXE.dwp)
-o FILE, --output FILE Set output dwp file name
-v, --verbose Verbose output
--verify-only Verify output file against exec file
-V, --version Print version number
Report bugs to <https://sourceware.org/bugzilla/>
$ llvm-dwp --help
OVERVIEW: merge split dwarf (.dwo) files
USAGE: llvm-dwp [options] <input files>
OPTIONS:
-continue-on-cu-index-overflow=<value>
default = continue, This turns an error when offset
for .debug_*.dwo sections overfolws into a warning. = soft-stop, This produces a
truncated but valid DWP file, discarding any DWO files that would not fit within
the 32 bit/4GB limits of the format.
-e <filename> Specify the executable/library files to get the list of *.dwo from.
-help Display this help
-h Alias for --help
-o <filename> Specify the output file.
-version Display the version of this program
Perhaps we should try to bring them closer to parity?
practically speaking most of the usage is just "dwp a.dwo b.dwo c.dwo -o abc.dwp" and "dwp -e a.exe -o a.dwp" which is mostly consistent - though, yeah, defaulting the output file name would probably be a useful convenience.
making sure help, version, and verbose work the same wouldn't be a bad thing, of course
Problem
llvm-dwp
reports an error when given a simple program, regardless of compiler.System info
Examples
GCC
Clang
Related issues
https://sourceware.org/bugzilla/show_bug.cgi?id=32032Not related, just a coincidence.