1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-20 07:25:23 +02:00
cdt/dsf-gdb
Simon Marchi 9462c1db24 Bug 399494 - Consider all variable objects as not complex
There are cases where we consider some variables as complex when they
are not.  In particular, if a pointer is declared using a typedef, is
will be considered complex with the current code.  This is because it
has a child (the pointed value), but CDT doesn't know it's a pointer.

One of the consequence is that we assume the value is not modifiable.
Therefore, we won't update its value when it changes, and we won't let
the user edit it.

Initially I thought it would be safe to assume that variables with two
or more children are complex, but pointers to structures have as many
children as the structure has fields.  Therefore, a pointer to a
structure, declared as a typedef, will still be wrongfully considered as
complex.  Since there's no easy way to know for sure whether a variable
is complex, just assume everything is simple.

I added a test to verify that the value of a pointer declared using a
typedef will update correctly in CDT as it changes in the program.
There are two distinct scenarios, pointers that are variables and
pointers that are fields of structures.  Instead of adding content to
testUpdateOfPointer, I decided to make a similar test method,
testUpdateOfPointerTypedef.  The original test method was getting too
long and was difficult to follow.  I think it's good to keep them short
and focused.

Another test verifies that the same kind of pointer can properly be
written/modified by the user.

Change-Id: If43b3b6e49cd4a20ea929c2a096745a32de14cd0
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-04-28 10:59:24 -04:00
..
org.eclipse.cdt.dsf.gdb Bug 399494 - Consider all variable objects as not complex 2017-04-28 10:59:24 -04:00
org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui releng: Make use of Tycho POM-less functionality 2017-02-13 23:19:56 -04:00
org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui.tests releng: Make use of Tycho POM-less functionality 2017-02-13 23:19:56 -04:00
org.eclipse.cdt.dsf.gdb.tests Bug 449104: Enhance Register Grouping for multi processes 2017-02-28 15:41:10 -05:00
org.eclipse.cdt.dsf.gdb.ui Bug 515653: Fix SWT disposed exception 2017-04-24 07:35:06 -04:00
org.eclipse.cdt.examples.dsf.gdb releng: Make use of Tycho POM-less functionality 2017-02-13 23:19:56 -04:00
org.eclipse.cdt.gnu.dsf-feature releng: Make use of Tycho POM-less functionality 2017-02-13 23:19:56 -04:00
org.eclipse.cdt.gnu.multicorevisualizer-feature releng: Make use of Tycho POM-less functionality 2017-02-13 23:19:56 -04:00
org.eclipse.cdt.tests.dsf.gdb Bug 399494 - Consider all variable objects as not complex 2017-04-28 10:59:24 -04:00
pom.xml releng: Make use of Tycho POM-less functionality 2017-02-13 23:19:56 -04:00