From: Simon Marchi <simark@simark.ca>
To: Christian Biesinger <cbiesinger@google.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] [PR/24474] Add gdb.lookup_static_symbol to the python API
Date: Tue, 30 Jul 2019 01:14:00 -0000 [thread overview]
Message-ID: <896673e7-8b71-c161-f62f-4cc8fc87cb27@simark.ca> (raw)
In-Reply-To: <20190726222259.12312-1-cbiesinger@google.com>
Hi Christian,
On 2019-07-26 6:22 p.m., Christian Biesinger via gdb-patches wrote:
> diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp
> index 5b8a2be7c4..5d45e35da0 100644
> --- a/gdb/testsuite/gdb.python/py-symbol.exp
> +++ b/gdb/testsuite/gdb.python/py-symbol.exp
> @@ -48,6 +48,22 @@ gdb_test "python print (gdb.lookup_global_symbol('qq').needs_frame)" \
> "False" \
> "print whether qq needs a frame"
>
> +set rr_line [gdb_get_line_number "line of rr"]
> +gdb_test "python print (gdb.lookup_global_symbol ('rr') is None)" "True" \
> + "lookup_global_symbol for static var"
> +
> +gdb_test "python print (gdb.lookup_static_symbol ('rr').line)" "$rr_line" \
> + "print line number of rr"
> +
> +gdb_test "python print (gdb.lookup_static_symbol ('rr').value ())" "42" \
> + "print value of rr"
> +
> +gdb_test "python print (gdb.lookup_static_symbol ('rr').needs_frame)" \
> + "False" \
> + "print whether rr needs a frame"
> +
> +gdb_test "python print (gdb.lookup_global_symbol ('nonexistant') is None)" \
> + "True" "lookup_static_symbol for nonexistant var
The test name says "lookup_static_symbol" but the command uses lookup_global_symbol. I suppose you actually want to test lookup_static_symbol.
Is there a test that checks that lookup_static_symbol won't find a global symbol? If not, it would be good to add.
Simon
next prev parent reply other threads:[~2019-07-30 1:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 1:24 [PATCH][PR/24474] Make gdb.lookup_static_symbol also check the STATIC_SCOPE Christian Biesinger via gdb-patches
2019-06-18 20:15 ` Christian Biesinger via gdb-patches
2019-07-08 22:05 ` [PING] " Christian Biesinger via gdb-patches
2019-07-15 16:52 ` Christian Biesinger via gdb-patches
2019-07-16 3:28 ` Simon Marchi
2019-07-26 22:05 ` Christian Biesinger via gdb-patches
2019-07-26 22:23 ` [PATCH v2] [PR/24474] Add gdb.lookup_static_symbol to the python API Christian Biesinger via gdb-patches
2019-07-30 1:14 ` Simon Marchi [this message]
2019-07-30 1:35 ` [PATCH v3] " Christian Biesinger via gdb-patches
2019-07-30 1:50 ` Simon Marchi
2019-07-30 1:59 ` [PATCH v4] " Christian Biesinger via gdb-patches
2019-07-30 15:41 ` Christian Biesinger via gdb-patches
2019-07-30 15:57 ` Eli Zaretskii
2019-07-30 16:01 ` Christian Biesinger via gdb-patches
2019-07-26 22:43 ` [PATCH][PR/24474] Make gdb.lookup_static_symbol also check the STATIC_SCOPE Simon Marchi
2019-08-01 19:05 ` Christian Biesinger via gdb-patches
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=896673e7-8b71-c161-f62f-4cc8fc87cb27@simark.ca \
--to=simark@simark.ca \
--cc=cbiesinger@google.com \
--cc=gdb-patches@sourceware.org \
/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