list.exp: Avoid hardcoding line numbers.
authorPedro Alves <palves@redhat.com>
Thu, 28 Mar 2013 11:56:51 +0000 (11:56 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 28 Mar 2013 11:56:51 +0000 (11:56 +0000)
commitfc0da894a13ac920fbf19632e9079a61795111d8
tree1ed8f5c0cd94b7e95312005b4116a7caa1932e1c
parentabe7b7116cbf29f11917e74dbf0cda084d8a4169
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".
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/list.exp
gdb/testsuite/gdb.base/list0.c