From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20116 invoked by alias); 24 Feb 2012 13:56:51 -0000 Received: (qmail 20103 invoked by uid 22791); 24 Feb 2012 13:56:49 -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 13:56:33 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1ODuUlp008606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 24 Feb 2012 08:56:30 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1ODuSSE031818; Fri, 24 Feb 2012 08:56:29 -0500 Message-ID: <4F47970C.3090605@redhat.com> Date: Fri, 24 Feb 2012 14:10: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> <4F478E15.1080703@codesourcery.com> In-Reply-To: <4F478E15.1080703@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/msg00559.txt.bz2 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