From patchwork Thu Jul 10 10:56:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Sendroiu X-Patchwork-Id: 1996 Received: (qmail 32657 invoked by alias); 10 Jul 2014 10:57:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 32648 invoked by uid 89); 10 Jul 2014 10:57:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: na01-bn1-obe.outbound.protection.outlook.com Received: from mail-bn1lp0144.outbound.protection.outlook.com (HELO na01-bn1-obe.outbound.protection.outlook.com) (207.46.163.144) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 10 Jul 2014 10:57:40 +0000 Received: from BN3PR0301CA0058.namprd03.prod.outlook.com (25.160.152.154) by BLUPR03MB327.namprd03.prod.outlook.com (10.141.48.18) with Microsoft SMTP Server (TLS) id 15.0.980.8; Thu, 10 Jul 2014 10:57:38 +0000 Received: from BN1BFFO11FD057.protection.gbl (2a01:111:f400:7c10::1:136) by BN3PR0301CA0058.outlook.office365.com (2a01:111:e400:401e::26) with Microsoft SMTP Server (TLS) id 15.0.985.8 via Frontend Transport; Thu, 10 Jul 2014 10:57:37 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD057.mail.protection.outlook.com (10.58.145.12) with Microsoft SMTP Server (TLS) id 15.0.980.11 via Frontend Transport; Thu, 10 Jul 2014 10:57:37 +0000 Received: from fsr-ub1264-100.ea.freescale.net (fsr-ub1264-100.ea.freescale.net [10.171.74.130]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s6AAvZRs004044; Thu, 10 Jul 2014 03:57:36 -0700 From: Adrian Sendroiu To: , Subject: Re: [PATCH] call observer_notify_new_objfile after the attach command Date: Thu, 10 Jul 2014 13:56:26 +0300 Message-ID: <1404989787-18250-1-git-send-email-adrian.sendroiu@freescale.com> In-Reply-To: <53BD4F45.4090000@redhat.com> References: <53BD4F45.4090000@redhat.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(199002)(189002)(164054003)(81542001)(107886001)(77982001)(99396002)(50226001)(105606002)(92566001)(95666004)(33646001)(104166001)(83322001)(4396001)(19580395003)(85852003)(50986999)(92726001)(106466001)(68736004)(83072002)(104016003)(19580405001)(20776003)(74502001)(62966002)(87286001)(6806004)(107046002)(50466002)(46102001)(21056001)(102836001)(88136002)(77156001)(76176999)(48376002)(26826002)(36756003)(76482001)(47776003)(84676001)(44976005)(74662001)(64706001)(97736001)(87936001)(80022001)(79102001)(89996001)(81342001)(31966008)(93916002)(85306003)(86362001); DIR:OUT; SFP:; SCL:1; SRVR:BLUPR03MB327; H:tx30smr01.am.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 0268246AE7 Received-SPF: Fail (: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=adrian.sendroiu@freescale.com; X-OriginatorOrg: freescale.com 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;