This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa/testsuite] rewrite get_compiler_info


drow> Is it possible to do this in gdb_compile instead? 

Well, as far as the "instead" part goes, I don't want any copies
of "gcc -E compiler.c" in the log at all.  So I have to disable
the logging that happens in dejagnu as well as the logging that
happens in gdb_compile.

drow> If you check gdb.log, currently compiler error messages get logged
drow> twice.  Sounds like the same problem.

Error messages appear THREE times in gdb.log.

I'm vague about the difference between stdout and stderr here
but that doesn't matter at this stage.

When the compiler produces error messages:

(1) In dejagnu, runtest.exp sets up "expect" logging with the call:
    log_file -a "$outdir/$tool.log".  That puts one copy in gdb.log.

(2) In dejagnu, default_target_compile calls "verbose -log ...".
    That puts a second copy in gdb.log.

(3) In gdb, gdb_compile says: "clone_output ...".  That puts a third
    copy in gdb.log.  It also puts one copy in gdb.sum and one copy
    on the standard output or standard_error (I'm capturing them both in
    a single file anyways).

So in dejagnu, default_target_compile should call "verbose ..." instead
of "verbose -log ...".  Or maybe just STFU.

And in gdb, gdb_compile should not use "clone_output".  gdb_compile
could do something that writes to stdout/stderr and writes to gdb.sum
but does not write to gdb.log.  Off hand, I don't know how to do that.

Or we could just make gdb_compile more quiet as well.  Like, have it
raise some kind of test result, but not print any messages to
stdout/stderr or gdb.sum.

Michael C


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]