Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] memory monitor on pointer variable

Currently, when you add a memory monitor as an _expression_, in the memory view,
DSF stores the value of that _expression_ and the label (the _expression_ itself).  That memory
address is fixed and is not updated.  In fact, if you re-launch, your 'my_ptr' monitor
will still show the memory address that you were showing in the previous launch,
even if the _expression_ 'my_ptr' is currently completely different.
I don't like this myself, but I wonder if there isn't a reason behind it.
For example, maybe the user expects a memory monitor to be fixed so as
to look at the same memory all the time.  (If that is the case, maybe we
should show the absolute addres instead of the _expression_ as the monitor).
I'm curious to know if more experienced people have an explanation.
Could be a behavior based on the platform even...
I think there is room for improvement there, at least for the user-friendliness part.


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Harish Dewan
Sent: Monday, January 23, 2012 7:06 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] memory monitor on pointer variable

Hi All,
I have a question regarding memory view.
Put memory monitor on pointer variable , it does not updates its memory address when we step,
consider a simple program,

int main()

int i=100,*my_ptr,x=5,a=3,b=4,c=5,d=6;


return 0;

if I add memory monitor on 'my_ptr'  ,  say address while I planted memory monitor my_ptr was at address 0xe8e8e8e8
now when I step, address of 'my_ptr' changes but in memory view it does not updates.
But if I add another memory monitor at 'my_ptr' it will show correct address.

so is this the desired behavior or is it a bug.

Harish Dewan
Tensilica India

Back to the top