aboutsummaryrefslogtreecommitdiff
path: root/gdb/command.c
AgeCommit message (Collapse)AuthorFilesLines
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
1993-03-30Tue Mar 30 08:06:24 1993 Jim Kingdon (kingdon@cygnus.com)Jim Kingdon1-1/+24
* command.c (do_setshow_command): Use %u with var_{u,z}integer. * command.{c,h}: New var_type var_integer. main.c: Use it for history_size. * rs6000-tdep.c, xcoffexec.c, config/rs6000/xm-rs6000.h, breakpoint.c: Lint and byte-order fixups.
1993-03-17(show_user): Avoid fprintf_filtered botch (AGAIN!).John Gilmore1-2/+5
1993-03-05Lint fixes from Paul Eggert (eggert@twinsun.com):John Gilmore1-3/+3
* command.c (do_setshow_command): var_uintegers are unsigned. * sparc-tdep.c (save_insn_opcodes, restore_insn_opcodes): unsigned, since they use hex values with the high bit set.
1993-01-04 * command.c (shell_escape, make_command, _initialze_command):Steve Chamberlain1-2/+8
don't create or use fork if CANT_FORK is defined. * serial.h, ser-go32.c: now compiles, but "the obvious problems of code written for the IBM PC" remain. * xm-go32.h: define CANT_FORK
1992-12-23 * defs.h (STRCMP, STREQ, STREQN): New macros.Fred Fish1-2/+2
* defs.h (demangle_and_match): Remove prototype. * dwarfread.c (STREQ, STREQN): Remove macros, replaced with STREQ and STREQN defined in defs.h. * dwarfread.c (set_cu_language): For completely unknown languages, try to deduce the language from the filename. Retain behavior that for known languages we don't know how to handle, we use language_unknown. * dwarfread.c (enum_type, symthesize_typedef): Initialize language and demangled name fields in symbol. * dwarfread.c, mipsread.c, partial-stab.h: For all usages of ADD_PSYMBOL_TO_LIST, add language and objfile parameters. * dwarfread.c (new_symbol): Attempt to demangle C++ symbol names and cache the results in SYMBOL_DEMANGLED_NAME for the symbol. * elfread.c (STREQ): Remove macro, use STREQ defined in defs.h. Replace usages throughout. * elfread.c (demangle.h): Include. * elfread.c (record_minimal_symbol): Remove prototype and function. * gdbtypes.h, symtab.h (B_SET, B_CLR, B_TST, B_TYPE, B_BYTES, B_CLRALL): Moved from symtab.h to gdbtypes.h. * infcmd.c (jump_command): Remove code to demangle name and add it to a cleanup list. Now just use SYMBOL_DEMANGLED_NAME. * minsyms.c (demangle.h): Include. * minsyms.c (lookup_minimal_symbol): Indent comment to match code. * minsyms.c (install_minimal_symbols): Attempt to demangle symbol names as C++ names, and cache them in SYMBOL_DEMANGLED_NAME. * mipsread.c (psymtab_language): Add static variable. * stabsread.c (demangle.h): Include. * stabsread.c (define_symbol): Attempt to demangle C++ symbol names and cache them in the SYMBOL_DEMANGLED_NAME field. * stack.c (return_command): Remove explicit demangling of name and use of cleanups. Just use SYMBOL_DEMANGLED_NAME. * symfile.c (demangle.h): Include. * symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list): Fix to match macros in symfile.h and allow them to be compiled if INLINE_ADD_PSYMBOL is not true. * symfile.h (INLINE_ADD_PSYMBOL): Default to true if not set. * symfile.h (ADD_PSYMBOL_*): Add language and objfile parameters. Add code to demangle and cache C++ symbol names. Use macro form if INLINE_ADD_PSYMBOL is true, otherwise use C function form. * symmisc.c (add_psymbol_to_list, add_psymbol_addr_to_list): Remove, also defined in symfile.c, which we already fixed. * symtab.c (expensive_mangler): Remove prototype and function. * symtab.c (find_methods): Remove physnames parameter and fix prototype to match. * symtab.c (completion_list_add_symbol): Name changed to completion_list_add_name. * symtab.c (COMPLETION_LIST_ADD_SYMBOL): New macro, adds both the normal symbol name and the cached C++ demangled name. * symtab.c (lookup_demangled_partial_symbol, lookup_demangled_block_symbol): Remove prototypes and functions. * symtab.c (lookup_symbol): Remove use of expensive_mangler, use lookup_block_symbol instead of lookup_demangled_block_symbol. Remove code to try demangling names and matching them. * symtab.c (lookup_partial_symbol, lookup_block_symbol): Fix to try matching the cached demangled name if no match is found using the regular symbol name. * symtab.c (find_methods): Remove unused physnames array. * symtab.c (name_match, NAME_MATCH): Remove function and macro, replaced with SYMBOL_MATCHES_REGEXP from symtab.h. * symtab.c (completion_list_add_symbol): Rewrite to use cached C++ demangled symbol names. * symtab.h: Much reformatting of structures and such to add whitespace to make them more readable, and make them more consistent with other gdb structure definitions. * symtab.h (general_symbol_info): New struct containing fields common to all symbols. * symtab.h (SYMBOL_LANGUAGE, SYMBOL_DEMANGLED_NAME, SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME, SYMBOL_MATCHES_NAME, SYMBOL_MATCHES_REGEXP, MSYMBOL_INFO, MSYMBOL_TYPE): New macros. * symtab. (struct minimal_symbol, struct partial_symbol, struct symbol): Use general_symbol_info struct. * utils.c (demangle_and_match): Remove, no longer used. * valops.c (demangle.h): Include. * xcoffexec.c (eq): Remove macro, replace usages with STREQ. * blockframe.c, breakpoint.c, c-exp.y, c-valprint.c, dbxread.c, infcmd.c, m2-exp.y, minsyms.c, objfiles.h, solib.c, stack.c, symmisc.c, symtab.c, valops.c: Replace references to minimal symbol fields with appropriate macros. * breakpoint.c, buildsym.c, c-exp.y, c-typeprint.c, c-valprint.c, coffread.c, command.c, convex-tdep.c, cp-valprint.c, dbxread.c, demangle.c, elfread.c, energize.c, environ.c, exec.c, gdbtypes.c, i960-tdep.c, infrun.c, infrun-hacked.c, language.c, main.c, minsyms.c, mipsread.c, partial-stab.h, remote-es1800.c, remote-nindy.c, remote-udi.c, rs6000-tdep.c, solib.c, source.c, sparc-pinsn.c, stabsread.c, standalone.c, state.c, stuff.c, symfile.c, symmisc.c, symtab.c, symtab.h, tm-sysv4.h, tm-ultra3.h, values.c, xcoffexec.c, xcoffread.c: Replace strcmp and strncmp usages with STREQ, STREQN, or STRCMP as appropriate. * breakpoint.c, buildsym.c, c-typeprint.c, expprint.c, findvar.c, mipsread.c, printcmd.c, source.c, stabsread.c, stack.c, symmisc.c, tm-29k.h, valops.c, values.c: Replace SYMBOL_NAME references with SYMBOL_SOURCE_NAME or SYMBOL_LINKAGE_NAME as appropriate. * buildsym.c (start_subfile, patch_subfile_names): Default the source language to what can be deduced from the filename. * buildsym.c (end_symtab): Update the source language in the allocated symtab to match what we have been using. * buildsym.h (struct subfile): Add a language field. * c-typeprint.c (c_print_type): Remove code to do explicit demangling. * dbxread.c (psymtab_language): Add static variable. * dbxread.c (start_psymtab): Initialize psymtab_language using deduce_language_from_filename.
1992-11-21 * defs.h (sevenbit_strings): Add declaration.Fred Fish1-1/+1
* defs.h (printchar): Replace with gdb_printchar. * language.h (language_defn): Add new function pointers la_printchar and la_printstr, to do language dependent printing of characters and strings. * language.h (local_printchar, local_printstr): New macros to call language dependent functions pointed to by la_printchar and la_printstr respectively. * c-exp.y (emit_char, c_printchar, c_printstr): New language dependent functions for printing characters and strings. * c-exp.y (c_language_defn, cplus_language_defn): Add c_printchar and c_printstr. * command.c (do_setshow_command): Rename printchar use to gdb_printchar. * expprint.c (print_subexp): Replace C style string output with call to local_printstr. * language.c (unk_lang_printchar, unk_lang_printstr): New stubs, currently errors. * language.c (unknown_language_defn, auto_language_defn, local_language_defn): Add unk_lang_printchar and unk_lang_printstr. * m2-exp.y (emit_char, m2_printchar, m2_printstr): New language dependent functions to print characters and strings. * m2-exp.y (m2_language_defn): Add m2_printchar and m2_printstr. * utils.c (printchar): Renamed to gdb_printchar. * valprint.c (print_string): Remove prototype, function moved to c-exp.y, where it becomes c_printstr. * valprint.c (print_max): Made global for reference from the language dependent printing routines in *-exp.y. * valprint.c (repeat_count_threshold): New variable with function of old REPEAT_COUNT_THREHOLD define, but now settable by user. Change all references to old macro to references to new variable. * valprint.c (value_print, val_print): Replace calls to print_string with calls to local_printstr. * valprint.c (val_print): Replace C style character printing with call to local_printchar. * valprint.c (val_print): Add case for TYPE_CODE_CHAR. * valprint.c (_initialize_valprint): Add add_show_from_set call for setting up repeat_count_threshold as print variable. **** start-sanitize-chill **** * ch-exp.y (decode_integer_value): New function. * ch-exp.y (decode_integer_literal): Use decode_integer_value. * ch-exp.y (chill_printchar, chill_printstr): New language dependent functions for printing characters and strings. * ch-exp.y (chill_language_defn): Add chill_printchar and chill_printstr. **** end-sanitize-chill ****
1992-10-15* Makefile.in (VERSION): Roll to 4.6.8.John Gilmore1-3/+0
(OBS): Put version.o first, so Makefile rebuild happens early. * command.h: Publicize prototype for not_just_help_class_command. * command.c: Remove proto. * maint.c: Mark "mt" as an abbrev, to avoid duplicated help output. Move "maint info" from class info to class maintenance, and improve text. * infrun.c: Move "stop" to class_obscure, and give it a function so it will not be seen as a global help topic. FIXME, it should be possible to set these attributes independently. * core.c (core_command): Make nicer error message for no core support.
1992-10-01Add `command hooks' and a hook for inferior program stopping.John Gilmore1-2/+23
* command.h (struct cmd_list_element): Remove unused `aux' field. Add new `hook', `hookee', and `cmd_pointer' fields. * command.c (add_cmd): Initialize new fields, elim old. (add_alias_cmd): Clone new fields. (delete_cmd): Un-hook hookee if we're deleting hook. (help_cmd): Tell user the command is hooked, if it is. (lookup_cmd_1): Abbreviations return the original command instead of themselves, so that hooks on the original cmd will be run. * defs.h (enum command_class): Add class_pseudo and comments. * gdbcmd.h (execute_user_command): Add prototype. * infrun.c (normal_stop): If the stop command is hooked, run the hook whenever we stop. (hook_stop_stub): Stub for catch_errors. (_initialize_infrun): Set up pseudo "stop" command. * main.c (execute_user_command): Code extracted from execute_command. (execute_command): If hooked, run the hook before the command. (define_command): If defining a new hook, check the command it is hooking, and warn if none. Install the hook. * source.c (_initialize_source): "l" is an abbrev for "list". * doc/gdb.texinfo: Document command hooks. * Makefile.in (VERSION): Roll to 4.6.7. * config/sun4os4.mh: Remove dup inftarg.o from NATDEPFILES. * infrun.c (breakpoints_inserted): Make it static again. * tm-symmetry.h (FLOAT_INFO): #if 0 it for cross-ptrace abuse.
1992-07-10 * command.c (lookup_cmd_1): Clarify descriptive comments.Fred Fish1-20/+19
* gdbcmd.h (maintenanceprintlist): Add declaration. * main.c (maintenanceprintlist): Add definition. * main.c (gdb_completer_command_word_break_characters): Add. * main.c (symbol_completion_function): Switch completer word break character sets dynamically, based on whether completion is being done on commands or on something else. * main.c (initialize_cmd_lists): Init maintenanceprintlist. * maint.c: Include demangle.h. * maint.c (maintenance_demangle): New function. * maint.c (maintenance_print_command): New function. * maint.c (_initialize_maint_cmds): Reorganize some commands under new maintenance print subcommand.
1992-07-04 * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,Fred Fish1-1/+1
core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c, eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c, i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c, infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c, putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c, sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c, tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Remove "(void)" casts from function calls where the return value is ignored, in accordance with GNU coding standards.
1992-06-29 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,Fred Fish1-1/+1
symtab.h, tm-i386v4.h, valprint.c, values.c: Lint. * breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c, findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c, putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c, values.c: Replace bcopy() use with memcpy(), which is more standard and can take advantage of gcc's builtin functions for increased performance. * breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c, ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h, target.c, values.c: Replace bzero() use with memset(), which is more standard and can take advantage of gcc's builtin functions for increased performance. * i386-tdep.c, main.c, valprint.c: Replace bcmp() use with memcmp(), which is more standard and can take advantage of gcc's builtin functions for increased performance.
1992-06-23 * command.c (add_abbrev_prefix_cmd): Fix misspelling in comment.Fred Fish1-1/+1
* dwarfread.c (enum_type): Fix misspelling in comment. * valprint.c (val_print_fields, cplus_val_print): Minor adjustment to printing of C++ class structures to more closely match format for printing C structures, with and without setting pretty print.
1992-04-02Lint.John Gilmore1-2/+4
* symfile.c (add_symbol_file_command): Initialize mapped/readnow.
1992-03-29LintJohn Gilmore1-4/+4
1992-03-25 * command.c, main.c (various places): Use ctype.h macrosPer Bothner1-7/+4
(such as isupper(x)), instead of hard-wiring in ASCII-isms (such as (x >= 'A' && x <= 'Z')). (There are still more of these in other files.) * main.c (defined_command): Lower-case the user's new command before entering it. Needed because command lookup is case-insensitive (and also lower-cases). (Based on Metin's earlier patch.)
1992-03-03Tue Mar 3 15:11:52 1992 Michael Tiemann (tiemann@cygnus.com)Michael Tiemann1-1/+0
* All GDB files that #include defs.h: Removed stdio.h. (defs.h): #include stdio.h. This has been tested by building GDBs for all targets hosted on Sun4. None of the build problems were related to stdio.h inclusion. (n.b. many configurations don't build for other reasons.)
1992-02-22* Check in Fred Fish's changes in these modules. FredJohn Gilmore1-20/+45
will make ChangeLog entries for all of them.
1991-12-04* Makefile.in: VERSION 4.2.96.John Gilmore1-7/+8
* main.c (initialize_main): Revise command descriptions. * command.c (show_user): `info user' -> `show user'. * symtab.c (_initialize_symtab): Typo in `info types' desc. * coffread.c (coff_symfile_read): Avoid select_source_symtab, since it is not needed and can cause errors when examining ".o"s. (read_coff_symtab, decode_base_type): Use complain, not printf. Print symbol name, not its number. Remove "#if defined(clipper) #define BELIEVE_PCC_PROMOTION", which someday should go in a clipper target config file. * symfile.c (compact_misc_function_vector): Handle empty vector. (complain, clear_complaints, syms_from_objfile): Fix complaint formatting. * xcoffexec.c: Change syms_from_objfile caller.
1991-11-21* defs.h: Incorporate param.h. All users changed.John Gilmore1-3/+2
* param-no-tm.h: Change users to define TM_FILE_OVERRIDE instead. * param.h, param-no-tm.h: Removed. * Update copyrights in all changed files. * dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c, solib.c, symtab.h, tm-umax.h, valprint.c: Lint. * tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h, xm-merlin.h: Avoid host include files in target descriptions. * getpagesize.h: Removed, libiberty copes now.
1991-11-12Remove internal gdb definition of fixed arg count concat() function andFred Fish1-1/+1
convert to use of variable arg count concat() in libiberty.
1991-11-09Lint and some rs/6000 port.John Gilmore1-0/+1
1991-09-10* utils.c (error): if error_pre_print is set, print the stringJohn Gilmore1-3/+16
first. * main.c (main, print_gnu_advertisement, print_gdb_version): Reformat legalese so it always prints, but acts as an "I'm here" message while symbols are being read. If any errors occur, print a few newlines to set off the message and start it at the left margin. Remove mention of "help" command, and don't yak about symbol reading. (catch_errors): Error string is now printed first in case of error, not last. * command.c (undef_cmd_error, lookup_cmd): On undefined command, suggest the "help" command. * Makefile.in (VERSION): Set to 4.0.2.
1991-06-04Change GDB over to GNU General Public License version 2.John Gilmore1-13/+13
1991-05-02The list of changes is too long to fit in the cvs log (since it truncates!).Jim Kingdon1-3/+3
Look at the ChangeLog for Apr 30 and May 1.
1991-04-05*** empty log message ***John Gilmore1-0/+49
1991-03-28Johns releaseK. Richard Pixley1-0/+1150
1990-09-05Initial revisionJohn Gilmore1-856/+0
2012-06-03gdb-3.3gdb-3.31-125/+357
2012-06-03gdb-3.1gdb-3.11-97/+255
2012-06-03gdb-2.8.1gdb-2.8.11-0/+4
2012-06-03gdb-2.8gdb-2.81-1/+1
2012-06-03gdb-2.5.1gdb-2.5.11-21/+29
2012-06-03gdb-2.4+.aux.coffgdb-2.4+.aux.coff1-0/+454