gdb/testsuite: add template for test cases
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 23 Nov 2020 03:04:27 +0000 (22:04 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 23 Nov 2020 03:04:27 +0000 (22:04 -0500)
commit199225823d86e3cd6844a4886296610261e3abb4
tree565a9766a27b1954a62a138de992eb01cacd559d
parentc751e4652de3223acd205f2250e26d5abae17186
gdb/testsuite: add template for test cases

The wiki contains a template for new test cases:

    https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Building_the_Example_Program

... which is helpful, because even after many years I can't write all
the boilerplate for writing a test case without doing some mistakes.

However, I think it would be nice to have it in the tree.  It's much
faster to cp the files than going to the wiki and copy/pasting the
contents.

As a bonus, the copyright years will get updated in these files, unlike
those in the wiki.  So they will always be good when we start a new
test.

If this patch is merged, I plan to change the wiki to just point to
these files.

gdb/testsuite/ChangeLog:

* gdb.base/template.exp: New.
* gdb.base/template.c: New.

Change-Id: I7dbf068a043b48f83cc325087d70e868eee998c6
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/template.c [new file with mode: 0644]
gdb/testsuite/gdb.base/template.exp [new file with mode: 0644]