This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH] Generate a label for the split cold function while using -freorder-blocks-and-partition


>> Isn't this something that should be expressed in DWARF with
>> DW_AT_ranges? See DWARF4, section 2.17,
>>
>> Does GCC generate such ranges?
>
> GCC does generate these ranges. However, according to Cary many tools
> do not rely on dwarf info for locating the corresponding function
> name, they just look at the symbols to identify what function an
> address resides in. Nor would we want tools such as objdump and
> profilers to rely on dwarf for locating the function names as this
> would not work for binaries that were generated without -g options or
> had their debug info stripped.

Yes, while the information needed is in the DWARF info, I don't think
it's a good idea to depend on having debug info in all binaries. It's
quite common to need to symbolize binaries that don't have debug info,
and without a symbol such as Sri and Teresa are proposing, the result
will be not just an address that didn't get symbolized, but an address
that gets symbolized incorrectly (in a way that will often be quite
misleading).

-cary


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