gdb/
* ctf.c (_initialize_ctf): Include "completer.h". Call add_target_with_completer instead of add_target. gdb/testsuite/ * gdb.base/completion.exp: Test completion of command 'target ctf' if target ctf is supported.
This commit is contained in:
parent
0cfdc76718
commit
da9160e4c8
|
@ -1,3 +1,8 @@
|
||||||
|
2013-04-13 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
|
* ctf.c (_initialize_ctf): Include "completer.h".
|
||||||
|
Call add_target_with_completer instead of add_target.
|
||||||
|
|
||||||
2013-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2013-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
Fix GDB regression related to PR binutils/14813.
|
Fix GDB regression related to PR binutils/14813.
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "regcache.h"
|
#include "regcache.h"
|
||||||
#include "gdb_stat.h"
|
#include "gdb_stat.h"
|
||||||
#include "exec.h"
|
#include "exec.h"
|
||||||
|
#include "completer.h"
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
@ -1843,6 +1844,6 @@ _initialize_ctf (void)
|
||||||
#if HAVE_LIBBABELTRACE
|
#if HAVE_LIBBABELTRACE
|
||||||
init_ctf_ops ();
|
init_ctf_ops ();
|
||||||
|
|
||||||
add_target (&ctf_ops);
|
add_target_with_completer (&ctf_ops, filename_completer);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-04-13 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
|
* gdb.base/completion.exp: Test completion of command
|
||||||
|
'target ctf' if target ctf is supported.
|
||||||
|
|
||||||
2013-04-10 Pedro Alves <palves@redhat.com>
|
2013-04-10 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* gdb.base/completion.exp: Test "set height", "set listsize" and
|
* gdb.base/completion.exp: Test "set height", "set listsize" and
|
||||||
|
|
|
@ -714,8 +714,19 @@ gdb_test "complete set gnutarget aut" "set gnutarget auto"
|
||||||
gdb_test "complete set cp-abi aut" "set cp-abi auto"
|
gdb_test "complete set cp-abi aut" "set cp-abi auto"
|
||||||
|
|
||||||
# Test that completion of commands 'target FOO' works well.
|
# Test that completion of commands 'target FOO' works well.
|
||||||
|
set targets [list "core" "tfile" "exec"]
|
||||||
|
|
||||||
foreach target_name { "core" "tfile" "exec" } {
|
# Test that completion of command 'target ctf' if GDB supports ctf
|
||||||
|
# target.
|
||||||
|
gdb_test_multiple "target ctf" "" {
|
||||||
|
-re "Undefined target command: \"ctf\"\. Try \"help target\"\.\r\n$gdb_prompt $" {
|
||||||
|
}
|
||||||
|
-re "No CTF directory specified.*\r\n$gdb_prompt $" {
|
||||||
|
lappend targets "ctf"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach target_name ${targets} {
|
||||||
gdb_test "complete target ${target_name} ./gdb.base/completion" \
|
gdb_test "complete target ${target_name} ./gdb.base/completion" \
|
||||||
"target ${target_name} ./gdb.base/completion\\.exp.*"
|
"target ${target_name} ./gdb.base/completion\\.exp.*"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue