wrong section when using find_pc_section

freenix van.freenix@gmail.com
Sat Aug 10 02:33:00 GMT 2013


On 08/10/2013 02:27 AM, Tom Tromey wrote:
>>> 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.  */
Thanks.
I traced the code and found that it did remove the overlapped sections.
it this a must to remove the overlapped sections? I want to use the 
overlapped
sections, but not remove it.  Is there any way that can return the 
overlapped sections?

Thanks,
Peng.
> Tom



More information about the Gdb mailing list