public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Modify altivec-regs.exp testcase for AIX
@ 2022-10-14  7:38 Aditya Kamath1
  2022-10-14  7:38 ` Aditya Kamath1
  2022-10-14 12:47 ` Ulrich Weigand
  0 siblings, 2 replies; 15+ messages in thread
From: Aditya Kamath1 @ 2022-10-14  7:38 UTC (permalink / raw)
  To: Aditya Kamath1 via Gdb-patches, Ulrich Weigand, simark; +Cc: Sangamesh Mallayya

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

Hi,

In AIX, unless and until the debugee uses the vector registers, one cannot fetch or write on them. Hence any ptrace () call will not be able to fetch or set the vector registers. Currently the test case sets a breakpoint in the main and makes an attempt to set the vector registers which will not work in AIX.

This patch ensures the completion of the execution of the line that uses vector registers first time only in AIX target.

Then the testcase will be able to set and fetch the vector registers.

For the remaining targets test case will stay as it is.

Please find attached the patch. [See:- 0001-Modify-altivec-regs.exp-testcase-for-AIX.patch]

Kindly let me know what you think.

Thanks and regards,
Aditya.

[-- Attachment #2: 0001-Modify-altivec-regs.exp-testcase-for-AIX.patch --]
[-- Type: application/octet-stream, Size: 1180 bytes --]

From 6b35f6dd99df4896ae54fee5c85f0f97382a2875 Mon Sep 17 00:00:00 2001
From: Aditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com>
Date: Fri, 14 Oct 2022 01:52:07 -0500
Subject: [PATCH] Modify altivec-regs.exp testcase for AIX

Hi,

In AIX, unless and until the debugee uses the vector registers, one cannot fetch or write on them.

This patch ensures the completion of the execution of the line that uses vector registers first time only in AIX target.

Then the testcase will be able to set and fetch the vector registers.

For the remaining targets test case will stay as it is.
---
 gdb/testsuite/gdb.arch/altivec-regs.exp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp
index 87e48058ad3..fc168e5df34 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.exp
+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp
@@ -57,7 +57,10 @@ if ![runto_main] then {
 }
 
 gdb_test "set print frame-arguments all"
-
+if {[istarget "powerpc*-*-aix*"]} then {
+  gdb_test "next"
+  gdb_test "next"
+}
 
 # set all the registers integer portions to 1
 for {set i 0} {$i < 32} {incr i 1} {
-- 
2.31.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-03-07  9:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14  7:38 [PATCH] Modify altivec-regs.exp testcase for AIX Aditya Kamath1
2022-10-14  7:38 ` Aditya Kamath1
2022-10-14 12:47 ` Ulrich Weigand
2022-10-17  6:51   ` Aditya Kamath1
2022-10-17  6:51     ` Aditya Kamath1
2022-10-17  9:57     ` Ulrich Weigand
2022-10-17  9:57       ` Ulrich Weigand
2022-10-19  6:00       ` Aditya Kamath1
2022-10-19  6:00         ` Aditya Kamath1
2023-02-23 12:54         ` Aditya Kamath1
2023-02-24 15:37           ` Ulrich Weigand
2023-03-01 13:45             ` Aditya Kamath1
2023-03-03 15:50               ` Ulrich Weigand
2023-03-06  7:49                 ` Aditya Kamath1
2023-03-07  9:56                   ` Ulrich Weigand

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).