From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42438 invoked by alias); 3 Dec 2019 09:46:27 -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 42427 invoked by uid 89); 3 Dec 2019 09:46:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=replies, monitored, updation, examining 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; Tue, 03 Dec 2019 09:46:25 +0000 IronPort-SDR: sDOdtYPyVqhlKIa0+9SZK6KL+nsCOY/J+MV40Wudxw8eYmYkY6+gUVOXaKmYiNYiT/R4t0ngr7 vJHSXFc90JUJ0sYGIpX1ap54EVg3Bd6vhkjXGZvFKgeO1GNkdp/uwVlIw7QJSizzTuye9Eywfy jH16JQNzbI2Ny7xjAJYOGJVjJGVkBzoUQfxstT5u6wJg/ACjadknRnE/3qyyPcxl/r6O81B00g j+ghhLpcX+FUCZ7pAaEtkF3bLep1nrC1zDq835wt6sZgZZvfaYvzzXiXG4hg5Q2HZVLepD7SyZ K70= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 03 Dec 2019 01:46:23 -0800 IronPort-SDR: 4qnDHl7hJwpEB4nz+VYdCX5ZbOtezWKoVISCxwAd7lqcR3EAILNQz0f53dNPdoqEex6sQnelP/ bS29J5TIgspoPcgeVAijn/dVRMPDT4CFKbvtNap0eobCHTLE6BI7tg80UtUehnrYgCUhRWhIFN ARf7Ov800sVqb31GNuuulflHv6X6dgecKglDs4KQbJ2p9T6JKg1dR7Elq3HnlskHHOjZcv3AGe DpGxkVHeEASNThdh/hxGHPKpgfySyuk5v8VEznYaCTNvRFsswtiLPzQQDNYoSW5elHa9JmFEhC wuA= Subject: Re: [PING][PATCH 0/2] Improved variable object invalidation in GDB From: Saqlain Raza To: References: <1571306592-24472-1-git-send-email-Saqlain_Raza@mentor.com> <081b0999-9402-046c-6ad8-25ef7e68e1c1@linaro.org> Message-ID: <93d315d7-2234-09d5-92c2-e04fcb9031d9@mentor.com> Date: Tue, 03 Dec 2019 09:46:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Return-Path: saqlain_raza@mentor.com X-SW-Source: 2019-12/txt/msg00083.txt.bz2 Ping ! For reference, the patch is available in: https://sourceware.org/ml/gdb-patches/2019-10/msg00557.html Testcase: https://sourceware.org/ml/gdb-patches/2019-10/msg00558.html Thanks, Saqlain On 11/7/19 12:50 PM, Saqlain Raza wrote: > 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 >>>