[PATCH v2] Fixup gdb.python/py-value.exp for bare-metal aarch64-elf
Pedro Alves
palves@redhat.com
Wed Oct 12 13:31:00 GMT 2016
On 10/11/2016 09:55 PM, Luis Machado wrote:
> + set argc_value [get_integer_valueof "argc" 0]
> gdb_test "python argc_lazy = gdb.parse_and_eval('argc')"
> gdb_test "python argc_notlazy = gdb.parse_and_eval('argc')"
> gdb_test "python argc_notlazy.fetch_lazy()"
> gdb_test "python print (argc_lazy.is_lazy)" "True"
> gdb_test "python print (argc_notlazy.is_lazy)" "False"
> - gdb_test "print argc" " = 1" "sanity check argc"
> + gdb_test "print argc" " = $argc_value" "sanity check argc"
> gdb_test "python print (argc_lazy.is_lazy)" "\r\nTrue"
> gdb_test_no_output "set argc=2"
Pedantically, $argc_value could be 2, so this would be better
something like
gdb_test_no_output "set argc=[expr $argc_value + 1]" "change argc"
> - gdb_test "python print (argc_notlazy)" "\r\n1"
> + gdb_test "python print (argc_notlazy)" "\r\n$argc_value"
> gdb_test "python print (argc_lazy)" "\r\n2"
Likewise.
> gdb_test "python print (argc_lazy.is_lazy)" "False"
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list