diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-11-16 09:39:43 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-12-11 23:06:14 +0000 |
commit | 3b2464a8d39b8b787664438253b8fdf7625cac32 (patch) | |
tree | 242adf6432a85e2d70d3cf1553c16fc7a6a4accc /sim/testsuite | |
parent | a0def019aaf79adf3add2a0559ab75bb84d72085 (diff) | |
download | gdb-3b2464a8d39b8b787664438253b8fdf7625cac32.zip gdb-3b2464a8d39b8b787664438253b8fdf7625cac32.tar.gz gdb-3b2464a8d39b8b787664438253b8fdf7625cac32.tar.bz2 |
gdb: Add an error when 'list -' reaches the start of a file.
When a a user uses 'list +' to list forward through a source file they
eventually reach the end of the source file. Subsequent uses of 'list
+' result in an error message like this, that let the user know they are
at the end of the source file:
Line number XXX out of range; FILENAME has YYY lines.
Compare this to the current behaviour of 'list -' which lists backwards
through a source file. When the user reaches the beginning of the
source file, subsequent uses of 'list -' result in the command silently
returning. This can be confusing if the previous uses of 'list -' have
scrolled off the users display, the user receives no reminder that the
have already seen the start of the file.
After this commit a use of 'list -' when the user has already seen the
start of a file will receive the following error:
Already at the start of FILENAME.
gdb/ChangeLog:
* cli/cli-cmds.c (list_command): Add an error when trying to use
'-' to scan read off the start of the source file.
gdb/testsuite/ChangeLog:
* gdb.base/list.exp (test_list_forward): Add end of file error
test.
(test_repeat_list_command): Add end of file error test.
(test_list_backwards): Add beginning of file error test.
Diffstat (limited to 'sim/testsuite')
0 files changed, 0 insertions, 0 deletions