Re: Ada compile with -fvar-tracking

Carl Love
2023-11-14T21:18:13Z

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}

if {[gdb_compile_ada "${srcfile}" "${binfile} " executable $flags] != ""} {

return -1
}

I still get:

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

Unfortunately "compilation failed" doesn't tell me much. So I tried
cutting and pasting each of the compile lines out of the log file and
doing them by hand to see if I could get any more info or figure out
exactly where it fails. It looks like there are four commands that get
issued:

gcc -c -I./ -fvar-tracking -I/home/carll/GDB/build-ada/gdb/testsuite/../../../binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large -g -I- /home/carll/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large/p.adb

gcc -c -I./ -fvar-tracking -I/home/carll/GDB/build-ada/gdb/testsuite/../../../binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large -g -I- /home/carll/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large/pck.adb

gnatbind -I/home/carll/GDB/build-ada/gdb/testsuite/../../../binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large -x p.ali

gnatlink p.ali -g -lm -o /home/carll/GDB/build-ada/gdb/testsuite/outputs/gdb.ada/finish-large/p

Well, I can issue each one by hand and don't get any errors.

So then I ran "readelf -wi on /home/carll/GDB/build-
ada/gdb/testsuite/outputs/gdb.ada/finish-large/p. When I look at the
dwarf output, I see the DW_TAG_call_site tags that are needed and were
not there without the -fvar-tracking stuff.

So, there is something in the environment or ??? that is causing the
compilation to fail??? It does look like it is theoretically possible
to get Ada to generate the DW_TAG_call_site tags. Maybe something in
dejagnu? No clue. If you have any thoughts or suggestions on
debugging dejagnu that would be great.

Thanks again.

Carl