This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wrong section when using find_pc_section


>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]