This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/2] Forward VALUE_LVAL for STRUCT/STRUCT-PTR expressions


These two commits fix some regressions relating to expression
evaluation involving operations of type STRUCTOP_PTR and
STRUCTOP_STRUCT.

The regressions were introduced in commit ac1ca910d74d, where values
with an lval type of not_lval are created in 3 places.  A later
commit, 2520f728b710, fixed one of these places, setting an
appropriate lval value, but left the other two.  These two commits fix
the last two occurences.

I've split the changes into two patches.  The first change is in
generic expression evaluation, and is covered by the new tests I've
added in that patch.  The tests will also cover the case fixed by
commit 2520f728b710 as well.

The second patch fixes what I am convinced will be a similar case in
OpenCL code.  However, I don't have access to an OpenCL compiler at
the moment, so I have not confirmed the bug, nor have I written any
tests.  If the second patch is rejected as untested that's fine, or if
someone with an OpenCL compiler would like to write a test, that would
be great.

Thanks,
Andrew

---

Andrew Burgess (2):
  gdb: Forward VALUE_LVAL when avoiding side effects for STRUCTOP_PTR
  gdb: Forward VALUE_LVAL when avoiding side effects for STRUCTOP_STRUCT

 gdb/ChangeLog                     | 12 ++++++
 gdb/eval.c                        |  2 +-
 gdb/opencl-lang.c                 |  2 +-
 gdb/testsuite/ChangeLog           |  5 +++
 gdb/testsuite/gdb.base/whatis.c   |  8 ++--
 gdb/testsuite/gdb.base/whatis.exp | 83 +++++++++++++++++++++++++++++++++++++++
 6 files changed, 106 insertions(+), 6 deletions(-)

-- 
2.5.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]