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

Pedro Alves
2012-02-24T09:24:31Z

On 02/24/2012 07:56 AM, Yao Qi wrote:
> On 02/24/2012 06:11 AM, Pedro Alves wrote:
>>>> @@ -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.
>>
>
> Why not a new solib_loaded observer, which is more accurate, IMO.

Because what we care about is whether new symbols have been loaded. Even if
the IPA was already loaded. E.g., do you "set debug-file-directory" to
point at the IPAs symbols. Also, that handles the case of an agent built
statically into the executable, instead of as a separate DSO.

--
Pedro Alves