From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86127 invoked by alias); 7 Nov 2019 07:50:50 -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 86110 invoked by uid 89); 7 Nov 2019 07:50:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=monitored, varobj, (unknown), Variable X-HELO: esa4.mentor.iphmx.com Received: from esa4.mentor.iphmx.com (HELO esa4.mentor.iphmx.com) (68.232.137.252) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Nov 2019 07:50:47 +0000 IronPort-SDR: hLSPoghmcbVoP+VLaQ/xa6WwxunTNTIlAoYwM6ZAJAFZyaMoYuq4eqiC4n613up+9uJkE3m57/ I+DFbSlZCCkfpxYZoH3y3PrMELtL9QgoTT0EiIbdsTWBE5PW8AXqUm6N53N6JGdbJQEcxNNIga kX7PrTJ5lShrnnhycgdD7J4DhdtyhCK85IjHsZ0saSL+Xh78GfTObKv+ewHjjKr2CjHnQqVqPh iu1SPwCxx+Yd3hRJnuhTMWINh2zoQWETTx0FhweEfEgzpQveolnrgMJXi4qU3DkHmFswu9AS9v Bsk= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 06 Nov 2019 23:50:46 -0800 IronPort-SDR: L2Q4NtdaCqNyfo6Y2pV0rQl5NbK+wHpJGQF0bIupN8CgQ2U2uDdPXT7GKN67Equfh6AEVaNFFp ql9ByKLIdUmqAhHtWz5QjDt+k6vCYjdD6ZckWzmvtm5TaCRwwErYMJw5Xaw/yn2X3dB1/UrfDt b3wOswlF+xO2vU6PYP1d73a/4eDePsUE85M2iP5apq44cJDpVCYw8RXxDe86Go6mQFaLJXmBHP E4lKbADaoCj/ooV187SbyxWne/U5qmDd2SpS46eGtxDIQNF3cPg3wPFVV1wyrVrVTrf6paI89N n64= Subject: Re: [PATCH 0/2] Improved variable object invalidation in GDB To: Luis Machado , References: <1571306592-24472-1-git-send-email-Saqlain_Raza@mentor.com> <081b0999-9402-046c-6ad8-25ef7e68e1c1@linaro.org> From: Saqlain Raza Message-ID: Date: Thu, 07 Nov 2019 07:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <081b0999-9402-046c-6ad8-25ef7e68e1c1@linaro.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Return-Path: saqlain_raza@mentor.com X-SW-Source: 2019-11/txt/msg00200.txt.bz2 Hi Luis, Thanks you very much for taking a look and sorry for the delay in response. > Before reviewing the patch itself, could you please expand, with more > detail, what the use case is for this particular fix? Can you please review the test-case submitted in https://sourceware.org/ml/gdb-patches/2019-10/msg00558.html if that somewhat clarifies the use-case ? For examining, changing or updating the values of expression, a GDB/MI Variable object of the expression using "-var-create" is made and later is checked for changes using "-var-update". Now, the problem is that the memory contents of a global symbol (being monitored via the expression) are changed but in response to "-var-update", it replies with the empty change list "changelist=[]" where as changes are now expected in change list (due to changed memory contents). This happens after a symbol file removal takes place. GDB traces for Variable object creation and update before symbol file is removed: 565,916 104-var-create --thread-group i1 - * ((NODE*)0xbc834)->next 565,924 %"Sending packet: $mbc838,4#35..." 565,924 %"Ack\n" 565,924 %"Packet received: 4cca0b00\n" 565,925 104^done,name="var14",numchild="3",value="0xbca4c ",type="struct NODE_\ STRUCT *",has_more="0" 573,325 141-var-update 1 var14 573,334 %"Sending packet: $mbc838,4#35..." 573,334 %"Ack\n" 573,334 %"Packet received: 4cca0b00\n" 573,334 141^done,changelist=[] GDB traces generated when symbol file has been removed: 589,422 184-var-update 1 var14 589,431 %"Sending packet: $mbc838,4#35..." 589,431 %"Ack\n" 589,431 %"Packet received: 64cc0b00\n" <----- Memory contents did change. 589,431 184^done,changelist=[]  <------- Changelist still empty. Thanks, Saqlain On 10/22/19 5:53 PM, Luis Machado wrote: > Hi, > > Before reviewing the patch itself, could you please expand, with more > detail, what the use case is for this particular fix? > > It seems to be the same patch Taimoor sent a while ago, so in order to > improve its chances of getting accepted, it would be nice to have a > bit more background. > > In particular, adding varobj bits to objfiles.[c] is a bit strange. > Varobj access seems to be restricted to core varobj implementations > and language support only. > > It may be a sign that something more fundamental is missing, like an > interface of some kind, an observer or a notification. > > Better understanding the use case will allow us to determine where/how > exactly this should be fixed. > > Luis > > On 10/17/19 7:03 AM, Raza, Saqlain wrote: >> Hi, >> This patch series improves variable object invalidation in GDB. >> >> This is a followup to the patch series submission made in >> https://sourceware.org/ml/gdb-patches/2015-04/msg00598.html . This >> problem still holds in the latest GDB master. >> >> Raza, Saqlain (2): >>    Fix varobj updation after symbol removal >>    Testsuite for varobj updation after symbol removal >> >>   gdb/ChangeLog                              |  13 ++ >>   gdb/objfiles.c                             |  19 ++ >>   gdb/testsuite/ChangeLog                    |  11 + >>   gdb/testsuite/gdb.mi/mi-var-invalidate.exp |  68 ++++++ >>   gdb/testsuite/gdb.mi/sym-file-lib.c        |  28 +++ >>   gdb/testsuite/gdb.mi/sym-file-loader.c     | 355 >> +++++++++++++++++++++++++++++ >>   gdb/testsuite/gdb.mi/sym-file-loader.h     | 101 ++++++++ >>   gdb/testsuite/gdb.mi/sym-file-main.c       |  86 +++++++ >>   gdb/varobj.c                               |  35 +++ >>   gdb/varobj.h                               |   4 + >>   10 files changed, 720 insertions(+) >>   create mode 100644 gdb/testsuite/gdb.mi/sym-file-lib.c >>   create mode 100644 gdb/testsuite/gdb.mi/sym-file-loader.c >>   create mode 100644 gdb/testsuite/gdb.mi/sym-file-loader.h >>   create mode 100644 gdb/testsuite/gdb.mi/sym-file-main.c >>