From c94fdfd0a8821bf0bfa3518f5f65b58f1aa629c2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 11 Jun 2001 16:05:25 +0000 Subject: * completer.c (gdb_completer_loc_break_characters): New variable. (line_completion_function): If we are completing on locations, back up the start of word pointer past all characters which can appear in a location spec. (location_completer): New function. * completer.h: Add prototype for location_completer. * symtab.c (make_source_files_completion_list) (add_filename_to_list, not_interesting_fname): New functions. (filename_seen): New function, body extracted from output_source_filename. (output_source_filename): Call filename_seen to check if the file was already printed. (make_symbol_completion_list): If TEXT includes a double-quoted string, return an empty list, not NULL. (make_file_symbol_completion_list): New function, similar to make_symbol_completion_list but with an additional argument SRCFILE. * symtab.h (make_file_symbol_completion_list) (make_source_files_completion_list): Add prototypes. * breakpoint.c (_initialize_breakpoint): Make location_completer be the completion function for all commands which set breakpoints and watchpoints. (top-level): #include "completer.h". * tracepoint.c (_initialize_tracepoint): Make location_completer be the completion function for the "trace" command. (top-level): #include "completer.h". * printcmd.c (_initialize_printcmd): Make location_completer be the completion function for the "print", "inspect", "call", and "disassemble" commands. (top-level): #include "completer.h". * infcmd.c (_initialize_infcmd): Make location_completer be the completion function for the "go", "jump", and "until" commands. (top-level): #include "completer.h". --- gdb/tracepoint.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/tracepoint.c') diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index a5027c79d37..9a83322f823 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -33,6 +33,7 @@ #include "remote.h" #include "linespec.h" #include "regcache.h" +#include "completer.h" #include "gdb-events.h" #include "ax.h" @@ -2799,12 +2800,13 @@ Arguments are tracepoint numbers, separated by spaces.\n\ No argument means enable all tracepoints.", &enablelist); - add_com ("trace", class_trace, trace_command, - "Set a tracepoint at a specified line or function or address.\n\ + c = add_com ("trace", class_trace, trace_command, + "Set a tracepoint at a specified line or function or address.\n\ Argument may be a line number, function name, or '*' plus an address.\n\ For a line number or function, trace at the start of its code.\n\ If an address is specified, trace at that exact address.\n\n\ Do \"help tracepoints\" for info on other tracepoint commands."); + c->completer = location_completer; add_com_alias ("tp", "trace", class_alias, 0); add_com_alias ("tr", "trace", class_alias, 1); -- cgit v1.2.1