This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] Fixup gdb.python/py-value.exp for bare-metal aarch64-elf
- From: Pedro Alves <palves at redhat dot com>
- To: Luis Machado <lgustavo at codesourcery dot com>, gdb-patches at sourceware dot org, qiyaoltc at gmail dot com
- Date: Wed, 12 Oct 2016 14:31:37 +0100
- Subject: Re: [PATCH v2] Fixup gdb.python/py-value.exp for bare-metal aarch64-elf
- Authentication-results: sourceware.org; auth=none
- References: <1476219321-10659-1-git-send-email-lgustavo@codesourcery.com>
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