public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Ada compile with -fvar-tracking
@ 2023-11-14 19:24 Carl Love
  2023-11-14 19:40 ` Tom Tromey
  0 siblings, 1 reply; 15+ messages in thread
From: Carl Love @ 2023-11-14 19:24 UTC (permalink / raw)
  To: Tom Tromey, cel, gdb-patches

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 


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-11-16 21:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14 19:24 Ada compile with -fvar-tracking 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
2023-11-16 21:07         ` Tom Tromey

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).