public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Aditya Kamath1 <Aditya.Kamath1@ibm.com>
To: Aditya Kamath1 via Gdb-patches <gdb-patches@sourceware.org>,
	Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: [PATCH] Modify align-c/align-c++ test case for AIX
Date: Fri, 10 Mar 2023 08:57:52 +0000	[thread overview]
Message-ID: <CH2PR15MB35445453E9B1D8DAC1025DABD6BA9@CH2PR15MB3544.namprd15.prod.outlook.com> (raw)


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

Hi all,

Please find attached the patch. {See:- 0001-Modify-align-c-align-c-test-case-for-AIX.patch}

In AIX, we have observed around 1500 failures in align-c/align-c++ testcase. The reason being this testcase shows the alignment outputs of global variables that are unused in the main (). In AIX we need to use atleast one global variable to access the same. This patch is a fix to the same. This issue is like this link pasted in the next line which we fixed before. https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60204874f5a987b164f7f194d3f96729847fe329

Kindly let me know if this is okay.

Test case command:- gmake RUNTESTFLAGS="gdb.base/align-c.exp" check
                                       gmake RUNTESTFLAGS="gdb.base/align-c++.exp" check
Test case passes before the patch :- 0 for align-c++ and align-c
Test case passes after this patch:- 1134 for align-c++ and 406 for align-c.

Have a nice day ahead.

Thanks and regards,
Aditya.

[-- Attachment #2: 0001-Modify-align-c-align-c-test-case-for-AIX.patch --]
[-- Type: application/octet-stream, Size: 1004 bytes --]

From 5daed42ecd34d0019f3a2e4828a5b014ee865452 Mon Sep 17 00:00:00 2001
From: Aditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com>
Date: Fri, 10 Mar 2023 01:22:14 -0600
Subject: [PATCH] Modify align-c/align-c++ test case for AIX

On AIX, the debugger cannot access global variables before they
they are used in any function. Hence we add this small change so
that we can test the same in AIX.
---
 gdb/testsuite/gdb.base/align.exp.tcl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gdb/testsuite/gdb.base/align.exp.tcl b/gdb/testsuite/gdb.base/align.exp.tcl
index 6a75a14d887..f18243080ce 100644
--- a/gdb/testsuite/gdb.base/align.exp.tcl
+++ b/gdb/testsuite/gdb.base/align.exp.tcl
@@ -109,6 +109,11 @@ proc prepare_test_source_file { lang } {
     # Epilogue.
     puts $outfile {
 	int main() {
+	    #ifdef _AIX
+	    /* On AIX, the debugger cannot access global variables before they
+		they are used in the functions.  */
+		a_char_x_char++;
+	    #endif
 	    return 0;
 	}
     }
-- 
2.38.3


             reply	other threads:[~2023-03-10  8:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  8:57 Aditya Kamath1 [this message]
2023-03-10 14:46 ` Tom Tromey
2023-03-13 13:04   ` Aditya Kamath1
2023-03-13 14:10     ` Ulrich Weigand
2023-03-15 11:52       ` Aditya Kamath1
2023-03-15 12:45         ` Tom Tromey
2023-03-16  7:01           ` Aditya Kamath1
2023-03-17 17:06             ` Ulrich Weigand
2023-03-17 22:03             ` Tom Tromey
2023-03-21  7:01               ` Aditya Kamath1
2023-03-21  7:41                 ` Ulrich Weigand
2023-03-21 11:05                   ` Pedro Alves
2023-03-21 14:17                   ` Tom Tromey
2023-03-21 14:26                     ` Ulrich Weigand
2023-03-29 11:28                       ` Aditya Kamath1
2023-03-29 13:36                         ` Pedro Alves
2023-03-31 12:29                           ` Aditya Kamath1
2023-04-04 13:24                             ` Aditya Kamath1
2023-04-05 16:33                             ` Pedro Alves
2023-04-06 13:15                               ` Aditya Kamath1
2023-04-06 16:18                                 ` Pedro Alves
  -- strict thread matches above, loose matches on Subject: below --
2023-03-10  8:56 Aditya Kamath1
2023-03-10 10:08 ` Aditya Kamath1

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=CH2PR15MB35445453E9B1D8DAC1025DABD6BA9@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 \
    /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).