diff options
author | Keith Seitz <keiths@redhat.com> | 2012-03-01 20:33:01 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2012-03-01 20:33:01 +0000 |
commit | d2bcac7d23f2bc807ccf0666e30834045b3598a5 (patch) | |
tree | 83818877a7fb718deaad27c9619f3c14e1b54762 /gdb/linespec.c | |
parent | 55a5147158b466527f5d070dda6691df0335dd13 (diff) | |
download | gdb-d2bcac7d23f2bc807ccf0666e30834045b3598a5.tar.gz |
* linespec.c (decode_line_2): Sort the list of methods
alphabetically before presenting the user with a selection
menu.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r-- | gdb/linespec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c index 94e8ef687d2..c2057cf708b 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -650,6 +650,11 @@ decode_line_2 (struct linespec_state *self, return; } + /* Sort the list of method names alphabetically. */ + qsort (VEC_address (const_char_ptr, item_names), + VEC_length (const_char_ptr, item_names), + sizeof (const_char_ptr), compare_strings); + printf_unfiltered (_("[0] cancel\n[1] all\n")); for (i = 0; VEC_iterate (const_char_ptr, item_names, i, iter); ++i) printf_unfiltered ("[%d] %s\n", i + 2, iter); |