The 'cold' function attribute and GDB
Kevin Buettner
kevinb@redhat.com
Thu May 2 02:51:00 GMT 2019
On Wed, 1 May 2019 16:17:04 -0400
Simon Marchi <simark@simark.ca> wrote:
> In an ideal world, if gcc generates two separate ranges
> of instruction for this function (the hot path and the cold path), it should describe
> it as two ranges in the entry for print_vectorlike. If so, it should be described with
> a DW_AT_ranges attribute.
Yes, this is exactly right.
[...]
> Also, which commit of GDB is this with? I recall some patches related to non-contiguous
> address ranges not too long ago.
As I recall, I committed the non-contiguous address range stuff in
late August of 2018. It might be the case that 8.3 will be the first
release to include that support. Any build based on a commit to
master since 2018-08-24 should have this support.
I think I need to write some small programs which use the 'cold'
attribute to see what the DWARF looks like. I was unaware of this
attribute prior to reading Eli's message on this matter. If it can
be avoided, I (too) would prefer to not add a special case for handling
cold minimal symbols.
Kevin
More information about the Gdb-patches
mailing list