aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/completer.c2
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp6
4 files changed, 16 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c76158f..b47226bc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2017-06-29 Pedro Alves <palves@redhat.com>
+ * completer.c (expression_completer): Call
+ linespec_location_completer instead of location_completer.
+
+2017-06-29 Pedro Alves <palves@redhat.com>
+
* completer.c (expression_completer): Remove code that recomputes
'text' from 'word'.
diff --git a/gdb/completer.c b/gdb/completer.c
index f152dd5..68e68eb 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -635,7 +635,7 @@ expression_completer (struct cmd_list_element *ignore,
xfree (fieldname);
/* Not ideal but it is what we used to do before... */
- return location_completer (ignore, text, word);
+ return linespec_location_completer (ignore, text, word);
}
/* See definition in completer.h. */
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index b7462a5..41c5434 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2017-06-29 Pedro Alves <palves@redhat.com>
+
+ * gdb.base/printcmds.exp: Add tests.
+
2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
PR gdb/21337
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index d949b30..323ca73 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -931,6 +931,12 @@ gdb_test "ptype \"abc\"" " = char \\\[4\\\]"
gdb_test "print \$cvar = \"abc\"" " = \"abc\""
gdb_test "print sizeof (\$cvar)" " = 4"
+# GDB used to complete the explicit location options even when
+# printing expressions.
+gdb_test_no_output "complete p -function"
+gdb_test_no_output "complete p -line"
+gdb_test_no_output "complete p -source"
+
gdb_file_cmd ${binfile}
gdb_test "print \$pc" "No registers\\." "print \$pc (with file)"