Re: [PATCH 8/9] impl of use_agent and can_use_agent in linux-nat.

Pedro Alves
2012-02-24T13:56:51Z

On 02/24/2012 01:18 PM, Yao Qi wrote:
> On 02/24/2012 06:11 AM, Pedro Alves wrote:
>>>> +
>>>> + t->to_use_agent = linux_child_use_agent;
>>>> + t->to_can_use_agent = linux_child_can_use_agent;
>>>> }
>> Are these ever going to be different on other native targets? We could
>> put them in inf-child.c instead, to get them all covered at once.
>>
>
> No, they are the same on other native targets. New target_ops hooks
> functions are moved to inf-child.c.
>
>>>> @@ -925,7 +926,10 @@ solib_add (char *pattern, int from_tty,
>>>> }
>>>>
>>>> if (loaded_any_symbols)
>>>> - breakpoint_re_set ();
>>>> + {
>>>> + breakpoint_re_set ();
>>>> + agent_look_up_symbols ();
>> The right place to do this is in a new new_objfile observer.
>>
>
> Done. Note that, in new_objfile observer, I pass OBJFILE to
> agent_look_up_symbols as one parameter, so patch 1/9 will be updated.

If the parameter didn't make sense in patch 1, but it makes sense in
patch 8, then do the necessary adjustments to the code in patch 8,
as if patch 1 was already applied. IOW, earlier patches
on a series should stand on their own as much as possible. Yet IOW,
if nothing uses the parameter in patch 1, then adding the parameter
to the function should be done patch 8, where uses are added.

--
Pedro Alves