Re: wrong section when using find_pc_section

Tom Tromey <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
>> 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
apropos:

/* 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.  */

Tom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.