wrong section when using find_pc_section

Tom Tromey tromey@redhat.com
Fri Aug 9 18:27:00 GMT 2013

>> I found that `disas` uses find_pc_section to locate the section which
>> contains the symbol passed to disas. It uses a bsearch function to do
>> the searching.
>> But if two sections are overlapped, find_pc_section can not correctly
>> return the section contains the address.

According at least to update_section_map, overlapping sections are
dropped from the map.  The comment by filter_overlapping_sections seems

/* Filter out overlapping sections, issuing a warning if any are found.
   Overlapping sections could really be overlay sections which we didn't
   classify as such in insert_section_p, or we could be dealing with a
   corrupt binary.  */


More information about the Gdb mailing list