This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v9 21/29] record-btrace: provide xfer_partial target method


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]