From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Sandra Loosemore <sandra@codesourcery.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch] gdb/testsuite: fixes for gdb.xml/tdesc-regs.exp
Date: Tue, 16 Jun 2020 21:47:01 +0100 [thread overview]
Message-ID: <20200616204701.GT2737@embecosm.com> (raw)
In-Reply-To: <71c00a14-a956-a087-8b9a-9b453194d4f2@codesourcery.com>
* Sandra Loosemore <sandra@codesourcery.com> [2020-06-16 14:04:51 -0600]:
> We've had this patch to fix various failures in gdb.xml/tdesc-regs.exp in
> our local tree for a few years now and would like to get it committed
> upstream. It fixes these problems:
>
> - It's using the wrong source pathname when trying to copy the .xml file to
> remote host.
>
> - We've seen at least one case where the type of the 32-bit register prints
> as "int32_t" rather than "int|long" etc -- I think this was on an ilp64
> target.
>
> - This test expects to see a register group named "general" but not all
> targets provide one.
I'd be interested to know more about which targets don't place any
registers in the 'general' group. This group is used in
default_print_registers_info to implement 'info registers', so I'd
like to see what this particular target has done instead.
Thanks,
Andrew
>
> OK to commit?
>
> -Sandra
> commit d32235b2037694e2586f83b6c3a5bc76fd1241ab
> Author: Sandra Loosemore <sandra@codesourcery.com>
> Date: Tue Jun 16 12:48:42 2020 -0700
>
> gdb/testsuite: fixes for gdb.xml/tdesc-regs.exp
>
> 2020-06-16 Sandra Loosemore <sandra@codesourcery.com>
> Hafiz Abid Qadeer <abidh@codesourcery.com>
>
> gdb/testsuite/
> * gdb.xml/tdesc-regs.exp (load_description): Correct pathname of
> file sent to remote host.
> (top level): Allow int32_t as type of 32-bit register. Don't
> require a register group named "general".
>
> diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
> index d2ed9db..4b8c7b5 100644
> --- a/gdb/testsuite/ChangeLog
> +++ b/gdb/testsuite/ChangeLog
> @@ -1,3 +1,11 @@
> +2020-06-16 Sandra Loosemore <sandra@codesourcery.com>
> + Hafiz Abid Qadeer <abidh@codesourcery.com>
> +
> + * gdb.xml/tdesc-regs.exp (load_description): Correct pathname of
> + file sent to remote host.
> + (top level): Allow int32_t as type of 32-bit register. Don't
> + require a register group named "general".
> +
> 2020-06-16 Gary Benson <gbenson@redhat.com>
>
> * gdb.python/py-nested-maps.c (create_map): Add missing return
> diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp
> index bb04420..b1e4525 100644
> --- a/gdb/testsuite/gdb.xml/tdesc-regs.exp
> +++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp
> @@ -145,7 +145,7 @@ proc load_description { file errmsg xml_file } {
> close $ofd
>
> if {[is_remote host]} {
> - set regs_file [remote_download host "$subdir/$xml_file" $xml_file]
> + set regs_file [remote_download host "$regs_file" $xml_file]
> }
>
> # Anchor the test output, so that error messages are detected.
> @@ -165,7 +165,7 @@ if {![is_remote host]} {
> }
>
> load_description "extra-regs.xml" "" "test-extra-regs.xml"
> -gdb_test "ptype \$extrareg" "type = (int|long|long long)"
> +gdb_test "ptype \$extrareg" "type = (int32_t|int|long|long long)"
> gdb_test "ptype \$uintreg" "type = uint32_t"
> gdb_test "ptype \$vecreg" "type = int8_t __attribute__ \\(\\(vector_size\\(4\\)\\)\\)"
> gdb_test "ptype \$unionreg" \
> @@ -180,9 +180,9 @@ gdb_test "ptype \$flags" \
> "type = flag flags {\r\n *bool X @0;\r\n *uint32_t Y @2;\r\n}"
> gdb_test "ptype \$mixed_flags" \
> "type = flag mixed_flags {\r\n *bool A @0;\r\n *uint32_t B @1-3;\r\n *bool C @4;\r\n *uint32_t D @5;\r\n *uint32_t @6-7;\r\n *enum Z_values {yes = 1, no = 0, maybe = 2, so} Z @8-9;\r\n}"
> -# Reggroups should have at least general and the extra foo group
> +# Reggroups should have at least the extra foo group
> gdb_test "maintenance print reggroups" \
> - " Group\[ \t\]+Type\[ \t\]+\r\n.* general\[ \t\]+user\[ \t\]+\r\n.* foo\[ \t\]+user\[ \t\]+"
> + " Group\[ \t\]+Type\[ \t\]+\r\n.* foo\[ \t\]+user\[ \t\]+"
>
> with_test_prefix "core-only.xml" {
> load_description "core-only.xml" "" "test-regs.xml"
next prev parent reply other threads:[~2020-06-16 20:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 20:04 Sandra Loosemore
2020-06-16 20:47 ` Andrew Burgess [this message]
2020-06-16 21:08 ` Sandra Loosemore
2020-06-18 9:43 ` Andrew Burgess
2020-06-19 2:18 ` Sandra Loosemore
2020-06-19 8:03 ` Andrew Burgess
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=20200616204701.GT2737@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=sandra@codesourcery.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