From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9852 invoked by alias); 10 Jul 2014 13:53:13 -0000 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 Received: (qmail 9783 invoked by uid 89); 10 Jul 2014 13:53:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 10 Jul 2014 13:53:07 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6ADr3uY006832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Jul 2014 09:53:03 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6ADr1IL030743; Thu, 10 Jul 2014 09:53:02 -0400 Message-ID: <53BE9ABD.7020608@redhat.com> Date: Thu, 10 Jul 2014 13:53:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Adrian Sendroiu , gdb-patches@sourceware.org Subject: Re: [PATCH] call observer_notify_new_objfile after the attach command References: <53BD4F45.4090000@redhat.com> <1404989787-18250-1-git-send-email-adrian.sendroiu@freescale.com> In-Reply-To: <1404989787-18250-1-git-send-email-adrian.sendroiu@freescale.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-07/txt/msg00205.txt.bz2 Thanks. Could you complete the patch according to the instructions at https://sourceware.org/gdb/wiki/ContributionChecklist, so it could be git am'ed/pushed? (explain the rationale in the commit log, ChangeLog, etc.) Adding a comment in extended_remote_post_attach explaining why that is done there would be good too. E.g., mention the case of no libraries and the program not changing. Please also add something like this above the new function: /* Implementation of the to_post_attach method. */ And, write an explicit NULL check: if (symfile_objfile != NULL) Thanks again, -- Pedro Alves On 07/10/2014 11:56 AM, Adrian Sendroiu wrote: > Thanks, I added a call to remote_check_symbols in the post_attach hook. > > Adrian > > From 0820f5ab475bd9e261e7be26dabbd30e5df60544 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Adrian=20=C8=98endroiu?= > Date: Thu, 10 Jul 2014 11:16:41 +0300 > Subject: [PATCH] call remote_check_symbols after attaching > > --- > gdb/remote.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/gdb/remote.c b/gdb/remote.c > index 3aa030c..8b438c7 100644 > --- a/gdb/remote.c > +++ b/gdb/remote.c > @@ -4484,6 +4484,13 @@ extended_remote_attach (struct target_ops *ops, const char *args, int from_tty) > extended_remote_attach_1 (ops, args, from_tty); > } > > +static void > +extended_remote_post_attach (struct target_ops *ops, int pid) > +{ > + if (symfile_objfile) > + remote_check_symbols(); > +} > + > > /* Check for the availability of vCont. This function should also check > the response. */ > @@ -11530,6 +11537,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya)."; > extended_remote_ops.to_mourn_inferior = extended_remote_mourn; > extended_remote_ops.to_detach = extended_remote_detach; > extended_remote_ops.to_attach = extended_remote_attach; > + extended_remote_ops.to_post_attach = extended_remote_post_attach; > extended_remote_ops.to_kill = extended_remote_kill; > extended_remote_ops.to_supports_disable_randomization > = extended_remote_supports_disable_randomization; >