[llvm] [llvm-exegesis] Debug generated disassembly (PR #142540)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 00:30:05 PDT 2025


https://github.com/boomanaiden154 commented:

I don't exactly see the point of this. Running `objdump` (or `llvm-objdump`/whatever version) on the output of `-dump-object-to-disk` is intended to cover this exact use case. I don't think the slight convenience of running it automatically by passing `-debug-only` or `-debug` outweights the extra code complexity and other problems that will come with this.

It's hard to test because now you're relying on `/usr/bin/objdump` existing, you have no idea what `/usr/bin/objdump` actually does or if it even exists, and creating temporary files to invoke an external command is the wrong way to go about this. If we want to print instructions we can spin up a `MCInstPrinter` to print the vector of `MCInst`s that we have earlier. That case is still covered by `-dump-object-to-disk` though.

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


More information about the llvm-commits mailing list