From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PING][PATCH] [gdb/tdep] Use cached breakpoint kind in breakpoint_kind
Date: Tue, 6 Aug 2024 09:17:27 +0200 [thread overview]
Message-ID: <e7a8e193-fe23-4662-ae18-96dc8d4a2a8b@suse.de> (raw)
In-Reply-To: <d1186e47-4383-4bcf-9ff1-88a45571a5b5@simark.ca>
On 8/5/24 19:08, Simon Marchi wrote:
> On 8/5/24 12:00 PM, Tom de Vries wrote:
>> I've given this patch some more thought, and I think I have come up
>> with a counter example.
>>
>> Say you have a breakpoint kind that is different depending on the
>> alignment, one kind for "addr & 0x4 == 0x0" and another kind for "addr
>> & 0x4 == 0x2".
>>
>> Then when relocating the exec, the kind might change, but due to the
>> caching introduced by this patch, we might be incorrectly using the
>> same kind as before the relocation.
>
> Did you see this kind of relocation in practice? Typically, executables
> get relocated with an offset that is a multiple of the page size, or
> something big like that, so it wouldn't affect alignment in such way.
It's a theoretical example, so it's easy to adapt it be affected by
relocation with page size multiples, but it remains theoretical.
Thanks,
- Tom
prev parent reply other threads:[~2024-08-06 7:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 14:38 [PATCH] " Tom de Vries
2024-07-31 11:26 ` [PING][PATCH] " Tom de Vries
2024-08-05 16:00 ` Tom de Vries
2024-08-05 17:08 ` Simon Marchi
2024-08-06 7:17 ` Tom de Vries [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=e7a8e193-fe23-4662-ae18-96dc8d4a2a8b@suse.de \
--to=tdevries@suse.de \
--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