[llvm] Allow the dumping of .dwo files contents to show up when dumping an e… (PR #66726)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 16:04:13 PST 2023


dwblaikie wrote:

> I usually often do want to dump and entire binary since I often make small example binaries to test with, so I like the idea of being able to dump all of the DWARF since the skeleton DIE on its own isn't very useful, and dumping the .dwo file without the main executable is only useful if you are not not looking at anything that needs addresses.

Fair enough - happy enough to add `--dwo` for that use case, then.

> I also would like to search be name, by address and by DIE offset, even if that DIE comes from a DWO file. In LLDB the identifier is a uint64_t and many objects in LLDB map back to the DWARF by specifying a uint64_t that contains the DWO index + 32 bit DIE offset. So I often have a function or variable object that has an indentifier that maps back to DWARF using this DWO idx + DIE offset, and I need to find the exact DWARF.

Yeah, be nice if the existing filters could take, maybe a dwo_name+offset format and an unadorned offset referred to the main file only (since applying it to dwos would be ambiguous, the offset might appear in multiple dwos) and you can use dwo_name+offset, or maybe `*.dwo+offset` for "try to dump this offset in any dwo".

> So I would vote that we allow a way to dump the main executable and all of its .dwo files so we can see fully linked addresses. "--dwo" takes are of this currently.
> 
> I also have implemented the main search features I want to use with this patch and hooked it up so it all works with .dwo files.

Yeah, I'd do those as follow-up patches, with some eye towards a common interface design, possibly the `dwo_name+offset` scheme (eg: `--offset=foo.dwo+0x47`)

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


More information about the llvm-commits mailing list