old-cross-binutils/gdb/testsuite/gdb.base/list0.c
Pedro Alves fc0da894a1 list.exp: Avoid hardcoding line numbers.
The previous patch actually wasn't the first time I had to update line
numbers in this file.

This avoids hard coding line numbers, hopefully making the next time a
little easier.

Tested on x86_64 Fedora 17.

gdb/testsuite/
2013-03-28  Pedro Alves  <palves@redhat.com>

	* gdb.base/list.exp (last_line): New global.
	(last_line_re): New global.
	(test_listsize, test_list_function, test_list_forward)
	(test_repeat_list_command, test_list_range)
	(test_list_filename_and_function): Use them.
	* gdb.base/list0.c: Comment the last line of the file with "last
	line".
2013-03-28 11:56:51 +00:00

43 lines
568 B
C

#include "list0.h"
int main ()
{
int x;
x = 0;
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
foo (x++);
return 0;
}
static void
unused ()
{
/* Not used for anything */
} /* last line */