public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [Ada] Fix completion for multiple function matches
@ 2015-09-01 13:04 sergiodj+buildbot
  2015-09-01 13:04 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: sergiodj+buildbot @ 2015-09-01 13:04 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT dc5c874652de144c5ab05d11e85013b568678039 ***

Author: Pierre-Marie de Rodat <derodat@adacore.com>
Branch: master
Commit: dc5c874652de144c5ab05d11e85013b568678039

[Ada] Fix completion for multiple function matches

Before this change, trying to complete an expression ending with an
ambiguous function name (i.e. for which there are multiple matches)
would display a menu with a prompt for the user to pick one. For
instance:

    (gdb) p func<tab>Multiple matches for func
    [0] cancel
    [1] pack2.func at pack2.adb:5
    [2] pack.func at pack.adb:5
    >

This is not user friendly and actually triggered a segmentation fault
after the user did pick one. It is not clear whether the segmentation
fault needs a separate fix, but this is the only known case which
exhibits it at the moment, and this case must be fixed itself.

The problem lies in ada-lang.c (ada_resolve_function): when we got
multiple matches, we should not display the menu if we are in completion
mode. This patch adjusts the corresponding condition accordingly.

gdb/ChangeLog:

	* ada-lang.c (ada_resolve_function): Do not ask the user what
	match to use when in completion mode.

gdb/testsuite/ChangeLog:

	* gdb.ada/complete.exp: Add "pck.ambiguous_func" to the relevant
	expected outputs.  Add two testcases for completing ambiguous
	functions.
	* gdb.ada/complete/aux_pck.adb: New file.
	* gdb.ada/complete/aux_pck.ads: New file.
	* gdb.ada/complete/foo.adb: Pull Aux_Pck and call the two
	Ambiguous_Func functions.
	* gdb.ada/complete/pck.ads: Add an Ambiguous_Func function.
	* gdb.ada/complete/pck.adb: Likewise.

Tested on x86_64-linux, no regression.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-09-01 17:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 13:04 [binutils-gdb] [Ada] Fix completion for multiple function matches sergiodj+buildbot
2015-09-01 13:04 ` Failures on Debian-s390x-native-gdbserver-m64, branch master sergiodj+buildbot
2015-09-01 13:05 ` Failures on RHEL-s390x-m64, " sergiodj+buildbot
2015-09-01 13:08 ` Failures on Fedora-i686, " sergiodj+buildbot
2015-09-01 13:10 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2015-09-01 13:13 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2015-09-01 13:22 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-09-01 13:24 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2015-09-01 13:26 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2015-09-01 13:27 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot
2015-09-01 14:40 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-09-01 14:52 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-09-01 14:57 ` Failures on Debian-i686-native-gdbserver, " sergiodj+buildbot
2015-09-01 15:33 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot
2015-09-01 16:03 ` Failures on Debian-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-09-01 17:00 ` Failures on Debian-x86_64-m64, " sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).