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,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>
Subject: Re: [PATCH] scripts/gdb: fix debugging modules on s390
Date: Tue, 15 Oct 2019 17:43:18 +0200 [thread overview]
Message-ID: <EC1E8F36-C374-4130-9841-CC35F557B7CE@linux.ibm.com> (raw)
In-Reply-To: <356384d7-d14f-2c9d-1c13-3d96e75e1727@siemens.com>
> Am 15.10.2019 um 17:21 schrieb Jan Kiszka <jan.kiszka@siemens.com>:
>
>> @@ -113,6 +113,12 @@ lx-symbols command."""
>> if module_file:
>> gdb.write("loading @{addr}: {filename}\n".format(
>> addr=module_addr, filename=module_file))
>> + if utils.is_target_arch('s390'):
>> + # Module text is preceded by PLT stubs on s390.
>> + module_arch = module['arch']
>> + plt_offset = int(module_arch['plt_offset'])
>> + plt_size = int(module_arch['plt_size'])
>> + module_addr = hex(int(module_addr, 0) + plt_offset + plt_size)
>
> Shouldn't we report the actual address above, ie. reorder this tuning
> with the gdb.write?
That's a tough question. I thought about this, and the argument for
showing the fixed up address is that if someone does the math with
symbol offsets from e.g. objdump, the result will be consistent with
what gdb shows.
On the other hand side, why would anyone do this? that's exactly what
this gdb script is for. So showing the actual address at which the
memory was allocated gives the user some additional information, and is
also consistent with what cat /proc/modules would show.
At the end of the day, I don't have a strong opinion on this, so if you
think it's better to show the fixed up address, I'll send a v2.
Best regards,
Ilya
next prev parent reply other threads:[~2019-10-15 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 10:53 [PATCH] scripts/gdb: fix debugging modules on s390 Ilya Leoshkevich
2019-10-15 15:21 ` Jan Kiszka
2019-10-15 15:43 ` Ilya Leoshkevich [this message]
2019-10-17 7:05 ` Jan Kiszka
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=EC1E8F36-C374-4130-9841-CC35F557B7CE@linux.ibm.com \
--to=iii@linux.ibm.com \
--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