This is the mail archive of the gcc-bugs@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]

[Bug debug/84550] [8 Regression] stepping through gcc does not work with gdb 8.0.1


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84550

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
     In addition to reordering basic blocks in the compiled function, in
     order to reduce number of taken branches, partitions hot and cold
     basic blocks into separate sections of the assembly and '.o' files,
     to improve paging and cache locality performance.
is what we say about -freorder-blocks-and-partition in the documentation, when
functions are normally placed in .text section rather than anything different,
the cold basic blocks go into .text.cold subsection and the linker merges all
those cold subsections from all objects into one part of the resulting .text
section, so unlikely used code from all the functions is adjacent and hot code
from all of them elsewhere too.  The cold partition could end up either below
or above the hot partition, it is purely up to the linker to decide that.
As written above, the real entrypoint to the function can be found in DWARF by
checking DW_AT_entry_pc if it exists, or if it doesn't, as the base address of
the function which is the lowest address of the first range if it has
DW_AT_ranges, or if it has DW_AT_{low,high}_pc as the DW_AT_low_pc.

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