aboutsummaryrefslogtreecommitdiff
path: root/gdb/command.c
AgeCommit message (Collapse)AuthorFilesLines
2000-06-23Add support for auto_boolean (true, false or auto).Andrew Cagney1-6/+90
2000-06-08Change signature of function add_set_enum_cmd() so that it usesAndrew Cagney1-9/+8
constant character pointers. Update everything. As a consequence fix infrun's follow-fork plugging a small memory leak.
2000-06-06Accept an enum immediately when it is an exact match - wouldn't acceptAndrew Cagney1-2/+11
``d10v'' when the choice was d10v{,:ts2,:ts3}.
2000-06-04Eliminate PARAMS from function pointer declarations.Kevin Buettner1-4/+4
2000-05-28PARAMS removal.Kevin Buettner1-12/+12
2000-05-16Fix signature of add_set_enum_cmd. Change VAR parameter to char**.Andrew Cagney1-14/+12
Cleanup signature of add_set_cmd. Change VAR parameter to void*.
2000-05-15Use make_cleanup_ui_out_stream_delete().Andrew Cagney1-1/+1
2000-04-21Make help_all static.Andrew Cagney1-2/+3
2000-04-20Fri Mar 24 12:10:38 2000 glen mccready <gkm@pobox.com>Glen McCready1-0/+27
* command.c, command.h (help_all): Add functionality to display a complete listing of available commands.
2000-03-232000-03-23 Fernando Nasser <fnasser@cygnus.com>Fernando Nasser1-4/+244
From David Whedon <dwhedon@gordian.com> * top.c (execute_command): Checks all commands beore executing to see if the user needs to be warned that the command is deprecated, warns user if appropriate. (add_info), (add_info_alias), (add_com) , (add_com_alias): Changed return values from void to struct cmd_list_element *. * command.c (lookup_cmd_1): Check aliases before following link in case user needs to be warned about a deprecated alias. (deprecate_cmd): new exported function for command deprecation, sets flags and posibly a replacement string. (deprecated_cmd_warning): New exported funciton to warn user about a deprecated command. (lookup_cmd_composition): New exported function that determines alias, prefix_command, and cmd based on a string. This is useful is we want to full name of a command. * command.h : Added prototypes for deprecate_cmd, deprecated_warn_user and lookup_cmd_composition, added flags to the cmd_list_element structure, changed return values for add_com_* and add_info_* from void to cmd_list_element. * maint.c : (maintenance_deprecate): New function to deprecate a command. This exists only so that the testsuite can deprecate commands at runtime and check the warning behavior. (maintenance_undeprecate) : New function, drops deprecated flags. (maintenance_do_deprecate): Actually does the (un)deprecation. (initialize_maint_cmds): Added the above new deprecate commands.
2000-03-23Added the apropos commandDaniel Berlin1-1/+87
2000-03-20Document requirements on adding a ``!'' command.Andrew Cagney1-0/+6
2000-02-09Replace ../include/wait.h with gdb_wait.h.Andrew Cagney1-7/+1
2000-02-03import gdb-2000-02-02 snapshotJason Molenda1-0/+102
2000-02-02import gdb-2000-02-01 snapshotJason Molenda1-8/+8
1999-10-05import gdb-1999-10-04 snapshotJason Molenda1-5/+3
1999-09-09import gdb-1999-09-08 snapshotStan Shebs1-2/+0
1999-08-31import gdb-1999-08-30 snapshotJason Molenda1-3/+0
1999-08-23import gdb-1999-08-23 snapshotJason Molenda1-3/+28
1999-08-09import gdb-1999-08-09 snapshotJason Molenda1-0/+2
1999-07-12import gdb-1999-07-12 snapshotJason Molenda1-2/+1
1999-07-07import gdb-1999-07-07 post reformatJason Molenda1-187/+191
1999-05-25import gdb-1999-05-25 snapshotJason Molenda1-0/+7
1999-05-19import gdb-1999-0519Jason Molenda1-1/+1
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+1564
1999-04-16Initial creation of sourceware repositoryStan Shebs1-1564/+0
1998-12-31all remaining *.c *.h files from hp merge.David Taylor1-16/+57
1998-10-161998-10-16 Jason Molenda (jsm@bugshack.cygnus.com)Jason Molenda1-15/+10
* command.c copying.c copying.awk core-aout.c core-regset.c corelow.c dcache.c i386-tdep.c i386v4-nat.c i387-tdep.c infcmd.c infptrace.c infrun.c remote.c solib.c symfile.c symmisc.c valarith.c: Add prototypes. * defs.h: Add prototype for utils.c::do_run_cleanups. * gdbtypes.c: Add prototypes. (make_pointer_type): Add braces to remove nested if-else ambiguity. (make_reference_type): Ditto. * printcmd.c (printf_command): Initialize 'f' and 'string' at function startup to suppress possibly-used-before-initialized warning. * remote-utils.c: Add prototypes. (sr_pollchar): Add braces to remove nested if-else ambiguity. * ser-tcp.c: Add prototypes. (wait_for): Add braces to remove nested if-else ambiguity. (tcp_readchar): Ditto. * ser-unix.c: Add prototypes. (get_tty_state): Don't define errno here. (get_tty_state): Don't define errno here. (hardwire_readchar): Only define 't' if we are compiling in a Cygwin environment. * symtab.c: Add prototypes. (find_methods): Add braces to remove nested if-else ambiguity. (search_symbols): Set 'i' to an initial value to suppress a possibly-used-before-initialized warning. * valops.c: Add prototypes. (value_cast): Set 'eltype2' to an initial value to suppress a possibly-used-before-initialized warning. (value_of_variable): Add braces to remove nested if-else ambiguity. (value_of_this): Ditto. * valprint.c: Add prototypes. (print_floating): Add braces to remove nested if-else ambiguity. Looks like a big change, but it is really just a lot of small stuff. In the cases where GCC was flagging a possible use-before-initialized warning on variables, it turned out that these were being used properly but GCC couldn't see that.
1998-10-15command.c: Include "wait.h" after, rather than before, <wait.h>.Andrew Cagney1-1/+2
"wait.h" was defining all WIF* macro's instead of filling in those that <wait.h> missed. Stops heaps of warnings from <wait.h> re-defining WIF*s defined in "wait.h".
1998-08-181998-08-18 Jason Molenda (jsm@bugshack.cygnus.com)Jason Molenda1-0/+8
* configure.in: Add more header files to AC_CHECK_HEADERS. * configure: Regenerated. * command.c: Include wait.h or sys/wait.h if present. * inftarg.c: Ditto. * core-aout.c: Include ptrace.h or sys/ptrace.h if present, based on autoconf test. * infptrace.c: Ditto. * expprint.c: Include ctype.h for isprint prototype. * i386aix-nat.c: Include sys/reg.h if autoconf says it is present. * i386v-nat.c: Include ptrace.h, sys/ptrace.h, and sys/reg.h if present, based on autoconf test. * utils.c: Include curses.h and term.h if present. (puts_debug): Change 'carriage_return' local variable to return_p to avoid name clash. * config/m68k/nm-apollo68b.h: Don't define PTRACE_IN_WRONG_PLACE, determine it with autoconf. * config/i386/nm-linux.h: Don't define NO_SYS_REG_H, determine it with autoconf. * config/i386/nm-i386sco.h: Don't define NO_PTRACE_H, determine it with autoconf. * config/i386/nm-i386v.h: Ditto. * config/i386/nm-symmetry.h: Ditto. * config/m88k/xm-cxux.h: Ditto. * config/m88k/xm-dgux.h: Ditto. * config/m68k/delta68.mh (NAT_FILE): nm-delta68.h no longer necessary. * config/m68k/nm-delta68.h: Removed.
1998-03-05Wed Mar 4 16:53:52 1998 Martin M. Hunt <hunt@cygnus.com>Martin Hunt1-2/+16
* serial.c (_initialize_serial): Add a description of "set remotelogbase". * command.c (do_setshow_command): If no arguments are supplied, don't dump core, instead print out an error message.
1997-09-27 * command.c (add_cmd, add_show_from_set): Insert new commands inJason Molenda1-8/+44
alphabetical order.
1997-02-10 * blockframe.c (generic_get_saved_regs): Remove unused variableJeff Law1-1/+1
"addr". * breakpoint.c (frame_in_dummy): Move struct breakpoint *b decl inside #ifdef CALL_DUMMY. (watch_command_1): Initialize target_resources_ok. * command.c (do_setshow_command): Provide dummy initialization for "match". * valops.c (find_function_addr): Move function & prototype inside #ifdef CALL_DUMMY. (value_arg_coerce): Similarly. (value_of_variable): Provide dummy initialization of "frame". Lint.
1996-07-17 * command.c (do_setshow_command): Don't segfault when showingStu Grossman1-3/+6
var_string and var_string_noescape vars that are NULL. From the fsf: * solib.c (solib_absolute_prefix, solib_search_path): New variables. (_initialize_solib): Add set/show commands for those variables. (solib_map_sections): Implement searching using them.
1996-03-30 * core-aout.c (fetch_core_registers): Cast core_reg_size to intFred Fish1-1/+2
before testing against reg_ptr. * eval.c (evaluate_subexp_standard): Cast type of TYPE_FN_FIELD_VOFFSET to int. * findvar.c (extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer): Cast type of sizeof to int. * values.c (unpack_field_as_long, modify_field): Ditto. * valops.c (value_assign, call_function_by_hand): Ditto. * infcmd.c (do_registers_info): Ditto. * ser-tcp.c (tcp_open): Ditto * remote.c (putpkt): Ditto. * dcache.c (dcache_peek): Ditto. * dcache.c (dcache_poke): Ditto. * m2-exp.y (yylex): Ditto. * gnu-regex.c (re_match_2): Ditto. * f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef out unused macro definition and variables. * inftarg.c (proc_wait): Move from main.c to here, and make static. * valprint.c (val_print_string): Change bufsize from int to unsigned. * main.c (wait.h): Include * top.c (command_line_input): Remove unused variable "c". * f-typeprint.c (f_type_print_varspec_prefix): Add missing enum value TYPE_CODE_TYPEDEF to switch statement. (f_type_print_varspec_suffix): Add missing enum value TYPE_CODE_TYPEDEF to switch statement. * ch-exp.c (parse_primval): Add remaining enumeration values to switch statement, with no specific action. (ch_lex): Add LOC_UNRESOLVED in switch statement. (pushback_token): Ifdef out, since code using it is ifdef'd out. * stabsread.c (cleanup_undefined_types): Remove unused label "badtype". * objfiles.h (print_symbol_bcache_statistics): Add prototype. * maint.c (objfiles.h): Include. (maintenance_print_statistics): Remove unused variable "temp". * minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove unused variable "found_file_symbol". * m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch. * language.c (lang_bool_type): Use existing function local type variable rather than create block local variables. * solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS. * infptrace.c (wait.h, command.h): Include. * ser-tcp.c (gdb_string.h): Include * i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR. (i386_get_frame_setup): Change "pc" from int to CORE_ADDR. * command.c (complete_on_enum): Make assignment used as truth value explictly check against NULL. (wait.h): Include. * infrun.c (wait_for_inferior): Ifdef out prologue_pc since code that uses it is ifdef'd out. * parser-defs.h: Add prototype for write_dollar_variable. * infrun.c: Add prototype for write_pc_pid. * breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs. * symmisc.c (bcache.h): Include. * bcache.h: Add prototype for print_bcache_statistics. * symfile.c: Include <time.h>. * printcmd.c (print_scalar_formatted): Change len to unsigned int. * valarith.c (value_equal): Cast result of TYPE_LENGTH to int. * valarith.c (value_binop): Change result_len, promoted_len1, and promoted_len2 to unsigned int. * valarith.c (value_subscripted_rvalue): Change elt_offs and elt_size to unsigned int. * valops.c (value_array): Change typelength to unsigned int. (destructor_name_p): Change len to unsigned int. * scm-lang.h (scm_parse): Add prototype for scm_unpack. * symfile.c (decrement_reading_symtab): Change return type to void. * valarith.c (value_subscript): Remove unused variable "word". (value_subscript): Remove unused variable "tint". * valops.c (auto_abandon): Ifdef out, since code using it is also ifdef'd out. * eval.c (init_array_element): Remove unused variable "val". * Makefile.in (values.o): Depends on scm-lang.h. (command.o): Depends upon wait_h. (ser-tcp.o): Depends upon gdb_string.h. (infptrace.o): Depends upon wait_h and command_h. (maint.o): Depends on objfiles.h and symfile.h. * values.c (allocate_repeat_value): Remove unused variable "element_type". (scm-lang.h): Include. * breakpoint.c (create_longjmp_breakpoint): Enclose in GET_LONGJMP_TARGET define, unused otherwise. * config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint, i386_remove_watchpoint and i386_stopped_by_watchpoint.
1996-02-03 * command.c (add_cmd): Add missing initialization for enums member.Fred Fish1-8/+9
Reorder members to match structure declaration to make it easier to tell when one is missing.
1995-08-02Update FSF address.Fred Fish1-1/+1
1995-08-01* configure.in: Check for working mmap, ansi headers, string.h,J.T. Conklin1-1/+1
strings.h, and memory.h. * configure: Regenerated. * gdb_stat.h: New file, "portable" <sys/stat.h>. * gdb_string.h: New file, "portable" <string.h>. * altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c, convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c, gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c, i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c, mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c, rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c, symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c, ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h" instead of <sys/stat.h>. * alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c, ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c, core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c, dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c, exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c, fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c, inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c, m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c, monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c, printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c, remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c, remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c, remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c, remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c, remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c, solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c, symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include "gdb_string.h" instead of <string.h>. * gdbtk.c: Likewise. * config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h, sparc/xm-sun4os4.h (HAVE_MMAP): Removed. * config/xm-lynx.h, config/i386/xm-ptx.h, config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h, config/mips/xm-irix3.h, config/mips/xm-mips.h, config/mips/xm-news-mips.h, config/mips/xm-riscos.h, config/pa/hppah.h, config/rs6000/xm-rs6000.h, config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h, config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h, config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed. * config/mips/xm-irix3.h, config/mips/xm-mips.h, config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-07-31* configure.in: Check for unistd.h.J.T. Conklin1-0/+3
* configure: Regenerated. * command.c, cp-valprint.c, fork-child.c, i386-tdep.c, i386b-nat.c, inflow.c, main.c, maint.c, objfiles.c, solib.c, source.c, stack.c, symfile.c, top.c, utils.c: Include strings.h and/or unistd.h to bring prototypes into scope.
1995-03-07 * command.h command.c: Add var_enum command type. It's likeStu Grossman1-0/+130
var_string but allows only only one of the specified strings.
1995-01-11 * command.c (show_user_1): Use print_command_line to show a userJeff Law1-2/+2
defined command (including control structures). * top.c (init_main): Change documentation for user defined commands to indicate they may accept up to ten arguments.
1994-03-26 * command.c (do_setshow_command, case var_string): Never add aJim Kingdon1-0/+7
space to the end of the string. * NEWS: Document this change. * .gdbinit: Add a space to the "set prompt" command.
1994-03-24 * main.c (complete_command): New command, from Rick SladkeyJim Kingdon1-0/+3
<jrs@world.std.com>. (symbol_completion_function): Don't declare rl_point and rl_line_buffer; they are now declared in readline.h. (show_commands): Don't declare history_base; it is declared in history.h. * command.c (lookup_cmd): Don't delete trailing whitespace.
1994-02-03 * command.c (empty_sfunc): New function.Jim Kingdon1-3/+13
(add_set_cmd): Use it instead of not_just_help_class_command. (not_just_help_class_command): Change calling convention back to what it was before yesterday's change.
1994-02-02 * command.c (add_set_cmd, no_just_help_class_command): ChangeJim Kingdon1-7/+6
to make this the sfunc, not cfunc, since that is how we call it. * command.h: Comment difference between sfunc and cfunc. * demangle.c (set_demangling_command): Add third arg since that is how it is called. (_initialize_demangler): Use sfunc, not cfunc, for set_demangling_command, since that is how it is called. Remove show_demangling_command; it has no effect.
1994-02-02 * command.c (shell_escape): Report errors correctly (with errorJim Kingdon1-2/+4
message from strerror).
1993-11-01Change the stream argument to _filtered to GDB_FILE *.Thomas Lord1-28/+28
Change all references to stdout/stderr to gdb_stdout/gdb_stderr. Replace all calls to stdio output functions with calls to corresponding _unfiltered functions (`fprintf_unfiltered') Replaced calls to fopen for output to gdb_fopen. Added sufficient goo to utils.c and defs.h to make the above work. The net effect is that stdio output functions are only directly used in utils.c. Elsewhere, the _unfiltered and _filtered functions and GDB_FILE type are used. In the near future, GDB_FILE will stop being equivalant to FILE. The semantics of some commands has changed in a very subtle way: called in the right context, they may cause new occurences of prompt_for_continue() behavior. The testsuite doesn't notice anything like this, though. Please respect this change by not reintroducing stdio output dependencies in the main body of gdb code. All output from commands should go to a GDB_FILE. Target-specific code can still use stdio directly to communicate with targets.
1993-06-25 * main.c (filename_completer): Don't complete to files ending in ~.Jim Kingdon1-5/+28
* NEWS: Mention filename completion and "info line" enhancements. * main.c (symbol_completion_function): On "info t foo", return NULL, don't error(). * main.c (symbol_completion_function): Don't use readline word breaking. Use new calling convention for c->completer and complete_on_cmdlist. * command.h (struct command): Change arguments; now the text passed to completer does not have any word breaking done. New arg word. * symtab.{c,h} (make_symbol_completion_list): Do word breaking. Take word argument. * {main.c,gdbcmd.h} ({filename,noop}_completer): Take word argument. * command.{c,h} (complete_on_cmdlist): Take word argument. * command.c (lookup_cmd_1): Doc fix.
1993-04-25 * Changes from (or inspired by) AMD:Jim Kingdon1-8/+6
* remote-udi.c (udi_attach): Assignments to Space and Offset were switched, fix it. (udi_wait): Make error message (UDIGetStdout) match error. (udi_wait): Handle UDIStdinNeeded. * command.c [CANT_FORK]: Use system(). * utils.c (prompt_for_continue): Allow quit with 'q'.
1993-04-22comment changes onlyK. Richard Pixley1-2/+6