public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: fix regression in gdb.xml/maint_print_struct.exp Date: Fri, 17 Feb 2023 22:29:24 +0000 (GMT) [thread overview] Message-ID: <20230217222924.6D2FA385828E@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=733da2ced8f948b299bdd10b7ff40146095f43f9 commit 733da2ced8f948b299bdd10b7ff40146095f43f9 Author: Andrew Burgess <aburgess@redhat.com> Date: Fri Feb 17 10:15:27 2023 +0000 gdb: fix regression in gdb.xml/maint_print_struct.exp A regression in gdb.xml/maint_print_struct.exp was introduced with commit: commit 81b86eced24f905545b58aa6c27478104c364976 Date: Fri Jan 6 09:30:40 2023 -0700 Do not record a rejected target description The test relied on an invalid target description being stored within the tdesc_info of the current inferior, the above commit stopped this behaviour. Update the test to check that the invalid architecture is NOT stored, and then check printing the target description directly from the file. Approved-By: Tom Tromey <tromey@adacore.com> Diff: --- gdb/testsuite/gdb.xml/maint_print_struct.exp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.xml/maint_print_struct.exp b/gdb/testsuite/gdb.xml/maint_print_struct.exp index 6f411895501..fbb16aeb8f5 100644 --- a/gdb/testsuite/gdb.xml/maint_print_struct.exp +++ b/gdb/testsuite/gdb.xml/maint_print_struct.exp @@ -21,12 +21,17 @@ require allow_xml_test gdb_start +set xml_file "$srcdir/$subdir/maint_print_struct.xml" + # Required registers are not present so it is expected a warning. # -gdb_test "set tdesc filename $srcdir/$subdir/maint_print_struct.xml" " +gdb_test "set tdesc filename $xml_file" " warning:.*" "setting a new tdesc having only a structure" -gdb_test "maint print c-tdesc" " +gdb_test "maint print c-tdesc" \ + "There is no target description to print\\." + +gdb_test "maint print c-tdesc $xml_file" " .*tdesc_create_reg \\(feature, \"bad_reg1\", \[0-9\]+, 1, NULL, 128, \"two_fielded\"\\);\r .*tdesc_create_reg \\(feature, \"bad_reg2\", \[0-9\]+, 1, NULL, 64, \"bitfield\"\\);\r .*" "printing tdesc with a structure and a bitfield"
reply other threads:[~2023-02-17 22:29 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230217222924.6D2FA385828E@sourceware.org \ --to=aburgess@sourceware.org \ --cc=gdb-cvs@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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).