public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Ulrich Weigand <uweigand@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Modify altivec-regs.exp testcase for AIX Date: Tue, 7 Mar 2023 09:55:15 +0000 (GMT) [thread overview] Message-ID: <20230307095515.F3CA03858D39@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=60204874f5a987b164f7f194d3f96729847fe329 commit 60204874f5a987b164f7f194d3f96729847fe329 Author: Aditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com> Date: Mon Mar 6 01:31:34 2023 -0600 Modify altivec-regs.exp testcase for AIX On AIX, the debugger cannot access vector registers before they are first used by the inferior. Hence we change the test case such that some vector registers are accessed by the variable 'x' in AIX and other targets are not affected as a consequence of the same. Diff: --- gdb/testsuite/gdb.arch/altivec-regs.c | 8 +++++++- gdb/testsuite/gdb.arch/altivec-regs.exp | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.arch/altivec-regs.c b/gdb/testsuite/gdb.arch/altivec-regs.c index 8f3b729fe3f..1411f15e358 100644 --- a/gdb/testsuite/gdb.arch/altivec-regs.c +++ b/gdb/testsuite/gdb.arch/altivec-regs.c @@ -20,12 +20,18 @@ main () vector unsigned int z; int a; + #ifdef _AIX + /* On AIX, the debugger cannot access vector registers before they + are first used by the inferior. Perform such an access here. */ + x = ((vector unsigned int) vec_splat_u8 (0)); + #endif + /* This line may look unnecessary but we do need it, because we want to have a line to do a next over (so that gdb refetches the registers) and we don't want the code to change any vector registers. The splat operations below modify the VRs,i so we don't want to execute them yet. */ - a = 9; + a = 9; /* start here */ x = ((vector unsigned int) vec_splat_u8 (-2)); y = ((vector unsigned int) vec_splat_u8 (1)); diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp index 6cc32aeff22..b771a4df76f 100644 --- a/gdb/testsuite/gdb.arch/altivec-regs.exp +++ b/gdb/testsuite/gdb.arch/altivec-regs.exp @@ -52,6 +52,9 @@ if {![runto_main]} { return 0 } +gdb_breakpoint [gdb_get_line_number "start here"] +gdb_continue_to_breakpoint "start here" + gdb_test "set print frame-arguments all" # set all the registers integer portions to 1
reply other threads:[~2023-03-07 9:55 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=20230307095515.F3CA03858D39@sourceware.org \ --to=uweigand@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).