Commit Graph

83 Commits

Author SHA1 Message Date
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
John Gilmore 1ab3bf1b14 * Check in Fred Fish's changes in these modules. Fred
will make ChangeLog entries for all of them.
1992-02-22 01:46:16 +00:00
John Gilmore 4369a1406f * Makefile.in: VERSION 4.2.96.
* 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-12-04 08:36:17 +00:00
John Gilmore 7d9884b927 * defs.h: Incorporate param.h. All users changed.
* 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-21 18:42:05 +00:00
Fred Fish 58ae87f612 Remove internal gdb definition of fixed arg count concat() function and
convert to use of variable arg count concat() in libiberty.
1991-11-12 17:50:14 +00:00
John Gilmore c466820795 Lint and some rs/6000 port. 1991-11-09 07:45:36 +00:00
John Gilmore 8106620887 * utils.c (error): if error_pre_print is set, print the string
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-09-10 08:56:09 +00:00
John Gilmore 99a7de40cb Change GDB over to GNU General Public License version 2. 1991-06-04 07:31:55 +00:00
Jim Kingdon e1ce8aa5ed The list of changes is too long to fit in the cvs log (since it truncates!).
Look at the ChangeLog for Apr 30 and May 1.
1991-05-02 04:28:42 +00:00
John Gilmore 3f2e006b77 *** empty log message *** 1991-04-05 09:02:10 +00:00
K. Richard Pixley dd3b648e8b Johns release 1991-03-28 16:28:29 +00:00
John Gilmore 831c851165 Initial revision 1990-09-05 17:54:31 +00:00
gdb-3.3 4187119d59 gdb-3.3 2012-06-03 15:36:32 +01:00
gdb-3.1 e91b87a368 gdb-3.1 2012-06-03 15:36:31 +01:00
gdb-2.8.1 bb7592f010 gdb-2.8.1 2012-06-03 15:36:31 +01:00
gdb-2.8 3bf57d2108 gdb-2.8 2012-06-03 15:36:31 +01:00
gdb-2.5.1 632ea0ccc5 gdb-2.5.1 2012-06-03 15:36:30 +01:00
gdb-2.4+.aux.coff 7b4ac7e1ed gdb-2.4+.aux.coff 2012-06-03 15:36:30 +01:00