diff --git a/gdb/NEWS b/gdb/NEWS
index 07c1193d8..7069f3b4b 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -121,6 +121,9 @@ qXfer:threads:read
   previously treated variables set to void as having never been set (see
   the $_isvoid convenience function for this behavior).
 
+* Tab completion now suggests convenience variables when tab completing after
+  the '$' symbol in expressions.
+
 *** Changes in GDB 16
 
 * Support for Nios II targets has been removed as this architecture
diff --git a/gdb/completer.c b/gdb/completer.c
index 0a8409b44..f94d467ee 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -1497,6 +1497,15 @@ complete_expression (completion_tracker &tracker,
       && expr_completer->complete (exp.get (), tracker))
     return;
 
+  /* If the text is non-empty, see if the word is preceded by '$'.  */
+  if (text[0] != '\0' && text[strlen (text) - strlen (word) - 1] == '$')
+    {
+      /* We don't support completion of history indices.  */
+      if (!isdigit (word[0]))
+	complete_internalvar (tracker, word);
+      return;
+    }
+
   complete_files_symbols (tracker, text, word);
 }
 
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index e034ac532..f18fe049b 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -1908,8 +1908,8 @@ limit of 10 elements to print for arrays and strings.
 @value{GDBN} can fill in the rest of a word in a command for you, if there is
 only one possibility; it can also show you what the valid possibilities
 are for the next word in a command, at any time.  This works for @value{GDBN}
-commands, @value{GDBN} subcommands, command options, and the names of symbols
-in your program.
+commands, @value{GDBN} subcommands, command options, convenience variables, and
+the names of symbols in your program.
 
 Press the @key{TAB} key whenever you want @value{GDBN} to fill out the rest
 of a word.  If there is only one possibility, @value{GDBN} fills in the
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 571d714b7..5b04b62ed 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -1005,3 +1005,36 @@ foreach_with_prefix spc { " " "" } {
 	    }
     }
 }
+
+# Test command completion with convenience variables.
+test_gdb_complete_unique \
+    "print \$_sigin" \
+    "print \$_siginfo"
+
+test_gdb_complete_unique \
+    "print \$_siginfo" \
+    "print \$_siginfo"
+
+test_gdb_complete_unique \
+    "print \$_gdb_maj" \
+    "print \$_gdb_major"
+
+test_gdb_complete_unique "print \$_gdb_maint_setting_str" "print \$_gdb_maint_setting_str"
+
+test_gdb_complete_tab_multiple "print \$_gdb_mai" "nt_setting" {
+	"_gdb_maint_setting"
+	"_gdb_maint_setting_str"
+    }
+
+test_gdb_complete_cmd_multiple "" "print \$_gdb_maint_setting" {
+	"print \$_gdb_maint_setting"
+	"print \$_gdb_maint_setting_str"
+    }
+
+# Check that a nonexisting convenience variable is not completed.
+test_gdb_complete_none "print \$unique_variable_1234567"
+test_gdb_complete_none "set \$unique_variable_1234567"
+
+# Check that after defining the convenience variable it is completed.
+gdb_test_no_output "set \$unique_variable_1234567=4"
+test_gdb_complete_unique "print \$unique_variable_123456" "print \$unique_variable_1234567"
