diff --git a/gdb/ChangeLog b/gdb/ChangeLog index eb0cb7c387..a89cb3df06 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-06-13 Pedro Alves + + * thread.c (thread_apply_command): Check for invalid TID with + isdigit instead of !isalpha. + 2019-06-13 Pedro Alves * cli/cli-utils.c (parse_flags_qcs): Use validate_flags_qcs. diff --git a/gdb/thread.c b/gdb/thread.c index 24906fa7d6..ea87f51c6e 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -1583,7 +1583,7 @@ thread_apply_command (const char *tidlist, int from_tty) if (*cmd == '\0') error (_("Please specify a command following the thread ID list")); - if (tidlist == cmd || !isalpha (cmd[0])) + if (tidlist == cmd || isdigit (cmd[0])) invalid_thread_id_error (cmd); scoped_restore_current_thread restore_thread;