public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Aditya Kamath1 <Aditya.Kamath1@ibm.com>
To: Tom Tromey <tom@tromey.com>
Cc: Tom Tromey <tom@tromey.com>, Andrew Burgess <aburgess@redhat.com>,
	Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	Aditya Kamath1 via Gdb-patches <gdb-patches@sourceware.org>,
	Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: RE: Fix max-depth test case for AIX.
Date: Wed, 17 Apr 2024 10:40:35 +0000	[thread overview]
Message-ID: <CH2PR15MB3544EF29F2D18DFB1F94752BD60F2@CH2PR15MB3544.namprd15.prod.outlook.com> (raw)
In-Reply-To: <87edb51ark.fsf@tromey.com>


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

Respected community members,

Hi,

>This is ok.
>Approved-By: Tom Tromey tom@tromey.com<mailto:tom@tromey.com>

Thank you Tom.

Can someone kindly commit this patch. Attaching it again. I do not have the access to do the same.

Have a nice day ahead.

Thanks and regards,
Aditya.




From: Tom Tromey <tom@tromey.com>
Date: Tuesday, 16 April 2024 at 10:54 PM
To: Aditya Kamath1 <Aditya.Kamath1@ibm.com>
Cc: Tom Tromey <tom@tromey.com>, Andrew Burgess <aburgess@redhat.com>, Ulrich Weigand <Ulrich.Weigand@de.ibm.com>, Aditya Kamath1 via Gdb-patches <gdb-patches@sourceware.org>, Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: [EXTERNAL] Re: Fix max-depth test case for AIX.
>>>>> Aditya Kamath1 <Aditya.Kamath1@ibm.com> writes:

> From 3117e666bad264e460596903acbcd008dc3f9287 Mon Sep 17 00:00:00 2001
> From: Aditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com>
> Date: Wed, 10 Apr 2024 00:52:05 -0500
> Subject: [PATCH] Fix max-depth test case for AIX.

> In AIX, if in the main program the global variables are unused then the linker optimises
> these variables and the dwarf will not have proper address to the same. Hence we cannot access these
> variables.

This is ok.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

[-- Attachment #2: 0001-Fix-max-depth-test-case-for-AIX.patch --]
[-- Type: application/octet-stream, Size: 1223 bytes --]

From 3117e666bad264e460596903acbcd008dc3f9287 Mon Sep 17 00:00:00 2001
From: Aditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com>
Date: Wed, 10 Apr 2024 00:52:05 -0500
Subject: [PATCH] Fix max-depth test case for AIX.

In AIX, if in the main program the global variables are unused then the linker optimises
these variables and the dwarf will not have proper address to the same. Hence we cannot access these
variables.

This patch is a fix to the same so that all the test case of max-depth can passs in AIX as well.
---
 gdb/testsuite/gdb.base/max-depth.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gdb/testsuite/gdb.base/max-depth.c b/gdb/testsuite/gdb.base/max-depth.c
index fee5de5af34..7e46b134c10 100644
--- a/gdb/testsuite/gdb.base/max-depth.c
+++ b/gdb/testsuite/gdb.base/max-depth.c
@@ -225,8 +225,17 @@ struct V7 : virtual V4, virtual V5, virtual V6 { int v7 = 1; } v7;
 
 #endif /* __cplusplus */
 
+void Do_nothing (struct s1 sone)
+{
+  /*  This Function does nothing.  */
+}
+
 int
 main ()
 {
+  /*  In targets like AIX, linker optimises out unused global
+      variables.  The do_nothing () function stops the linker
+      from doing so.  */
+  Do_nothing (s1);
   return 0;
 }
-- 
2.41.0


  reply	other threads:[~2024-04-17 10:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03  9:00 Aditya Kamath1
2024-04-03 14:13 ` Andrew Burgess
2024-04-03 14:58   ` Tom Tromey
2024-04-10  6:01     ` Aditya Kamath1
2024-04-16 17:24       ` Tom Tromey
2024-04-17 10:40         ` Aditya Kamath1 [this message]
2024-04-17 10:44           ` 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=CH2PR15MB3544EF29F2D18DFB1F94752BD60F2@CH2PR15MB3544.namprd15.prod.outlook.com \
    --to=aditya.kamath1@ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sangamesh.swamy@in.ibm.com \
    --cc=tom@tromey.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).