[llvm] Allow the dumping of .dwo files contents to show up when dumping an e… (PR #66726)
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 14:13:58 PST 2023
clayborg wrote:
> > > > How do you specify to output DIE at an offset for specific non-skeleton unit?
> > >
> > >
> > > Currently you can just use "--debug-info=" and you might see multiple DIEs from multiple .dwo files. I can add a ---dwo-id option to allow only dumping a specific .dwo file.
> >
> >
> > right. That is what I was asking. Without it, there will be multiple DIEs being outputted for the same offset.
> > Not sure a flag entry is necessary. Can we just re-use --dwo
> > --dwo --> outputs for all non-skeleton
> > --dwo= --> for specific ones
>
> Sounds good to me. Could allow a comma separated list that could match against the CU hash or the dwo_name? (so you could do `--dwo=0x47,32a32f,foo.dwo` and that could match partial hashes (like git/github will match partial hashes so you don't have to remember too many digits), partial path names, etc))
I was thinking just adding a `--dwo-id <hash>` option. Then you could do:
```
$ llvm-dwarfdump --dwo-id <hash> /path/to/dwarf/a.out
```
We could also add a `--dwo-name <match>` option so this could be:
```
$ llvm-dwarfdump --dwo-name foo.dwo /path/to/dwarf/a.out
```
Any of the above could then be combined with the `--debug-info <die-offset>`
https://github.com/llvm/llvm-project/pull/66726
More information about the llvm-commits
mailing list