From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 4/4] Skip .cold functions in search_minsyms_for_name
Date: Sun, 31 Jan 2021 19:06:13 +0100 [thread overview]
Message-ID: <AM8PR10MB47088EE020BEF431EA5F83EBE4B79@AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20210131170356.GR265215@embecosm.com>
On 1/31/21 6:03 PM, Andrew Burgess wrote:
> * Bernd Edlinger <bernd.edlinger@hotmail.de> [2021-01-31 10:13:54 +0100]:
>
>> When a function with the same name is also available,
>> that is preferred.
>>
>> The .cold function is not the external interface.
>>
>> Fixes 77f2120b200 ("Don't drop static function bp locations w/o
>> debug info")
>
> I assume that this last sentence means that there's a bug / oversight
> with this previous commit.
>
> You should explain what this issue with this commit is and how this
> commit fixes it. For contrast, notice that the commit you reference
> took ~200 lines to explain the change, while you've given us just 7.
> A good commit message makes reviewing this a lot easier.
>
Thanks for your review.
I'll add this to the commit message, hope it clarifies the patch:
The motivation for this patch, is that I became aware that the "real"
get_alias_set function (in gcc's cc1) had a two-PC breakpoint
location with gdb-9 but a three-PC breakpoint location with gdb-10.
The third breakpoint location was not an entry point but somewhere in the
error handling, which is named "get_alias_set.cold".
Bisection pointed to the above commit. Prior to this commit the
static "get_alias_set.cold" was ignored, since there is also global
get_alias_set function. Basically the previous behavior was ignore
any static function, when there is a global function with the same name.
The current behavior is to consider a static function and a global
function with the same name as different entities.
But a function named with ".cold" is not a real function at all.
It is just a wrapper for all the cold code paths in that function.
Therefore this patch checks if a function with the same name is
found and skip the ".cold" overload in that case.
Bernd.
prev parent reply other threads:[~2021-01-31 18:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-31 9:13 Bernd Edlinger
2021-01-31 17:03 ` Andrew Burgess
2021-01-31 18:06 ` Bernd Edlinger [this message]
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=AM8PR10MB47088EE020BEF431EA5F83EBE4B79@AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM \
--to=bernd.edlinger@hotmail.de \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/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