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]

[rfc/testsuite/doco] deprecate.txt


Here is a new file, gdb/testsuite/deprecate.txt.

I think it's more useful to keep this file inside gdb/testsuite rather
than making it a section of doc/gdbint.texinfo .  Eli, is that okay with
you?

I'm also interested in comments on the four entries that I've written
so far, plus suggestions for new entries.

Michael

===

Deprecated Code in the GDB Test Suite

These coding practices are deprecated.
Avoid them in new code.

bug-gdb@prep.ai.mit.edu

    This address no longer accepts mail.  Just drop the lines in the
    header about "Please email any bugs, comments, and/or additions
    to this file to: bug-gdb@prep.ai.mit.edu".

exp_continue

    You should usually use this form:

	exp_continue -continue_timer

    The default form of "exp_continue" with no arguments resets
    the timeout timer.  This leads to infinite loops if gdb has a bug
    (and if gdb had no bugs then we would not need to test it).
    The "-continue_timer" form does not reset the timeout timer,
    so if gdb gets stuck in a loop, it will bust out soon enough.

    So if you use the default form, you need a loop counter or some
    other explicit way to make sure that the test never goes into
    an infinite loop.

gdb_suppress_entire_file

    gdb_suppress_entire_file sets funny global state.

    For gdb_compile, just do this:

	if { [gdb_compile ...] != "" } {
	    perror "Testcase compile failed" 0
	    continue
	}

send_gdb + gdb_expect

    Use gdb_test_multiple instead.


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