linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>,
	linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>
Subject: Re: [PATCH] scripts/gdb: fix debugging modules compiled with hot/cold partitioning
Date: Thu, 31 Oct 2019 10:56:42 +0100	[thread overview]
Message-ID: <565ED332-3D0E-4741-BB82-3E82371C7054@linux.ibm.com> (raw)
In-Reply-To: <130e31f0-ce38-77cb-58a9-cedf3b0f8113@siemens.com>

> Am 30.10.2019 um 19:29 schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> 
> On 28.10.19 16:27, Ilya Leoshkevich wrote:
>> gcc's -freorder-blocks-and-partition option makes it group frequently
>> and infrequently used code in .text.hot and .text.unlikely sections
>> respectively. At least when building modules on s390, this option is
>> used by default.
>> 
>> gdb assumes that all code is located in .text section, and that .text
>> section is located at module load address. With such modules this is no
>> longer the case: there is code in .text.hot and .text.unlikely, and
>> either of them might precede .text.
>> 
>> Fix by explicitly telling gdb the addresses of code sections.
>> 
>> It might be tempting to do this for all sections, not only the ones in
>> the white list. Unfortunately, gdb appears to have an issue, when telling
>> it about e.g. loadable .note.gnu.build-id section causes it to think that
>> non-loadable .note.Linux section is loaded at address 0, which in turn
>> causes NULL pointers to be resolved to bogus symbols. So keep using the
>> white list approach for the time being.
> 
> Did you report this to gdb?

Yes: https://sourceware.org/bugzilla/show_bug.cgi?id=25152

Best regards,
Ilya


      reply	other threads:[~2019-10-31  9:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 15:27 [PATCH] scripts/gdb: fix debugging modules compiled with hot/cold partitioning Ilya Leoshkevich
2019-10-30 18:29 ` Jan Kiszka
2019-10-31  9:56   ` Ilya Leoshkevich [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=565ED332-3D0E-4741-BB82-3E82371C7054@linux.ibm.com \
    --to=iii@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kbingham@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).