public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Aditya Kamath1 <Aditya.Kamath1@ibm.com>
To: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"simark@simark.ca" <simark@simark.ca>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: Re: [PATCH] Modify altivec-regs.exp testcase for AIX
Date: Wed, 19 Oct 2022 06:00:45 +0000	[thread overview]
Message-ID: <CH2PR15MB3544029ADEB10925ACA4B9DAD62B9@CH2PR15MB3544.namprd15.prod.outlook.com> (raw)
In-Reply-To: <335276edcab44fa815becb01418b24e2bc87b0bd.camel@de.ibm.com>

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

Hi Ulrich,

I have modified the test case as per your feedback. Thank you for letting me know this way.

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

Kindly let me know if any changes required.

Thanks and regards,
Aditya.
________________________________
From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Sent: 17 October 2022 15:27
To: gdb-patches@sourceware.org <gdb-patches@sourceware.org>; Aditya Kamath1 <Aditya.Kamath1@ibm.com>; simark@simark.ca <simark@simark.ca>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: Re: [PATCH] Modify altivec-regs.exp testcase for AIX

Hi Aditya,

the string "func2 breakpoint here, first time" is just a comment that will be used to identify this particular command in the output; e.g. if continuing to the breakpoint fails, this comment will be used in the "FAIL" error message (so you know where specifically the test execution fails).

Apart from that, this string doesn't have any meaning in particular, it could be anything. I guess the author of the test case added the "first time" text here because in the process of running this particular test, we'll get back to that same place multiple times.


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand | Phone: +49-7031/16-3727
  Distinguished Engineer, Open source compilers and toolchain
  IBM Deutschland Research & Development GmbH
  Vors. des Aufsichtsrats: Gregor Pillen | Geschäftsführung: David Faller
  Sitz d. Ges.: Böblingen | Registergericht: Amtsgericht Stuttgart, HRB 243294

-----Original Message-----
From: Aditya Kamath1 <Aditya.Kamath1@ibm.com<mailto:Aditya%20Kamath1%20%3cAditya.Kamath1@ibm.com%3e>>
To: Ulrich Weigand <Ulrich.Weigand@de.ibm.com<mailto:Ulrich%20Weigand%20%3cUlrich.Weigand@de.ibm.com%3e>>, gdb-patches@sourceware.org <gdb-patches@sourceware.org<mailto:%22gdb-patches@sourceware.org%22%20%3cgdb-patches@sourceware.org%3e>>, simark@simark.ca <simark@simark.ca<mailto:%22simark@simark.ca%22%20%3csimark@simark.ca%3e>>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com<mailto:Sangamesh%20Mallayya%20%3csangamesh.swamy@in.ibm.com%3e>>
Subject: Re: [PATCH] Modify altivec-regs.exp testcase for AIX
Date: Mon, 17 Oct 2022 06:51:17 +0000

Hi Ulrich,

Thank you for the reply. This was useful. While I was exploring other stuff related to this test case,

In the line gdb_continue_to_breakpoint "func2 breakpoint here, first time",


What does "first time" in the command gdb_continue_to_breakpoint here mean?? I can see a marker with name func2 breakpoint.. Does it mean continue to execute till that marker hits for the first time??

I am curious to know it. It will be helpful. Kindly let me know.

Have a nice day ahead.

Thanks and regards,
Aditya.
________________________________
From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Sent: 14 October 2022 18:17
To: gdb-patches@sourceware.org <gdb-patches@sourceware.org>; Aditya Kamath1 <Aditya.Kamath1@ibm.com>; simark@simark.ca <simark@simark.ca>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: Re: [PATCH] Modify altivec-regs.exp testcase for AIX

Aditya Kamath1 <Aditya.Kamath1@ibm.com> wrote:

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

>+if {[istarget "powerpc*-*-aix*"]} then {
>+  gdb_test "next"
>+  gdb_test "next"
>+}

Hard-coding the fact that there need to be exactly
two "next" iterations is not really a good idea.

Usually this is done by placing a marker comment
in the source code at the target location, and
then using something like:

        gdb_breakpoint [gdb_get_line_number "func2 breakpoint here"]
        gdb_continue_to_breakpoint "func2 breakpoint here, first time"

(example from gdb.base/watchpoint.exp).

Bye,
Ulrich


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

From fa7a6293012bf785851f7b2b38975b7c29ff2df1 Mon Sep 17 00:00:00 2001
From: Aditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com>
Date: Wed, 19 Oct 2022 00:53:16 -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.c   | 3 +++
 gdb/testsuite/gdb.arch/altivec-regs.exp | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/gdb/testsuite/gdb.arch/altivec-regs.c b/gdb/testsuite/gdb.arch/altivec-regs.c
index 4d4fe3f5dbb..a12297cd8bc 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.c
+++ b/gdb/testsuite/gdb.arch/altivec-regs.c
@@ -27,6 +27,9 @@ main ()
      so we don't want to execute them yet.  */
   a = 9;
   x = ((vector unsigned int) vec_splat_u8 (-2));
+
+  /* AIX altivec-regs testcase breakpoint here.  */
+
   y = ((vector unsigned int) vec_splat_u8 (1));
 	
   z = vector_fun (x, y);
diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp
index 37dbccea704..a38c03278ca 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.exp
+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp
@@ -57,6 +57,11 @@ if ![runto_main] then {
 
 gdb_test "set print frame-arguments all"
 
+if {[istarget "powerpc*-*-aix*"]} then {
+    gdb_breakpoint [gdb_get_line_number "AIX altivec-regs testcase breakpoint here"]
+    gdb_continue_to_breakpoint "AIX altivec-regs testcase breakpoint hits first time"
+}
+
 # set all the registers integer portions to 1
 
 for {set i 0} {$i < 32} {incr i 1} {
-- 
2.31.1


WARNING: multiple messages have this Message-ID
From: Aditya Kamath1 <Aditya.Kamath1@ibm.com>
To: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"simark@simark.ca" <simark@simark.ca>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: Re: [PATCH] Modify altivec-regs.exp testcase for AIX
Date: Wed, 19 Oct 2022 06:00:45 +0000	[thread overview]
Message-ID: <CH2PR15MB3544029ADEB10925ACA4B9DAD62B9@CH2PR15MB3544.namprd15.prod.outlook.com> (raw)
Message-ID: <20221019060045.Yhrt5sdJAcg_hFuApTTO_YYHPPI2RelO7UcVVWEHS3k@z> (raw)
In-Reply-To: <335276edcab44fa815becb01418b24e2bc87b0bd.camel@de.ibm.com>


[-- Attachment #1.1: Type: text/plain, Size: 3872 bytes --]

Hi Ulrich,

I have modified the test case as per your feedback. Thank you for letting me know this way.

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

Kindly let me know if any changes required.

Thanks and regards,
Aditya.
________________________________
From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Sent: 17 October 2022 15:27
To: gdb-patches@sourceware.org <gdb-patches@sourceware.org>; Aditya Kamath1 <Aditya.Kamath1@ibm.com>; simark@simark.ca <simark@simark.ca>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: Re: [PATCH] Modify altivec-regs.exp testcase for AIX

Hi Aditya,

the string "func2 breakpoint here, first time" is just a comment that will be used to identify this particular command in the output; e.g. if continuing to the breakpoint fails, this comment will be used in the "FAIL" error message (so you know where specifically the test execution fails).

Apart from that, this string doesn't have any meaning in particular, it could be anything. I guess the author of the test case added the "first time" text here because in the process of running this particular test, we'll get back to that same place multiple times.


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand | Phone: +49-7031/16-3727
  Distinguished Engineer, Open source compilers and toolchain
  IBM Deutschland Research & Development GmbH
  Vors. des Aufsichtsrats: Gregor Pillen | Geschäftsführung: David Faller
  Sitz d. Ges.: Böblingen | Registergericht: Amtsgericht Stuttgart, HRB 243294

-----Original Message-----
From: Aditya Kamath1 <Aditya.Kamath1@ibm.com<mailto:Aditya%20Kamath1%20%3cAditya.Kamath1@ibm.com%3e>>
To: Ulrich Weigand <Ulrich.Weigand@de.ibm.com<mailto:Ulrich%20Weigand%20%3cUlrich.Weigand@de.ibm.com%3e>>, gdb-patches@sourceware.org <gdb-patches@sourceware.org<mailto:%22gdb-patches@sourceware.org%22%20%3cgdb-patches@sourceware.org%3e>>, simark@simark.ca <simark@simark.ca<mailto:%22simark@simark.ca%22%20%3csimark@simark.ca%3e>>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com<mailto:Sangamesh%20Mallayya%20%3csangamesh.swamy@in.ibm.com%3e>>
Subject: Re: [PATCH] Modify altivec-regs.exp testcase for AIX
Date: Mon, 17 Oct 2022 06:51:17 +0000

Hi Ulrich,

Thank you for the reply. This was useful. While I was exploring other stuff related to this test case,

In the line gdb_continue_to_breakpoint "func2 breakpoint here, first time",


What does "first time" in the command gdb_continue_to_breakpoint here mean?? I can see a marker with name func2 breakpoint.. Does it mean continue to execute till that marker hits for the first time??

I am curious to know it. It will be helpful. Kindly let me know.

Have a nice day ahead.

Thanks and regards,
Aditya.
________________________________
From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Sent: 14 October 2022 18:17
To: gdb-patches@sourceware.org <gdb-patches@sourceware.org>; Aditya Kamath1 <Aditya.Kamath1@ibm.com>; simark@simark.ca <simark@simark.ca>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: Re: [PATCH] Modify altivec-regs.exp testcase for AIX

Aditya Kamath1 <Aditya.Kamath1@ibm.com> wrote:

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

>+if {[istarget "powerpc*-*-aix*"]} then {
>+  gdb_test "next"
>+  gdb_test "next"
>+}

Hard-coding the fact that there need to be exactly
two "next" iterations is not really a good idea.

Usually this is done by placing a marker comment
in the source code at the target location, and
then using something like:

        gdb_breakpoint [gdb_get_line_number "func2 breakpoint here"]
        gdb_continue_to_breakpoint "func2 breakpoint here, first time"

(example from gdb.base/watchpoint.exp).

Bye,
Ulrich


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

From fa7a6293012bf785851f7b2b38975b7c29ff2df1 Mon Sep 17 00:00:00 2001
From: Aditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com>
Date: Wed, 19 Oct 2022 00:53:16 -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.c   | 3 +++
 gdb/testsuite/gdb.arch/altivec-regs.exp | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/gdb/testsuite/gdb.arch/altivec-regs.c b/gdb/testsuite/gdb.arch/altivec-regs.c
index 4d4fe3f5dbb..a12297cd8bc 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.c
+++ b/gdb/testsuite/gdb.arch/altivec-regs.c
@@ -27,6 +27,9 @@ main ()
      so we don't want to execute them yet.  */
   a = 9;
   x = ((vector unsigned int) vec_splat_u8 (-2));
+
+  /* AIX altivec-regs testcase breakpoint here.  */
+
   y = ((vector unsigned int) vec_splat_u8 (1));
 	
   z = vector_fun (x, y);
diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp
index 37dbccea704..a38c03278ca 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.exp
+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp
@@ -57,6 +57,11 @@ if ![runto_main] then {
 
 gdb_test "set print frame-arguments all"
 
+if {[istarget "powerpc*-*-aix*"]} then {
+    gdb_breakpoint [gdb_get_line_number "AIX altivec-regs testcase breakpoint here"]
+    gdb_continue_to_breakpoint "AIX altivec-regs testcase breakpoint hits first time"
+}
+
 # set all the registers integer portions to 1
 
 for {set i 0} {$i < 32} {incr i 1} {
-- 
2.31.1


  parent reply	other threads:[~2022-10-19  6:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-14  7:38 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 [this message]
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

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=CH2PR15MB3544029ADEB10925ACA4B9DAD62B9@CH2PR15MB3544.namprd15.prod.outlook.com \
    --to=aditya.kamath1@ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sangamesh.swamy@in.ibm.com \
    --cc=simark@simark.ca \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).