02ccbdfed2
We have symbol->addr info and dwarf->addr info (DW_AT_low_pc), so why not use this to map symbols to dwarf entries? This should hopefully be more reliable than the current name based heuristic, but only works for functions (DW_TAG_subprogram). Note that we still have to fuzzy match due to thumb-bit weirdness (small rant below). --- Ok. Why in Thumb does the symbol table include the thumb bit, but the dwarf info does not?? Would it really have been that hard to add the thumb bit to DW_AT_low_pc so symbols and dwarf entries match? So, because of Thumb, we can't expect either the address or name to match exactly. The best we can do is binary search and expect the symbol to point somewhere _within_ the dwarf's DW_AT_low_pc/DW_AT_high_pc range. Also why does DW_AT_high_pc store the _size_ of the function?? Why isn't it, idunno, the _high_pc_? I get that the size takes up less space when leb128 encoding, but surely there could have been a better name?