Hello all, Here is a patch for adding sorting by name in 'info threads' and regex pattern matching of thread names for filtering threads. With this patch sorting by name will happen always. (Perhaps a switch to enable sorting would be better?) Regex matching is specified by doing 'info threads r'. This is not ambiguous with previous behavior where parameters to info threads were only numbers. (spaces between 'r' and are ignored) e.g. info threads r ^name_prefix Regards, gdb/ChangeLog: * gdbthread.h: Add char *cached_name to struct thread_info for use when sorting. * thread.c: #include . (thread_list_size): New global. (init_Thread_list): Initialize it. (free_thread): Decrement it. (new_thread): Increment it. (print_thread_filter_check): New function. (print_thread_sort_cmp): New function. (print_thread_info_single): New function. (print_thread_info): Sort threads by name and filter by regex match. testsuite/ * gdb.threads/Makefile.in (EXECUTABLES): Add info-thread-sort-regex. * gdb.threads/info-thread-sort-regex.c: New file. * gdb.threads/info-thread-sort-regex.exp: New file. doc/ * gdb.texinfo (Threads): Add information about sorting and regex parameters.