Re: Ada compile with -fvar-tracking

Keith Seitz
2023-11-15T17:23:30Z

On 11/15/23 09:12, Carl Love wrote:
> On Wed, 2023-11-15 at 10:02 -0700, Tom Tromey wrote:
>>>>>>> "Carl" == Carl Love <cel@linux.ibm.com> writes:
>>
>> Carl> So, per my thoughts last night, I guess I need to dig into the
>> expect
>> Carl> gdb_compile_ada proceedure and see if I can find something
>> there.
>>
>> I've occasionally even hacked logging ("verbose -log" is an easy way)
>> into dejagnu code to try to figure out what is going on. I guess in
>> a
>> tricky case like this I'd try to find the exact bit of code that's
>> deciding the compilation failed.
>
> Yup, my thoughts exactly. It looks to me like there are four commands
> that get issued to compile the testcase. We need to narrow it down to
> what command fails and exactly where in the dejagnu code it is issued
> from and where the error is "detected". I haven't debugged dejagnu
> code in the past so this could be interesting. I will look to see
> about turning on vebose -log to see what I can get from it. Thanks for
> mentioning that.

When it comes to debugging what expect is up to, if you can narrow
the problem(s) to a proc or small area of commands, you can surround
that bit of code with "exp_internal 1" and "exp_internal 0". This will
cause expect to output all of its pattern-matching data: buffer
contents, attempted matches, actual matches, etc.

[You can also globally turn on exp_internal by passing a verbosity
level of 2+ to dejagnu. That will output "dbg.log" with ALL expect
pattern matching logging. Far too verbose (usually) to be useful.]

Keith