From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18941 invoked by alias); 24 Feb 2012 09:24:31 -0000 Received: (qmail 18909 invoked by uid 22791); 24 Feb 2012 09:24:30 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Feb 2012 09:24:15 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1O9OCbj000407 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 24 Feb 2012 04:24:12 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q1O9OAOY003425; Fri, 24 Feb 2012 04:24:11 -0500 Message-ID: <4F47573A.9020408@redhat.com> Date: Fri, 24 Feb 2012 10:47:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 8/9] impl of use_agent and can_use_agent in linux-nat. References: <1329447300-18841-1-git-send-email-yao@codesourcery.com> <1329447300-18841-9-git-send-email-yao@codesourcery.com> <4F46B981.5070108@redhat.com> <4F474296.7010201@codesourcery.com> In-Reply-To: <4F474296.7010201@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00535.txt.bz2 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