This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v9 21/29] record-btrace: provide xfer_partial target method
- From: Pedro Alves <palves at redhat dot com>
- To: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- Cc: "jan dot kratochvil at redhat dot com" <jan dot kratochvil at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 20 Dec 2013 15:36:50 +0000
- Subject: Re: [PATCH v9 21/29] record-btrace: provide xfer_partial target method
- Authentication-results: sourceware.org; auth=none
- References: <1387471499-29444-1-git-send-email-markus dot t dot metzger at intel dot com> <1387471499-29444-22-git-send-email-markus dot t dot metzger at intel dot com> <52B34879 dot 4020905 at redhat dot com> <A78C989F6D9628469189715575E55B230AA3B990 at IRSMSX104 dot ger dot corp dot intel dot com>
On 12/20/2013 01:30 PM, Metzger, Markus T wrote:
>> -----Original Message-----
>> From: Pedro Alves [mailto:palves@redhat.com]
>> Sent: Thursday, December 19, 2013 8:27 PM
>> To: Metzger, Markus T
>> Cc: jan.kratochvil@redhat.com; gdb-patches@sourceware.org
>> Subject: Re: [PATCH v9 21/29] record-btrace: provide xfer_partial target
>> method
>>
>> On 12/19/2013 04:44 PM, Markus Metzger wrote:
>>
>> Also,
>>
>>> + /* Filter out requests that don't make sense during replay. */
>>> + if (!record_btrace_allow_memory_access &&
>> record_btrace_is_replaying ())
>>> + {
>>> + switch (object)
>>> + {
>>> + case TARGET_OBJECT_MEMORY:
>>> + case TARGET_OBJECT_RAW_MEMORY:
>>> + case TARGET_OBJECT_STACK_MEMORY:
>>> + {
>>
>> I don't think you answered my comment about this in the previous
>> series. I think you can't ever see TARGET_OBJECT_RAW_MEMORY or
>> TARGET_OBJECT_STACK_MEMORY here.
>
> If we ever end up seeing them, they will simply be forwarded to the
> target beneath without check. I think it's safer to leave them in.
> If you'd rather have them removed, I can do that, as well.
Please remove them. (Note how you'd already be missing
TARGET_OBJECT_CODE_MEMORY.) If targets ever saw those, we'd need
to update _all_ target's xfer_partial implementations. I see a
reference to TARGET_OBJECT_RAW_MEMORY somehow ended up in
record-full.c. We should remove that. As long as targets shouldn't
see those, random references around the codebase just add to confusion
(the reader needs to wonder why are those only handled in some
targets, for no good reason).
--
Pedro Alves