binutils-gdb/gdb/testsuite/gdb.mi
Luis Machado 70795c525e In a couple functions (type_update_when_use_rtti_test and
skip_type_update_when_not_use_rtti_test) the testcase assumes an
uninitialized object has a specific type. In particular, 'ptr' and
's'.

In reality the compiler is free to do what it wants with that
uninitialized variable, even initialize it beforehand with the future
assignment's value.  This is exactly what happens on some targets.

ptr should have type 'Base *', but it really has type 'Derived *'
because it is already initialized (earlier) by the compiler. The same
thing happens to 's'.

The following patch addresses this by explicitly initializing those
variables so the compiler doesn't optimize their assignments and GDB
can print their correct values.

2014-06-17  Luis Machado  <lgustavo@codesourcery.com>

	* gdb.mi/mi-var-rtti.cc (type_update_when_use_rtti_test):
	Initialize ptr and S explicitly.
	(skip_type_update_when_not_use_rtti_test): Likewise.
2014-06-17 10:42:23 +01:00
..
ChangeLog-1999-2003
Makefile.in 2013-05-21 Hui Zhu <hui@codesourcery.com> 2013-05-21 04:18:55 +00:00
array.f Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
basics.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dw2-ref-missing-frame-func.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dw2-ref-missing-frame-main.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dw2-ref-missing-frame.S Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
dw2-ref-missing-frame.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gdb669.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gdb680.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gdb701.c
gdb701.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gdb792.cc
gdb792.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
gdb2549.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-async.exp enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
mi-basics.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-break.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi-breakpoint-changed.exp PR mi/15806: Fix quoting of async events 2014-06-05 17:59:46 -04:00
mi-catch-load-so.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-catch-load.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-catch-load.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-cli.exp PR gdb/13860 - Make MI sync vs async output (closer to) the same. 2014-05-29 13:09:45 +01:00
mi-cmd-param-changed.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-condbreak-call-thr-state-mt.c PR15693 - Fix spurious *running events, thread state, dprintf-style call 2014-05-29 12:27:01 +01:00
mi-condbreak-call-thr-state-st.c PR15693 - Fix spurious *running events, thread state, dprintf-style call 2014-05-29 12:27:01 +01:00
mi-condbreak-call-thr-state.c PR15693 - Fix spurious *running events, thread state, dprintf-style call 2014-05-29 12:27:01 +01:00
mi-condbreak-call-thr-state.exp PR15693 - Fix spurious *running events, thread state, dprintf-style call 2014-05-29 12:27:01 +01:00
mi-console.c gdb.mi/mi-console.c, gdb.mi/mi-stack.c: Remove local emacs variables defining change-log-default-name. 2013-10-29 13:48:25 +00:00
mi-console.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-disassemble.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-dprintf.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-dprintf.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi-eval.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-file-transfer.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-file.exp Fix mi-file.exp fails on remote host 2014-05-14 20:11:53 +08:00
mi-fill-memory.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-fullname-deleted.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-hack-cli.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-i-cmd.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-info-os.exp gdb.mi/mi-info-os.exp: Fix cross-debugger testing 2014-01-09 19:57:13 +00:00
mi-inheritance-syntax-error.cc
mi-inheritance-syntax-error.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-language.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-logging.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-memory-changed.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-nonstop-exit.exp enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
mi-nonstop.exp enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
mi-ns-stale-regcache.exp enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
mi-nsintrall.exp enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
mi-nsmoribund.exp enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
mi-nsthrexec.exp enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
mi-pending.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-pending.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-pendshr.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-pthreads.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-read-memory.c
mi-read-memory.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-record-changed.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-reg-undefined.S Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-reg-undefined.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-reg-undefined.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-regs.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-return.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-reverse.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi-simplerun.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi-solib.exp PR gdb/13860: don't lose '-interpreter-exec console EXECUTION_COMMAND''s output in async mode. 2014-05-21 23:17:23 +01:00
mi-stack.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-stack.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-start.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-start.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-stepi.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-stepn.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-stepn.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi-syn-frame.c
mi-syn-frame.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi-undefined-cmd.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-until.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi-var-block.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-var-child-f.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-var-child.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-var-child.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-var-cmd.exp Fix for PR mi/15863 2014-06-16 11:38:19 -07:00
mi-var-cp.cc Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-var-cp.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi-var-create-rtti.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-var-create-rtti.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-var-display.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi-var-invalidate.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-var-rtti.cc In a couple functions (type_update_when_use_rtti_test and 2014-06-17 10:42:23 +01:00
mi-var-rtti.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-vla-c99.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi-watch-nonstop.exp enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
mi-watch.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi2-amd64-entry-value.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi2-amd64-entry-value.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
mi2-amd64-entry-value.s Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi2-prompt.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi2-var-child.exp Introduce some new MI test suite cleanups for breakpoint and 2014-04-23 12:17:31 -07:00
non-stop-exit.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
non-stop.c Add return value for non-void function return statements to fix error in clang build. 2014-04-14 08:34:51 -07:00
ns-stale-regcache.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
nsintrall.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
nsmoribund.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
nsthrexec.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pending.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pendshr1.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pendshr2.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pr11022.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pr11022.exp Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
pthreads.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
solib-lib.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
solib-main.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
testcmds
until.c
var-cmd.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
vla.c test: add mi vla test 2014-04-14 09:52:11 -07:00
watch-nonstop.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00