Commit Graph

67 Commits

Author SHA1 Message Date
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda 53a5351d90 import gdb-1999-08-23 snapshot 1999-08-23 22:40:00 +00:00
Jason Molenda 96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +00:00
Jason Molenda 43e526b9b4 import gdb-1999-07-12 snapshot 1999-07-12 11:15:22 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Jason Molenda 9e086581c7 import gdb-1999-0519 1999-05-19 19:58:41 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Jason Molenda 24418cfbac 1998-10-16 Jason Molenda (jsm@bugshack.cygnus.com)
* 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-16 21:45:06 +00:00
Andrew Cagney dd87762571 command.c: Include "wait.h" after, rather than before, <wait.h>.
"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-10-15 06:59:40 +00:00
Jason Molenda 4ff3dfab54 1998-08-18 Jason Molenda (jsm@bugshack.cygnus.com)
* 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-08-18 23:04:24 +00:00
Martin Hunt 1d7a3fd775 Wed Mar 4 16:53:52 1998 Martin M. Hunt <hunt@cygnus.com>
* 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.
1998-03-05 01:04:13 +00:00
Jason Molenda 36ad9bd5b6 * command.c (add_cmd, add_show_from_set): Insert new commands in
alphabetical order.
1997-09-27 00:34:41 +00:00
Jeff Law efaf2b5892 * blockframe.c (generic_get_saved_regs): Remove unused variable
"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.
1997-02-10 23:15:37 +00:00
Stu Grossman 76420d4630 * command.c (do_setshow_command): Don't segfault when showing
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-07-17 06:41:25 +00:00
Fred Fish b52cac6b76 * core-aout.c (fetch_core_registers): Cast core_reg_size to int
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-03-30 05:45:10 +00:00
Fred Fish f56cc4e719 * command.c (add_cmd): Add missing initialization for enums member.
Reorder members to match structure declaration to make it easier to
	tell when one is missing.
1996-02-03 19:39:34 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
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-08-01 20:14:27 +00:00
J.T. Conklin 1a49497348 * configure.in: Check for unistd.h.
* 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-07-31 22:46:03 +00:00
Stu Grossman 236274b9f8 * command.h command.c: Add var_enum command type. It's like
var_string but allows only only one of the specified strings.
1995-03-07 08:32:55 +00:00
Jeff Law 59528079ca * command.c (show_user_1): Use print_command_line to show a user
defined command (including control structures).

	* top.c (init_main): Change documentation for user defined
	commands to indicate they may accept up to ten arguments.
1995-01-11 07:46:44 +00:00
Jim Kingdon 72e35288c7 * command.c (do_setshow_command, case var_string): Never add a
space to the end of the string.
	* NEWS: Document this change.
	* .gdbinit: Add a space to the "set prompt" command.
1994-03-26 15:15:00 +00:00
Jim Kingdon 0997322359 * main.c (complete_command): New command, from Rick Sladkey
<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-03-24 15:00:52 +00:00
Jim Kingdon e635796721 * command.c (empty_sfunc): New function.
(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-03 19:39:47 +00:00
Jim Kingdon 719d9abbd2 * command.c (add_set_cmd, no_just_help_class_command): Change
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 20:20:59 +00:00
Jim Kingdon 5b3591ab5c * command.c (shell_escape): Report errors correctly (with error
message from strerror).
1994-02-02 19:58:31 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
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-11-01 22:25:23 +00:00
Jim Kingdon a32ebcfd6b * main.c (filename_completer): Don't complete to files ending in ~.
* 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-06-25 03:47:12 +00:00
Jim Kingdon 87237c5250 * Changes from (or inspired by) AMD:
* 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-25 04:49:34 +00:00
K. Richard Pixley f936e20d33 comment changes only 1993-04-22 23:34:57 +00:00
Jim Kingdon 359a097f9f Tue Mar 30 08:06:24 1993 Jim Kingdon (kingdon@cygnus.com)
* 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-30 23:06:29 +00:00
John Gilmore 3021c40d20 (show_user): Avoid fprintf_filtered botch (AGAIN!). 1993-03-17 20:21:55 +00:00
John Gilmore 4966c17c42 Lint fixes from Paul Eggert (eggert@twinsun.com):
* 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-03-05 01:44:38 +00:00
Steve Chamberlain 5fe932391d * command.c (shell_escape, make_command, _initialze_command):
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
1993-01-04 15:39:00 +00:00
Fred Fish 2e4964adfc * defs.h (STRCMP, STREQ, STREQN): New macros.
* 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-12-23 06:34:57 +00:00
Fred Fish 5d074aa977 * defs.h (sevenbit_strings): Add declaration.
* 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-11-21 06:10:08 +00:00
John Gilmore 327f7197b0 * Makefile.in (VERSION): Roll to 4.6.8.
(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-15 13:42:10 +00:00
John Gilmore a65841d768 Add `command hooks' and a hook for inferior program stopping.
* 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-10-01 09:57:36 +00:00
Fred Fish 311592ff50 * command.c (lookup_cmd_1): Clarify descriptive comments.
* 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-10 17:22:35 +00:00
Fred Fish 4ed3a9ea66 * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,
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-07-04 03:22:08 +00:00
Fred Fish 51b57ded88 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
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-29 23:34:38 +00:00
Fred Fish 0efe20a642 * command.c (add_abbrev_prefix_cmd): Fix misspelling in comment.
* 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-06-23 03:33:47 +00:00
John Gilmore ac88ca205c Lint.
* symfile.c (add_symbol_file_command):  Initialize mapped/readnow.
1992-04-02 10:35:19 +00:00
John Gilmore be772100b5 Lint 1992-03-29 23:26:47 +00:00
Per Bothner 5c71cf23f9 * command.c, main.c (various places): Use ctype.h macros
(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-25 23:07:16 +00:00
Michael Tiemann d747e0af3d Tue Mar 3 15:11:52 1992 Michael Tiemann (tiemann@cygnus.com)
* 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-03-03 23:26:26 +00:00