diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/doc/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 3 | ||||
-rw-r--r-- | gdb/source.c | 8 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/list.exp | 10 |
6 files changed, 30 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 95a9e75..a5f8963 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2013-03-28 Pedro Alves <palves@redhat.com> + + PR gdb/15294 + + * source.c (_initialize_source): Change back "set listsize" to an + integer command. + 2013-03-27 Gareth McMullin <gareth@blacksphere.co.nz> PR gdb/15275 diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 9a3f6b4..cab3ad9 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,10 @@ +2013-03-28 Pedro Alves <palves@redhat.com> + + PR gdb/15294 + + * gdb.texinfo (List) <set listsize>: Adjust to document that + listsize 0 means no limit, and remove mention of -1. + 2013-03-22 Yao Qi <yao@codesourcery.com> * gdb.texinfo (Embedded Processors): Remove menu item diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 38ce259..fc2aae1 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -6916,8 +6916,7 @@ the @code{list} command. You can change this using @code{set listsize}: @item set listsize @var{count} Make the @code{list} command display @var{count} source lines (unless the @code{list} argument explicitly specifies some other number). -Setting @var{count} to -1 means there's no limit and 0 means suppress -display of source lines. +Setting @var{count} to 0 means there's no limit. @kindex show listsize @item show listsize diff --git a/gdb/source.c b/gdb/source.c index 2d9410e..03c5253 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -2044,12 +2044,12 @@ The matching line number is also stored as the value of \"$_\".")); add_com_alias ("?", "reverse-search", class_files, 0); } - add_setshow_zuinteger_unlimited_cmd ("listsize", class_support, - &lines_to_list, _("\ + add_setshow_integer_cmd ("listsize", class_support, &lines_to_list, _("\ Set number of source lines gdb will list by default."), _("\ Show number of source lines gdb will list by default."), NULL, - NULL, show_lines_to_list, - &setlist, &showlist); + NULL, + show_lines_to_list, + &setlist, &showlist); add_cmd ("substitute-path", class_files, set_substitute_path_command, _("\ diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ef1ebae..33c7bf4 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,14 @@ 2013-03-28 Pedro Alves <palves@redhat.com> + PR gdb/15294 + + * gdb.base/list.exp (set_listsize): Adjust to accept $arg == 0 to + mean unlimited instead of $arg < 0. + (test_listsize): Remove "listsize of 0 suppresses output" test. + Test that "set listsize 0" ends up with an unlimited listsize. + +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) diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index 915b255..96ca198 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -67,7 +67,7 @@ proc set_listsize { arg } { if [gdb_test_no_output "set listsize $arg" "setting listsize to $arg #$set_listsize_count"] { return 0 } - if { $arg < 0 } { + if { $arg == 0 } { set arg "unlimited"; } @@ -136,15 +136,9 @@ proc test_listsize {} { gdb_test "list 10" "1\[ \t\]+#include \"list0.h\".*\r\n${last_line_re}" "list line 10 with listsize 100" } - # Try listsize of 0 which suppresses printing. + # Try listsize of 0 which is special, and means unlimited. set_listsize 0 - gdb_test "list 1" "" "listsize of 0 suppresses output" - - # Try listsize of -1 which is special, and means unlimited. - - set_listsize -1 - setup_xfail "*-*-*" gdb_test "list 1" "1\[ \t\]+#include .*\r\n${last_line_re}" "list line 1 with unlimited listsize" } |