diff options
author | Eli Zaretskii <eliz@gnu.org> | 2001-06-11 16:05:25 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2001-06-11 16:05:25 +0000 |
commit | c94fdfd0a8821bf0bfa3518f5f65b58f1aa629c2 (patch) | |
tree | f35d443db6e865ab5deace1055b78f820bad39fc /gdb/breakpoint.c | |
parent | 6439fc285d589cd53d00e1eb105f060ec406f4d6 (diff) | |
download | gdb-c94fdfd0a8821bf0bfa3518f5f65b58f1aa629c2.zip gdb-c94fdfd0a8821bf0bfa3518f5f65b58f1aa629c2.tar.gz gdb-c94fdfd0a8821bf0bfa3518f5f65b58f1aa629c2.tar.bz2 |
* 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".
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 01d47e2..6824e38 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -40,6 +40,7 @@ #include "symfile.h" #include "objfiles.h" #include "linespec.h" +#include "completer.h" #ifdef UI_OUT #include "ui-out.h" #endif @@ -7582,24 +7583,29 @@ then no output is printed when it is hit, except what the commands print."); Usage is `condition N COND', where N is an integer and COND is an\n\ expression to be evaluated whenever breakpoint N is reached. "); - add_com ("tbreak", class_breakpoint, tbreak_command, - "Set a temporary breakpoint. Args like \"break\" command.\n\ + c = add_com ("tbreak", class_breakpoint, tbreak_command, + "Set a temporary breakpoint. Args like \"break\" command.\n\ Like \"break\" except the breakpoint is only temporary,\n\ so it will be deleted when hit. Equivalent to \"break\" followed\n\ by using \"enable delete\" on the breakpoint number."); - add_com ("txbreak", class_breakpoint, tbreak_at_finish_command, - "Set temporary breakpoint at procedure exit. Either there should\n\ + c->completer = location_completer; + + c = add_com ("txbreak", class_breakpoint, tbreak_at_finish_command, + "Set temporary breakpoint at procedure exit. Either there should\n\ be no argument or the argument must be a depth.\n"); + c->completer = location_completer; - add_com ("hbreak", class_breakpoint, hbreak_command, - "Set a hardware assisted breakpoint. Args like \"break\" command.\n\ + c = add_com ("hbreak", class_breakpoint, hbreak_command, + "Set a hardware assisted breakpoint. Args like \"break\" command.\n\ Like \"break\" except the breakpoint requires hardware support,\n\ some target hardware may not have this support."); + c->completer = location_completer; - add_com ("thbreak", class_breakpoint, thbreak_command, - "Set a temporary hardware assisted breakpoint. Args like \"break\" command.\n\ + c = add_com ("thbreak", class_breakpoint, thbreak_command, + "Set a temporary hardware assisted breakpoint. Args like \"break\" command.\n\ Like \"hbreak\" except the breakpoint is only temporary,\n\ so it will be deleted when hit."); + c->completer = location_completer; add_prefix_cmd ("enable", class_breakpoint, enable_command, "Enable some breakpoints.\n\ @@ -7701,8 +7707,8 @@ is executing in.\n\ \n\ See also the \"delete\" command which clears breakpoints by number.", NULL)); - add_com ("break", class_breakpoint, break_command, - concat ("Set breakpoint at specified line or function.\n\ + c = add_com ("break", class_breakpoint, break_command, + concat ("Set breakpoint at specified line or function.\n\ Argument may be line number, function name, or \"*\" and an address.\n\ If line number is specified, break at start of code for that line.\n\ If function is specified, break at start of code for that function.\n\ @@ -7713,6 +7719,8 @@ This is useful for breaking on return to a stack frame.\n\ Multiple breakpoints at one place are permitted, and useful if conditional.\n\ \n\ Do \"help breakpoints\" for info on other commands dealing with breakpoints.", NULL)); + c->completer = location_completer; + add_com_alias ("b", "break", class_run, 1); add_com_alias ("br", "break", class_run, 1); add_com_alias ("bre", "break", class_run, 1); @@ -7858,20 +7866,23 @@ Like \"catch\" except the catchpoint is only temporary,\n\ so it will be deleted when hit. Equivalent to \"catch\" followed\n\ by using \"enable delete\" on the catchpoint number."); - add_com ("watch", class_breakpoint, watch_command, - "Set a watchpoint for an expression.\n\ + c = add_com ("watch", class_breakpoint, watch_command, + "Set a watchpoint for an expression.\n\ A watchpoint stops execution of your program whenever the value of\n\ an expression changes."); + c->completer = location_completer; - add_com ("rwatch", class_breakpoint, rwatch_command, - "Set a read watchpoint for an expression.\n\ + c = add_com ("rwatch", class_breakpoint, rwatch_command, + "Set a read watchpoint for an expression.\n\ A watchpoint stops execution of your program whenever the value of\n\ an expression is read."); + c->completer = location_completer; - add_com ("awatch", class_breakpoint, awatch_command, - "Set a watchpoint for an expression.\n\ + c = add_com ("awatch", class_breakpoint, awatch_command, + "Set a watchpoint for an expression.\n\ A watchpoint stops execution of your program whenever the value of\n\ an expression is either read or written."); + c->completer = location_completer; add_info ("watchpoints", breakpoints_info, "Synonym for ``info breakpoints''."); |