On Jul 29, 2008, Ian Lance Taylor <[EMAIL PROTECTED]> wrote:

> Alexandre Oliva <[EMAIL PROTECTED]> writes:
>> Here's my first cut at trying to tell how well or how bad we perform
>> in terms of debug info, that can be dropped into the GCC run-time test
>> infrastructure and used by means of #include in new tests that add
>> GUALCHK* annotations (or with separate compilation, if some stuff is
>> moved into a separate header).
>> 
>> Thoughts, comments, suggestions, tomatoes, eggs? :-)

> It's an interesting approach.  Have you considered an approach more
> like Dejagnu's dg support?

Yep.  Using comments only works for trivial testcases in which the
value is predictable, but it doesn't work at all once you start
inspecting loops.  That's once of the reasons why I went with macros
that expand to actual calls at run-time.

In an upcoming development of this infrastructure, I expect to drop
the 'call gdb on its own' stuff and have gdb start the program from
within a dejagnu script, set a breakpoint in the function called by
the macro with the expected value, and inspect that.  Then fix debug
info until we get at least that right, in the presence of calls to
sync things up and simplify the problem a bit.

Then, at a later stage, move to the logging approach that leaves no
markers whatsoever in the second run, and then somehow get the
debugger to inspect things.  Maybe have the macros generate tables
that the debug script would consult or some such.

I haven't thought this through, but I'm trying to come up with an
interface to code these tests that's generic enough to provide the
inspection features we're going to need, but that won't stop us from
evolving the underlying implementation, as we gain guality, so as to
progressively reduce the influence of the testing infrastructure on
the generate code we want to test.

ATM GCC sucks rocks even with the function calls and the forced-live
annotations in place :-(

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist  [EMAIL PROTECTED], gnu.org}
FSFLA Board Member       ¡Sé Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer   [EMAIL PROTECTED], gcc.gnu.org}

Reply via email to