diff options
author | aburgess <aburgess> | 2012-07-30 12:10:17 +0000 |
---|---|---|
committer | aburgess <aburgess> | 2012-07-30 12:10:17 +0000 |
commit | c79947181e0021676f840b630ab61051bc8c987b (patch) | |
tree | 094bf7905b96daca35903acd26cc7ba4a148f047 /gdb/testsuite/gdb.mi | |
parent | 434071609797d516ad7d7f72b28f571cfa1a8496 (diff) | |
download | gdb-c79947181e0021676f840b630ab61051bc8c987b.tar.gz |
http://sourceware.org/ml/gdb-patches/2012-07/msg00551.html
Re-evaluate floating variables as part of variable invalidate to remove
references to type structures that might have been freed.
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-var-invalidate.exp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-var-invalidate.exp b/gdb/testsuite/gdb.mi/mi-var-invalidate.exp index 3ecbbdf67d8..1f16f88253d 100644 --- a/gdb/testsuite/gdb.mi/mi-var-invalidate.exp +++ b/gdb/testsuite/gdb.mi/mi-var-invalidate.exp @@ -61,6 +61,9 @@ mi_runto do_locals_tests # Desc: create local variables mi_create_varobj linteger linteger "create local variable linteger" +# Desc: create floating variable +mi_create_floating_varobj float_simple array "create floating variable" + # # Reload the same binary. # Global variable should remain, local should be invalidated. @@ -69,6 +72,12 @@ mi_delete_breakpoints mi_gdb_load ${binfile_bis} mi_runto main +# Change format of floating variable immediately after reload reveals a +# bug where gdb still uses a free'd pointer. +mi_gdb_test "-var-set-format float_simple hexadecimal" \ + "\\^done,format=\"hexadecimal\",value=\"\\\[-1\\\]\"" \ + "set format variable float_simple" + # Check local variable is "invalid". mi_gdb_test "-var-update linteger" \ "\\^done,changelist=\\\[\{name=\"linteger\",in_scope=\"invalid\",has_more=\"0\"\}\\\]" \ |