Re: The 'cold' function attribute and GDB

Kevin Buettner
2019-05-02T07:26:48Z

On Thu, 02 May 2019 09:58:47 +0300
Eli Zaretskii <eliz@gnu.org> wrote:

> On May 2, 2019 5:51:13 AM GMT+03:00, Kevin Buettner <kevinb@redhat.com> wrote:
> > On Wed, 1 May 2019 16:17:04 -0400
> > Simon Marchi <simark@simark.ca> wrote:
>
> > > 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.
>
> The non-contiguous address ranges support seems to target
> specifically the disassembly command? This does display 2 separate
> address ranges, both in GDB 8.2 and in the latest pretest of 8.3.
> But were those changes supposed to teach backtrace and stack frame
> reporting in general about multiple ranges? Because in that case
> GDB needs to solve the inverse problem: go from the address to the
> symbol.

There were four distinct problems that my non-contiguous address range
patch set addressed. As you say, one of them was disassembly of
functions with discontiguous ranges. But that work also addressed
problems with stepping, with breakpoint placement, and with display of
addresses. A brief discussion of these matters can be found here:

https://www.sourceware.org/ml/gdb-patches/2018-08/msg00541.html

It's possible that more needs to be done with display of addresses.
I'll need to look at it more closely to know for sure. It would help
me if there were a relatively small test case to look at. (It would
help even more if it could be reproduced on a GNU/Linux system.)

Kevin