* gdb.python/py-value.exp
(python inval = gdb.parse_and_eval('*(int*)0')) (python argc_lazy = gdb.parse_and_eval('argc'), sanity check argc) (set argc=2, python print argc_lazy): New tests.
This commit is contained in:
parent
3fcaed3833
commit
aa2071bd24
|
@ -1,3 +1,11 @@
|
|||
2011-10-03 Paul Koning <paul_koning@dell.com>
|
||||
Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.python/py-value.exp
|
||||
(python inval = gdb.parse_and_eval('*(int*)0'))
|
||||
(python argc_lazy = gdb.parse_and_eval('argc'), sanity check argc)
|
||||
(set argc=2, python print argc_lazy): New tests.
|
||||
|
||||
2011-10-02 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* gdb.base/save-bp.exp, gdb.base/save-bp.c: New files.
|
||||
|
|
|
@ -236,6 +236,18 @@ proc test_value_in_inferior {} {
|
|||
gdb_test "python print gdb.parse_and_eval('*(int*)0')" "gdb.MemoryError: Cannot access memory at address 0x0.*" $test
|
||||
}
|
||||
|
||||
# Test Python values are not lazy.
|
||||
set test "memory error occurs even for possibly lazy values"
|
||||
if {$can_read_0} {
|
||||
untested $test
|
||||
} else {
|
||||
gdb_test "python inval = gdb.parse_and_eval('*(int*)0')" "gdb.MemoryError: Cannot access memory at address 0x0.*" $test
|
||||
}
|
||||
gdb_test "python argc_lazy = gdb.parse_and_eval('argc')"
|
||||
gdb_test "print argc" " = 1" "sanity check argc"
|
||||
gdb_test_no_output "set argc=2"
|
||||
gdb_test "python print argc_lazy" "\r\n1"
|
||||
|
||||
# Test string fetches, both partial and whole.
|
||||
gdb_test "print st" "\"divide et impera\""
|
||||
gdb_py_test_silent_cmd "python st = gdb.history (0)" "get value from history" 1
|
||||
|
|
Loading…
Reference in New Issue