public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Carl Love <cel@linux.ibm.com>
To: Tom Tromey <tom@tromey.com>,
	cel@linux.ibm.com, gdb-patches@sourceware.org
Subject: Ada compile with -fvar-tracking
Date: Tue, 14 Nov 2023 11:24:59 -0800	[thread overview]
Message-ID: <b10fb78609641335f7c07d34a595227f2446c8bf.camel@linux.ibm.com> (raw)

Tom:

Per our conversation on HexChat about using -fvar-tracking when
compiling Ada programs.

I tried adding the -fvar-tracking option based on the examples we
talked about.  Here are the changes I used:


gdb/testsuite/gdb.ada/finish-large.exp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.ada/finish-large.exp b/gdb/testsuite/gdb.ada/finish-large.exp
index 5661d132a18..affb2a497fa 100644
--- a/gdb/testsuite/gdb.ada/finish-large.exp
+++ b/gdb/testsuite/gdb.ada/finish-large.exp
@@ -19,7 +19,12 @@ require allow_ada_tests
 
 standard_ada_testfile p
 
-if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
+set additional_flags {}
+
+set flags [list debug additional_flags=-fvar-tracking]
+
+if {[gdb_compile_ada "${srcfile}" "${binfile} " executable $flags] != ""} {
+
   return -1
 }

When I try to run the test with:

   make check RUNTESTFLAGS='GDB=/home/carll/bin/gdb gdb.ada/finish-large.exp ' > out

I get the following, edited a little to make it easier to read, in 
gdb/testsuite/gdb.log:

   Executing on host: gnatmake  p.adb  -largs  -margs  -fvar-tracking -f 
   -I/home/.../gdb/testsuite/gdb.ada/finish-large -g -largs  -lm  -margs -o /.../gdb/testsuite

   compilation failed: gcc -c -I./ -fvar-tracking -I/.../gdb/testsuite/gdb.ada/finish-large -g 
   -I- /.../testsuite/gdb.ada/finish-large/p.adb

   gcc -c -I./ -fvar-tracking -I/..../gdb/testsuite/gdb.ada/finish-large -g -I- 
   /.../gdb/testsuite/gdb.ada/finish-large/pck.adb

   gnatbind -I/..../gdb/testsuite/gdb.ada/finish-large -x p.ali

   gnatlink p.ali -fvar-tracking -g -lm -o /..../gdb/testsuite/outputs/gdb.ada/finish-large/p

   FAIL: gdb.ada/finish-large.exp: compilation p.adb

If I remove the "additional_flags=-fvar-tracking" from the flags line,
i.e.

     set flags [list debug additional_flags=""]

Then the test compiles and runs as before.  So, I still don't seem to
be able to get Ada to take the -fvar-tracking option.  I just seem to
get a compilation error which I guess is due to the compiler not
recognizing "-fvar-tracking".  Thoughts?

Thanks for the time and effort on this.

                          Carl 


             reply	other threads:[~2023-11-14 19:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 19:24 Carl Love [this message]
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
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=b10fb78609641335f7c07d34a595227f2446c8bf.camel@linux.ibm.com \
    --to=cel@linux.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --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).