Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-debug-dev] hack in CVariable.dispose()

John,

This is a good example of gdb-ism in the CDT code. I believe that
ICDILocalVariable (as well as ICDIGlobalVariable) has been added later
than that code was written. I've checked the code, it should be fine to
overwrite dispose for the local variables only.
Moreover, I have tried to allow the disposal of var-objects in gdb/mi
and it seems to work fine.

Mikhail 
-----Original Message-----
From: cdt-debug-dev-bounces@xxxxxxxxxxx
[mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of John Cortell
Sent: 05 December 2006 14:21
To: CDT Debug developers list
Subject: RE: [cdt-debug-dev] hack in CVariable.dispose()

Mikhail, that would not leave intact the existing behavior for all CDI
implementations, and you indicated that the adjustment should not "break
other implementations". I interpreted that to mean more than gdb/mi. But
if you think it's safe to preserve the behavior in only gdb/mi, then
I'll certainly follow through with your recommendation. 
Again, not knowing why the logic is what it is, I can't make such a
judgment call.

But, how about global variables? I'd have to check, but I'm wondering if
they implement ICDILocalVariable.

John

At 07:33 AM 12/5/2006, Mikhail Khodjaiants wrote:
>John,
>
>Actually, there is a very simple solution. The gdb/mi implementation of

>ICDILocalVariable should handle this, which is in this case to ignore 
>the dispose call.
>
>Mikhail
>
>-----Original Message-----
>From: cdt-debug-dev-bounces@xxxxxxxxxxx 
>[mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of John Cortell
>Sent: 05 December 2006 13:11
>To: CDT Debug developers list
>Subject: RE: [cdt-debug-dev] hack in CVariable.dispose()
>
>The only solution that I can be certain won't break other 
>implementations is to conditionally avoid the questionable logic using 
>an ITargetConfigurationX check. I'll plan to do that.
>
>John
>
>At 05:18 AM 12/5/2006, Mikhail Khodjaiants wrote:
> >John,
> >
> >I understand your frustration, but that's a disadvantage of having 
> >the common source base for many platforms. Regarding this particular 
> >problem, major changes had been applied to the code related to 
> >variables and registers when we were trying to fix the mentioned 
> >problem. It was done in the very short time (1 or 2 days) and we 
> >didn't
>
> >have a time to document it.
> >It is also possible that I am mistaking it with 
> >https://bugs.eclipse.org/bugs/show_bug.cgi?id=166054.
> >Unfortunately I am very busy right now, but I'll try to find a time 
> >to look at it. The problem is that sometimes the behaviour is 
> >different for different platforms.
> >But if you have a solution that doesn't break other implementations, 
> >please, go ahead and apply it.
> >
> >Mikhail
> >
> >-----Original Message-----
> >From: cdt-debug-dev-bounces@xxxxxxxxxxx 
> >[mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of John Cortell
> >Sent: 04 December 2006 19:44
> >To: CDT Debug developers list
> >Subject: RE: [cdt-debug-dev] hack in CVariable.dispose()
> >
> >Hm. Well its unsettling that we have a hack in the code with no 
> >useful explanation along side it, and thus no reasonable course of 
> >action to correct it. Our debugger isn't gdb/mi based, so while our 
> >correction has been validated thoroughly with our debugger, it 
> >appears we're going
>
> >to have to indefinitely keep this as a private/Freescale change, and 
> >such discrepancies are a pain when it comes to moving up to a newer 
> >CDT. If you or Alain end up remembering why that hack was put in the 
> >code, please let me know so we can revisit this.
> >
> >John
> >
> >
> >At 12:19 PM 12/4/2006, Mikhail Khodjaiants wrote:
> > >John,
> > >
> > >The mapping between CVariables and var-objects in the gdb/mi 
> > >implementation is very sensitive area. I am not sure but this issue

> > >may
> >
> > >be related to the changes that Alain and I made to fix the problem 
> > >with
> >
> > >the registers update when switching between stack frames and
threads.
> > >The changes in this area need very good regression testing for
>gdb/mi.
> > >
> > >Mikhail
> > >
> > >
> > >-----Original Message-----
> > >From: cdt-debug-dev-bounces@xxxxxxxxxxx 
> > >[mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of John 
> > >Cortell
> > >Sent: 04 December 2006 17:19
> > >To: CDT Debug developers list
> > >Subject: [cdt-debug-dev] hack in CVariable.dispose()
> > >
> > >There is a comment at the beginning of CVariable.dispose() that
says:
> > >
> > >         // Hack: do not destroy local variables
> > >
> > >Someone here is working on fixing leaks that have been detected in 
> > >a debug session of our product, and CVariable.dispose() is part of 
> > >the problem.
> > >
> > >John
> > >
> > >_______________________________________________
> > >cdt-debug-dev mailing list
> > >cdt-debug-dev@xxxxxxxxxxx
> > >https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
> > >
> > >--
> > >IMPORTANT NOTICE: The contents of this email and any attachments 
> > >are confidential and may also be privileged. If you are not the 
> > >intended recipient, please notify the sender immediately and do not

> > >disclose the
> >
> > >contents to any other person, use it for any purpose, or store or 
> > >copy the information in any medium.  Thank you.
> > >
> > >
> > >_______________________________________________
> > >cdt-debug-dev mailing list
> > >cdt-debug-dev@xxxxxxxxxxx
> > >https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
> >
> >_______________________________________________
> >cdt-debug-dev mailing list
> >cdt-debug-dev@xxxxxxxxxxx
> >https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
> >
> >--
> >IMPORTANT NOTICE: The contents of this email and any attachments are 
> >confidential and may also be privileged. If you are not the intended 
> >recipient, please notify the sender immediately and do not disclose 
> >the
>
> >contents to any other person, use it for any purpose, or store or 
> >copy the information in any medium.  Thank you.
> >
> >
> >_______________________________________________
> >cdt-debug-dev mailing list
> >cdt-debug-dev@xxxxxxxxxxx
> >https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>
>_______________________________________________
>cdt-debug-dev mailing list
>cdt-debug-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>
>--
>IMPORTANT NOTICE: The contents of this email and any attachments are 
>confidential and may also be privileged. If you are not the intended 
>recipient, please notify the sender immediately and do not disclose the

>contents to any other person, use it for any purpose, or store or copy 
>the information in any medium.  Thank you.
>
>
>_______________________________________________
>cdt-debug-dev mailing list
>cdt-debug-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev

_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev

-- 
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.




Back to the top