gimli icon indicating copy to clipboard operation
gimli copied to clipboard

Updating an existing location list from .debug_loc

Open vaibspider opened this issue 4 years ago • 1 comments

Hi, I am trying to update a location list present in a relocatable object file. I noticed that gimli::write::LocationListTable only has an add() method. I am able to add a new location list with this interface. But, I don't see an interface to get a mutable location list for an offset from this LocationListTable, which we can update.

I also searched for a way to get a readable instance of Location List and then convert it into a writable form, but couldn't find such interface. (I can get LocListIter with gimli::read::Dwarf::attr_locations(), but only for reading)

Am I missing something? Thanks!

vaibspider avatar Aug 24 '20 19:08 vaibspider

There's currently very little ability to mutate the debug info, but adding the ability to do so would be welcome. (#374 is a similar problem.)

philipc avatar Aug 24 '20 22:08 philipc