lkml.org 
[lkml]   [2019]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] scripts/gdb: fix debugging modules compiled with hot/cold partitioning
From
Date
> 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

\
 
 \ /
  Last update: 2019-10-31 10:57    [W:0.044 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site