aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauerman@br.ibm.com>2009-03-26 20:58:11 +0000
committerThiago Jung Bauermann <bauerman@br.ibm.com>2009-03-26 20:58:11 +0000
commitdef2b0009c101b13fad1105c2c10424b35b3117b (patch)
treed363c19a39e4140b846faf3a176384f72b46f58f /gdb/testsuite
parent442ddf5987d97d3d8fc9c3e64449417d4cec3190 (diff)
downloadgdb-def2b0009c101b13fad1105c2c10424b35b3117b.zip
gdb-def2b0009c101b13fad1105c2c10424b35b3117b.tar.gz
gdb-def2b0009c101b13fad1105c2c10424b35b3117b.tar.bz2
gdb/
Add gdb.Value.is_optimized_out attribute. * python/python-value.c (valpy_get_is_optimized_out): New function. (value_object_getset): New variable. (value_object_type): Initialize tp_getset element. gdb/doc/ * gdb.texinfo (Values From Inferior): Document is_optimized_out attribute. gdb/testsuite/ * gdb.python/python-value.exp (test_value_in_inferior): Test gdb.Value.is_optimized_out attribute.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.python/python-value.exp3
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7f68b92..599ba76 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-26 Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * gdb.python/python-value.exp (test_value_in_inferior): Test
+ gdb.Value.is_optimized_out attribute.
+
2009-03-26 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.dwarf2/dw2-noloc-main.c: New file.
diff --git a/gdb/testsuite/gdb.python/python-value.exp b/gdb/testsuite/gdb.python/python-value.exp
index 8f5e0ab..2d1ece6 100644
--- a/gdb/testsuite/gdb.python/python-value.exp
+++ b/gdb/testsuite/gdb.python/python-value.exp
@@ -225,6 +225,9 @@ proc test_value_in_inferior {} {
# Check that the dereferenced value is sane
gdb_test "python print arg0" "0x.*$testfile\"" "verify dereferenced value"
+
+ # Smoke-test is_optimized_out attribute
+ gdb_test "python print 'result =', arg0.is_optimized_out" "= False" "Test is_optimized_out attribute"
}