public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Accessing array elements of optimised out VLA
@ 2018-08-01 21:13 Andrew Burgess
  2018-08-01 21:13 ` [PATCH 2/2] gdb: Check element of optimised out vla exists Andrew Burgess
  2018-08-01 21:13 ` [PATCH 1/2] gdb: Merge similar tests into a single test script Andrew Burgess
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Burgess @ 2018-08-01 21:13 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

I wondered what would happen if you asked GDB for an element from a
VLA that was optimised out.  Turns out the answer is that GDB reads
some random memory from GDB's own address space and gives you that..

...not doing that seemed better.

The first patch is a clean up to merge together 3 almost identical
test scripts.

Thanks,
Andrew

--

Andrew Burgess (2):
  gdb: Merge similar tests into a single test script
  gdb: Check element of optimised out vla exists

 gdb/ChangeLog                                      |  6 +++
 gdb/testsuite/ChangeLog                            | 11 ++++
 .../gdb.base/vla-optimized-out-o3-strict.exp       | 40 ---------------
 gdb/testsuite/gdb.base/vla-optimized-out-o3.exp    | 36 -------------
 gdb/testsuite/gdb.base/vla-optimized-out.exp       | 60 +++++++++++++++++++---
 gdb/valarith.c                                     |  7 ++-
 6 files changed, 74 insertions(+), 86 deletions(-)
 delete mode 100644 gdb/testsuite/gdb.base/vla-optimized-out-o3-strict.exp
 delete mode 100644 gdb/testsuite/gdb.base/vla-optimized-out-o3.exp

-- 
2.14.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-08-09 16:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 21:13 [PATCH 0/2] Accessing array elements of optimised out VLA Andrew Burgess
2018-08-01 21:13 ` [PATCH 2/2] gdb: Check element of optimised out vla exists Andrew Burgess
2018-08-02 19:01   ` Tom Tromey
2018-08-01 21:13 ` [PATCH 1/2] gdb: Merge similar tests into a single test script Andrew Burgess
2018-08-02 18:50   ` Tom Tromey
2018-08-09 11:05     ` Andrew Burgess
2018-08-09 16:04       ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).