Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, simark@simark.ca
Subject: Re: The 'cold' function attribute and GDB
Date: Mon, 06 May 2019 16:24:00 -0000	[thread overview]
Message-ID: <20190506092438.18ce3772@f29-4.lan> (raw)
In-Reply-To: <83imunk372.fsf@gnu.org>

On Mon, 06 May 2019 18:33:37 +0300
Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Sun, 5 May 2019 13:04:03 -0700
> > From: Kevin Buettner <kevinb@redhat.com>
> > Cc: Eli Zaretskii <eliz@gnu.org>, simark@simark.ca
> > 
> > My patch is below.  If it works for you and the approach seems sound,
> > I'll work on a test case which doesn't depend on gcc placing the
> > .cold section after the entry pc.  
> 
> The patch fixes the backtrace, thanks.

Thanks for testing it.  I'll begin working on a test case.

> The output from "info line" still references the .cold symbol,
> though.  I think this was not so on GNU/Linux?  Is it also by sheer
> luck, because of the order of the 'cold' symbols in the executable?

The address printed by "info line" is constructed by
build_address_symbolic in printcmd.c.  It contains code similar
to that in find_frame_funname.

You recall correctly - GNU/Linux did not display the .cold symbol when
using the "info line" command.  The GNU/Linux executable that I
examined does have .cold symbols, but (at least at the examples I saw)
placed them at addresses lower than the corresponding function.

[ .cold symbols at lower addresses is also an interesting case, causing
all sorts of problems when I first started looking at the non-contiguous
range problem.  GDB had assumed that the lowest address might also
be a start address. ]

I'll amend my patch to also  address the "info line" problem too.
(Though for that one, it doesn't bother my quite as much to see the
minimal symbol.)

Kevin


  reply	other threads:[~2019-05-06 16:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01 18:59 Eli Zaretskii
2019-05-01 20:17 ` Simon Marchi
2019-05-02  2:51   ` Kevin Buettner
2019-05-02  6:59     ` Eli Zaretskii
2019-05-02  7:26       ` Kevin Buettner
2019-05-02 15:27         ` Eli Zaretskii
2019-05-02 15:59           ` Kevin Buettner
2019-05-02 16:46             ` Eli Zaretskii
2019-05-02 18:08               ` Simon Marchi
2019-05-02 18:47                 ` Eli Zaretskii
2019-05-02 18:55                   ` Kevin Buettner
2019-05-02 19:32                     ` Eli Zaretskii
2019-05-02 19:51                       ` Kevin Buettner
2019-05-02  7:06     ` Eli Zaretskii
2019-05-02  7:38       ` Kevin Buettner
2019-05-02 15:23         ` Eli Zaretskii
2019-05-02 15:56           ` Kevin Buettner
2019-05-02 16:43             ` Eli Zaretskii
2019-05-02 18:25           ` Kevin Buettner
2019-05-02 18:52             ` Eli Zaretskii
2019-05-02 19:13               ` Kevin Buettner
2019-05-02 19:28                 ` Eli Zaretskii
2019-05-02 19:45                   ` Kevin Buettner
2019-05-02 19:56                     ` Eli Zaretskii
2019-05-02 23:30                       ` Kevin Buettner
2019-05-04  8:30                         ` Eli Zaretskii
2019-05-05 20:04                           ` Kevin Buettner
2019-05-06 15:33                             ` Eli Zaretskii
2019-05-06 16:24                               ` Kevin Buettner [this message]
2019-05-02 15:17       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190506092438.18ce3772@f29-4.lan \
    --to=kevinb@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox