[Proposal][DWARF] add getAddressForLineInfo to DwarfContext


I’ve seen there is a getLineInfoForAddress in the DwarfContext class of the llvm dwarf module, is it possible to have the counterpart getAddressForLineInfo ?
Or is this information available somewhere else ?


Generally things are implemented as needed - getLineInfoForAddress is (I think) used for things like symbolication/stack traces.

I haven’t looked at the APIs there in detail - but there’s probably some representation of the line table that could be navigated to find information like what you need. If it turns out you need more API surface than is there already, please provide a patch - though it’s also important/useful to provide an in-tree use case (though we do now have unit testing functionality for these APIs - it’s helpful to have an in-tree justification for the code to exist, as much as possible). So if there’s a useful extension to an existing tool (llvm-symbolizer, llvm-dwarfdump) that could demonstrate the new API, that may be helpful.