public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Carl Love <cel@linux.ibm.com>
To: Luis Machado <luis.machado@arm.com>,
	Tom Tromey <tromey@adacore.com>,
	cel@linux.ibm.com
Cc: gdb-patches@sourceware.org
Subject: Re: Ada compile with -fvar-tracking
Date: Thu, 16 Nov 2023 08:11:31 -0800	[thread overview]
Message-ID: <1be655a8cfef2afbab409a5802a999785e01924b.camel@linux.ibm.com> (raw)
In-Reply-To: <cc34d88a-2db8-4de2-8bdf-466195ab868f@arm.com>

Luis, Tom:


On Thu, 2023-11-16 at 14:02 +0000, Luis Machado wrote:
> On 11/14/23 21:17, Carl Love wrote:
> > Tom:
> > 
> > On Tue, 2023-11-14 at 12:40 -0700, Tom Tromey wrote:
> > > set flags {debug additional_flags=-cargs additional_flags=-fvar-
> > > tracking additional_flags=-margs}
> > 
> > So I put that in as follows:
> > 
> >    set flags {debug additional_flags=-cargs additional_flags=-fvar-
> > tracking additional_flags=-margs}
> 
> I guess one way to make the above slightly cleaner (debatable) is to
> append the additional flags on different lines:
> 
>     set flags {"debug"}
>     lappend flags "additional_flags=-cargs"
>     lappend flags "additional_flags=-fvar-tracking"
>     lappend flags "additional_flags=-margs"
> 
> Slightly more verbose, but may make the additional flags more
> explicit/easier to read.

Yes, I do think that is easier to read.

So I worked on the patch some more once I got it to compile to see if I
need all three options on PowerPC.  On Power, I only seem to need the
-fvar-tracking option.  The -cargs and -margs don't seem to have any
effect on PowerPC.  It looks like the following is all that I need on
Power:

--- a/gdb/testsuite/gdb.ada/finish-large.exp
+++ b/gdb/testsuite/gdb.ada/finish-large.exp
@@ -19,7 +19,13 @@ require allow_ada_tests
 
 standard_ada_testfile p
 
-if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
+if {[have_fvar_tracking]} {
+    set flags {debug additional_flags=-fvar-tracking}
+} else {
+    set flags {debug}
+}
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
   return -1
 
I think Power is the only platform that needs -fvar-tracking for this
test so I was inclined to leave off the other two options.   But if not
having the other two options with -fvar-tracking causes issues on other
platforms then I should include them.  

Tom, for your platform do you have to have all three options or not?

I tested the above patch on PowerPC and X86-64.  It seems to work fine
on both systems.

                       Carl 


  reply	other threads:[~2023-11-16 16:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 19:24 Carl Love
2023-11-14 19:40 ` Tom Tromey
2023-11-14 21:17   ` Carl Love
2023-11-14 22:03     ` Tom Tromey
2023-11-14 22:23       ` Carl Love
2023-11-15 15:04         ` Tom Tromey
2023-11-15 16:42           ` Carl Love
2023-11-15 17:02             ` Tom Tromey
2023-11-15 17:12               ` Carl Love
2023-11-15 17:23                 ` Keith Seitz
2023-11-15 17:29                   ` Carl Love
2023-11-15 22:59                     ` Carl Love
2023-11-16 14:02     ` Luis Machado
2023-11-16 16:11       ` Carl Love [this message]
2023-11-16 21:07         ` Tom Tromey

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=1be655a8cfef2afbab409a5802a999785e01924b.camel@linux.ibm.com \
    --to=cel@linux.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado@arm.com \
    --cc=tromey@adacore.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).