From: Pedro Alves <palves@redhat.com>
To: Luis Machado <lgustavo@codesourcery.com>,
gdb-patches@sourceware.org, qiyaoltc@gmail.com
Subject: Re: [PATCH v2] Fixup gdb.python/py-value.exp for bare-metal aarch64-elf
Date: Wed, 12 Oct 2016 13:31:00 -0000 [thread overview]
Message-ID: <58e6d8d5-06db-4a63-99f0-ce1e5a71fd2d@redhat.com> (raw)
In-Reply-To: <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
next prev parent reply other threads:[~2016-10-12 13:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 20:55 Luis Machado
2016-10-12 13:26 ` Yao Qi
2016-10-12 13:31 ` Pedro Alves [this message]
2016-10-12 15:13 ` Luis Machado
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58e6d8d5-06db-4a63-99f0-ce1e5a71fd2d@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.com \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox