Re: Ada compile with -fvar-tracking

Carl Love
2023-11-15T16:43:12Z

Tom:

On Wed, 2023-11-15 at 08:04 -0700, Tom Tromey wrote:
> > > > > > "Carl" == Carl Love <cel@linux.ibm.com> writes:
>
> Carl> I have attached the patch, followed by the entire log
> file. Hopefully
> Carl> you can see something I am missing. Thanks for the help.
>
> Well, it is definitely a mystery to me.
>
> A pretty normal failure mode is that the compiler emits some warning
> or
> something, and dejagnu thinks this is an error. This doesn't seem to
> be
> happening in your case.
>
> Carl> compilation failed: 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
>
> I wonder if this is exiting with a non-zero status.
>
> It's hard to imagine what else it could be. Like could there be a
> message but dejagnu isn't putting it into the log?
>
> What happens if you 'cd' into the appropriate subdir in the source
> tree
> and invoke gnatmake yourself? I think earlier you said this worked,
> but
> it's good to start with a clean build tree (hence srcdir -- you can
> 'git
> clean .' to nuke the build artifacts)

Some good ideas. So, I cloned a clean copy and cd to the source
directory and then took each of the commands from the log file and ran
them with the appropriate input directory paths putting the output in
the current directory. I then ran echo $? to see the exit code for
each command. I didn't see any errors or warnings from any of the
commands. The exit code was 0 for each command. I then dumped the
dwarf on the binary and again verified that it now contains the
DW_TAG_call_site entries that are needed. Yea, I was hoping I would
see a bad exit code that would give me a clue.

carll@ltcd97-lp3:~/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large$ gcc -I./ -fvar-tracking -c -I . -g -I- p.adb
carll@ltcd97-lp3:~/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large$ echo $?
0
carll@ltcd97-lp3:~/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large$ gcc -c -I./ -fvar-tracking -I/. -g -I- ./pck.adb
carll@ltcd97-lp3:~/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large$ echo $?
0
carll@ltcd97-lp3:~/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large$ gnatbind -I. -x p.ali
carll@ltcd97-lp3:~/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large$ echo $?
0
carll@ltcd97-lp3:~/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large$ gnatlink p.ali -g -lm -o p
carll@ltcd97-lp3:~/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large$ echo $?
0
carll@ltcd97-lp3:~/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large$ readelf -wi p > p.dump
carll@ltcd97-lp3:~/GDB/binutils-gdb-ada/gdb/testsuite/gdb.ada/finish-large$ emacs p.dump

So, per my thoughts last night, I guess I need to dig into the expect
gdb_compile_ada proceedure and see if I can find something there.

Please let me know if you come up with any other ideas. Appreciate all
the time and efforts from you on this.

Carl