Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Saqlain Raza <saqlain_raza@mentor.com>
To: Luis Machado <luis.machado@linaro.org>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH 0/2] Improved variable object invalidation in GDB
Date: Thu, 07 Nov 2019 07:50:00 -0000	[thread overview]
Message-ID: <d997ee80-6749-d34d-df73-b0813ef84d71@mentor.com> (raw)
In-Reply-To: <081b0999-9402-046c-6ad8-25ef7e68e1c1@linaro.org>

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 
<Control_Array+536>",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
>>


  reply	other threads:[~2019-11-07  7:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 10:03 Raza, Saqlain
2019-10-17 10:03 ` [PATCH 2/2] Testsuite for varobj updation after symbol removal Raza, Saqlain
2019-10-22  6:47   ` [PING][PATCH " Saqlain Raza
2019-10-17 10:03 ` [PATCH 1/2] Fix " Raza, Saqlain
2019-10-22  6:46   ` [PING][PATCH " Saqlain Raza
2019-10-22  6:45 ` [PING][PATCH 0/2] Improved variable object invalidation in GDB Saqlain Raza
2019-10-22 12:54 ` [PATCH " Luis Machado
2019-11-07  7:50   ` Saqlain Raza [this message]
2019-12-03  9:46     ` [PING][PATCH " Saqlain Raza
  -- strict thread matches above, loose matches on Subject: below --
2015-04-16  3:33 [PATCH " Taimoor Mirza
2014-06-27 10:14 Taimoor Mirza
2014-07-13  7:49 ` Taimoor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d997ee80-6749-d34d-df73-b0813ef84d71@mentor.com \
    --to=saqlain_raza@mentor.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox