Changes to account for name change from cygwin32 to cygwin and
clean up Win32-related ifdefs.
* configure.tgt: check for cygwin* instead of cygwin32.
New cygwin gdb_target variable loses the "32".
* configure.host: check for cygwin* instead of cygwin32.
New cygwin gdb_host variable loses the "32".
* configure.in: test __CYGWIN__ instead of __CYGWIN32__,
rename gdb_cv_os_cygwin32 variable to drop the "32". Call
AM_EXEEXT instead of AC_EXEEXT since that isn't in a released
autoconf yet.
* configure: regenerate.
* main.c: drop "32" from cygwin_ funcs, include sys/cygwin.h
where
cygwin path conv protos live, instead of adding a proto here
for
them here.
* {main.c, ser-tcp.c, ser-unix.c, top.c}: check __CYGWIN__
instead of __CYGWIN32__.
* source.c: thoughout, check _WIN32 instead of WIN32.
* config/i386/cygwin32.mh: delete.
* config/i386/cygwin.mh: new file, was cygwin32.mh.
* config/i386/cygwin32.mt: delete.
* config/i386/cygwin.mt: new file, was cygwin32.mt.
* config/i386/tm-cygwin32.h: delete.
* config/i386/tm-cygwin.h: new file, was tm-cygwin32.h.
* config/i386/xm-cygwin32.h: delete.
* config/i386/xm-cygwin.h: new file, was xm-cygwin32.h.
* config/i386/xm-windows.h: #include xm-cygwin.h now.
* config/powerpc/cygwin32.mh: delete.
* config/powerpc/cygwin.mh: new file, was cygwin32.mh.
* config/powerpc/cygwin32.mt: delete.
* config/powerpc/cygwin.mt: new file, was cygwin32.mt.
* config/powerpc/tm-cygwin32.h: delete.
* config/powerpc/tm-cygwin.h: new file, was tm-cygwin32.h.
* config/powerpc/xm-cygwin32.h: delete.
* config/powerpc/xm-cygwin.h: new file, was xm-cygwin32.h.
* rdi-share/aclocal.m4: regenerate with aclocal.
* rdi-share/configure: regenerate with autoconf.
* rdi-share/{host.h, hostchan.c, hostchan.h, serdrv.c,
* serpardr.c,
unixcomm.c}: check __CYGWIN__ instead of __CYGWIN32__.
TYPES_NAMESPACE, METHODS_NAMESPACE, and VARIABLES_NAMESPACE used by
new search_symbols.
Add prototype for search_symbols and free_search_symbols.
* symtab.c (list_symbols): Rewrite to use new search_symbols.
(file_matches): New helper function for search_symbols.
(free_search_symbols): New function which frees data returned from
search_symbols.
(print_symbol_info): New helper function which prints info about a
matched symbol to stdout. Extracted from old list_symbols.
(print_msymbol_info): New helper function which prints info about
a matched msymbol to stdout. Extracted from old list_symbols.
(symtab_symbol_info): Extracted from old list_symbols.
(variables_info): Use symtab_symbol_info.
(functions_info): Use symtab_symbol_info.
(types_info): Use symtab_symbol_info.
(rbreak_command): Rewrite to use new search_symbols.
* gdbtk.c: Change all references to static global "interp" to
"gdbtk_interp" and export this global.
(gdbtk_init): If gdbtk_source_filename is not NULL, source this file
into the interpreter when it goes idle.
Add new command "gdb_search".
(gdb_search): New function which searches the symbol table.
(gdbtk_test): New function called by main when the --tclcommand
option is used.
* main.c (main): Add a new option "--tclcommand" which is used
by the testsuite to source a file into the interpreter when it
goes idle.
* gdbtk.c (_initialize_gdbtk): Get rid of the console. Patch from
Chris Faylor (cgf@cygnus.com).
* configure.in: Link cygwin32 with subsystem console.
* configure: Regenerated
mdebugread.c os9kread.c source.c top.c utils.c: Don't
include param.h or sys/file.h (or unistd.h in some cases).
* defs.h exec.c inflow.c remote-array.c remote-e7000.c
sparcl-tdep.c terminal.h utils.c: Replace all occurances of
__WIN32__, WINGDB, WIN32, etc... with _WIN32.
* main.c: Remove #ifndef WINGDB around option processing. Fix
bug with passing argc==0 and argv==NULL to getopt.
* (main) Remove calls to access() before source_command. Let
soure_command handle access errors.
* maint.c (maintenance_dump_me): #ifdef out for _WIN32.
* symtab.c (operator_chars): Make this global for wingdb.
* top.c (disconnect): #ifdef out for _WIN32.
* (source_command): If got an error and from_tty, then call print
error, else just return quietly.
* utils.c (fatal_dump_core): Can't kill ourselves under windows.
Just exit.
* (pollquit notice_quit): #ifdef out stuff that doesn't exist
under windows.
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.
to fputs_unfiltered_hook. Differentiate stdout from stderr when
passing text into tcl land.
* defs.h, top.c, utils.c (error): Add error_hook.
* gdbtk.c: Improve mechanism for capturing output values.
* (full_filename): Remove.
* (gdb_cmd call_wrapper gdbtk_init): Protect all calls from tcl
land with call_wrapper. This prevents longjmps (usually via
error()) from jumping out of tcl/tk and leaving things in an
indeterminate state.
* gdbtk.tcl: New view option to disable line numbers. Put catch
around most uses of gdb_cmd. Add update button to reg config
window. Stop doing immediate updates when selecting registers.
Change register view values into checkbuttons.
--enable-xxx configure option by adding ENABLE_{CLIBS DEPFILES}
where appropriate.
* General hackery to support alternate user-interface.
* breakpoint.c (mention, delete_breakpoint, enable_breakpoint,
disable_breakpoint): Call hooks for alternate user-interface.
* defs.h: Add declarations for alternate user-interface hooks.
* main.c (main): Add --nw (and --nowindows) options to disable
the GUI.
* (near call to command_loop): Call command_loop_hook if set.
* (fputs_unfiltered): Call fputs_unfiltered_hook if set.
* stack.c: Call print_frame_info_listing_hook if set.
* top.c (gdb_init): Initialize targets.c and utils.c prior to
other files to make sure that calls to error and warning will
work. Call init_ui_hook after everything else.
* utils.c (query): Call query_hook if set.
* (gdb_flush): Call flush_hook if set.
* Change _initialize_utils to initialize_utils cuz we don't use
automatic initialization of utils.c anymore.
* Support for TK GUI.
* Makefile.in: Add rule for gdbtk.o.
* configure.in: Add support for --enable-gdbtk.
* gdbtk.c: New file. Contains support routines for TK interface.
* gdbtk.tcl: New file. Implements GUI policy.
* remote.c: Get rid of #ifdef DONT_USE_REMOTE. It's no longer
necessary.
(SiowGDB): New target, GDB using SIOW library.
(init-new.c): New target, attempt to generate init.c from sources.
(main.c.o, top.c.o): Put each in its own segment.
* main.c (main) [MPW]: Always call mac_init.
* utils.c (query) [MPW]: Always return "yes" if in MacGDB, output
an extra newline otherwise.
* mac-xdep.c: More comments in various places, remove junk.
(mac_init): Add tests for MPW and SIOW.
(use_wne, has_color_qd): Renamed.
(use_color_qd): New variable.
(grow_window): Only do console resizing to console window,
call resize_console_window.
(zoom_window): Call resize_console_window.
(resize_console_window, scroll_text): New functions.
(adjust_console_sizes): Always align viewrect to even multiples of
text lines.
(adjust_console_text): Always scroll by whole lines.
(hacked_vfprintf, hacked_puts, hacked_fputc, hacked_putc): Force a
recalculation of scroll positions if a newline was output.
(hacked_fflush): Similarly, for flushing.
(hacked_fgetc): New function, aborts if called in MacGDB.
* ser-mac.c (mac_readchar): Rename starttime to start_time,
remove debugging printf.
(mac_write): Sleep on first 4 writes.
(sec_sleep): New function, works like standard sleep.
* macgdb.r: Adjust positioning and contents of About box.
Set minimum size to 2000K, preferred size to 5000K.
* config/m68k/xm-mpw.h (fgetc): Define as a macro.
(child_mourn_inferior): Call proc_remove_foreign.
* main.c (gdb_init): Call init_proc.
* main.c: Provide dummy versions of init_proc, proc_wait, and
proc_remove_foreign for the gdb case (the libgdb case provides its
own versions of these functions).
* Makefile.in (libgdb-files): Add libproc.a.
BROKEN_LARGE_ALLOCA. Do the cleanup before returning, rather than
leaving it on the chain. Reindent much of this function.
* config/sparc/{xm-sun4sol2.h,xm-sun4os4.h},
config/i386/{xm-sun386.h,xm-i386m3.h,xm-i386mach.h},
config/m68k/{sun3os4.h,xm-news.h,xm-hp300hpux.h},
config/ns32k/xm-ns32km3.h: Remove all references to
BROKEN_LARGE_ALLOCA; with the above change it is no longer needed.
* main.c, fork-child.c, many config files: Remove all
SET_STACK_LIMIT_HUGE code; with the above changes it should no
longer be needed.
* symtab.c (lookup_partial_symbol): Use if and abort, not assert.
This avoids __eprintf troubles.
* main.c (main): Surround in #ifndef MAIN_OVERRIDE. Move
initialization code which needs to be called even if we bypass the
command line stuff into gdb_init.
* utils.c (fputs_unfiltered): Surround in #ifndef
FPUTS_UNFILTERED_OVERRIDE.
* Makefile.in (libgdb.a): New target.
* utils.c: Rearrange I/O stuff a bit so that all output goes
through fputs_unfiltered. Use vasprintf; removes arbitrary limit
which made %s not work with arbitrarily large strings.
* printcmd.c (printf_command): Use printf_filtered, not
printf_unfiltered and printf, now that arbitrary limit is gone.
Thu May 12 17:04:58 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-make.in (INCLUDE_CFLAGS): Add readline source dir.
(READLINE_CFLAGS, READLINE_SRC, READLINE_DIR): Uncomment.
(TSOBS): Don't compile inflow.c.
(all, install): Add MacGDB.
* main.c (main): Do Mac-specific init and command loop if a
standalone app, skip full option help message if compiling
with MPW C.
(gdb_readline): If MPW, add a newline after the (gdb) prompt.
* utils.c (_initialize_utils): If MPW, don't try to use termcap to
compute the window size.
* config/m68k/xm-mpw.h (printf, fprintf, fputs, fputc, putc,
fflush): Define as macros that expand into hacked_... versions.
(StandAlone, mac_app): Declare.
* macgdb.r (SIZE): Set the default partition to 4000K.
* mac-xdep.c (readline.h, history.h): Include.
(terminal.h): Don't include.
(mac_app): Define.
(gdb_has_a_terminal): Define Mac-specific version.
(do_keyboard_command): Simplify search for command string.
(readline): Define as gdb_readline.
Add other history/readline stubs to make main gdb link.
(hacked_fprintf, hacked_printf, hacked_vfprintf, hacked_fputs,
hacked_fputc, hacked_fflush): New functions, intercept output to
stdout and stderr, send to console window.
target null pointer.
* blockframe.c (find_frame_addr_in_frame_chain): Likewise.
* printcmd.c (output_command): Annotate things we print here too.
* Move declaration of print_value_flags from defs.h to value.h.
* main.c (command_line_input): Call wrap_here as well as gdb_flush.
the same as --annotate=1.
(command_line_input): Print annotatation before and after prompt.
* blockframe.c (flush_cached_frames): Print annotation.
* Rename frame_file_full_name to annotation_level and move it from
symtab.h to defs.h.
* source.c (identify_source_line): If annotation_level > 1,
change output format.
* breakpoint.c: Print annotation whenever a breakpoint changes.
* main.c: New variable server_command.
(command_line_input): Parse "server " and set server_command.
(dont_repeat): Check server_command.
<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.
VARIABLES_INSIDE_BLOCK to OS9K_VARIABLES_INSIDE_BLOCK.
* symfile.c (symbol_file_command): Check for (CORE_ADDR)-1, not
(CORE_ADDR)0, from target_link, since that is what it uses.
Process name at end, not during parsing (like we did before Kung's
change), so that -readnow and -mapped can appear anywhere.
Make text_relocation a local variable.
* config/i386/i386os9k.mt: Fix comment.
* Makefile.in (ALLDEPFILES): Add remote-os9k.c.
* os9kread.c: Put "comments" after #endif inside /* */.
* stabsread.h: Add os9k_stabs variable.
* stabsread.c (start_stabs), os9kread.c (os9k_process_one_symbol):
Set it.
* stabsread.c (define_symbol): If os9k_stabs, put a 'V' symbol
descriptor in global_symbols not local_symbols.
(read_type): If os9k_stabs, accept 'c', 'i', and 'b' type
descriptors.
(read_type): If os9k_stabs, accept function parameters after 'f'
type descriptor.
(read_array_type): If os9k_stabs, don't expect index type and
expect lower and upper to be separated by ',' not ';'.
(read_enum_type): If os9k_stabs, read a number before the first
enumeration constant.
(os9k_init_type_vector): New function.
(dbx_lookup_type): Call it when starting new type vector.
* config/i386/tm-i386os9k.h: Define BELIEVE_PCC_PROMOTION.
* (os9k_process_one_symbol): Call define_symbol not os9k_define_symbol.
* os9kstab.c: Removed.
* Makefile.in: Update accordingly.
* objfiles.c (objfile_relocate_data): Removed.
* remote-os9k.c (rombug_wait): Call objfile_relocate
not objfile_relocate_data.
* objfiles.h, objfiles.c: Remove find_pc_objfile.
* remote-os9k.c (rombug_wait): Call find_pc_section not
find_pc_objfile.
* main.c (quit_command): Check inferior_pid; revert Kung change.
* remote-os9k.c (rombug_create_inferior): Set inferior_pid.
ChangeLog objfiles.c objfiles.h symfile.c target.c main.c
Makefile.in configure.in
Added Files:
os9kread.c os9kstab.c remote-os9k.c
* os9kread.c: New file to read os9000 style symbo table.
* os9kstab.c: new file to read os9000 style stabs.
* remote-os9k.c: remote protocol talking to os9000 rombug monitor.
* objfiles.c (find_pc_objfile): new function to search objfile
from pc.
* objfiles.c (objfile_relocate_data): new function to relocate
data symbols in symbol table.
* objfiles.h: Add two aux fields in struct objfile to handle
multiple symbol table files situation like in os9000.
* symfile.c: Change so 'symbol-file' command can handle multiple
files. Also call target_link() to get relocation infos.
* target.c (target_link): new function to get relocation info when
a symbol file is requested to load.
* main.c (quit_command): take out 'inferior_pid != 0' condition,
because in cross mode there's no inferior pid, bit they need to
be detached.
Makefile.in: add os9kread.c os9kstab.c and .o's.
configure.in: add i386os9k target.
config/i386/i386os9k.mt: new add.
config/i386/tm-i386os9k.h: new add.
* remote-utils.c (usage): Fix message to be accurate and conform
more closely to normal conventions.
* remote-utils.c (gr_files_info): Have the exec_bfd test control
whether to show information about exec_bfd, and not control whether
to show information about device and speed.
* remote-utils.c (gr_open): If sr_get_device returns NULL, give
usage message, don't dump core.
* remote-bug.c (bug_write_memory): Use alloca, not GCC extension
for variable size array.
(bug_fetch_register, bug_store_register): Rename "value" to
"fpreg_buf" because some compilers don't like variables whose
names are the same as types.
(bug_store_register): Use a cast when converting char * to
unsigned char *.
not OBJ_UNWIND_INFO. Assigning to a cast is a GCC-ism which
the HP compiler in ANSI mode doesn't like.
* main.c: When defaulting HAVE_SIGSETMASK based on USG, just do it
based on USG, rather than defining HAVE_SIGSETMASK to an expression
containing defined. This is for the HP compiler in ANSI mode.
* remote-mips.c: Use it instead of error() most places.
* remote-mips.c (mips_receive_packet): New arg throw_error.
(mips_initialize): Use it not catch_errors.
* defs.h: Declare error_pre_print and warning_pre_print here...
* main.c: ...not here.
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.
remove #include "remote-utils.h". This makes it possible to build
GDB without remote-utils.c. Also, move setting of remote_debug
into main, so that all remote*.c files can use it (not just the
serial line ones). And, make baud_rate be an int.
* remote-udi.c: Change kiodebug to remote_debug.
* remote-utils.c: Move setting of baud rate and debug into main.c.
* remote-utils.h: Redefine sr_{get set}_debug and sr_{get set}_baud
to use baud_rate and remote_debug globals for compatibility.
* remote.c: Use remote_debug and baud_rate globals directly,
instead of sr_ functions, so that we don't need to load
remote-utils.c.
${srcdir}/../include.
* config/m88k/xm-delta88.h: Comment out unused defines which conflict
with system headers.
* printcmd.c (printf_command): Cast second arg to vprintf to PTR.
Use VPRINTF macro if defined.
* config/m88k/xm-delta88.h: Define VPRINTF. Include <sys/siginfo.h>.
Define TIOC{GETC,GLTC}_BROKEN.
* m88k-nat.c: Uncomment include of <sys/ptrace.h>.
* main.c: Rename initialize_{main,cmd_lists,history} to init_* to
make things easier on munch (apparently this matters on
the delta88 with svr3).
source.c: Use it for "directory" command.
(But '/' is a word break, limiting usefulness; see comments).
* source.c (mod_path): Warning not error if can't find directory.
* eval.c (evaluate_subexp): Handle new BINOP_MOD.
* expprint.c (dump_expression): Handle new BINOP_MOD.
* language.c (binop_type_check): Handle new BINOP_MOD.
* main.c (float_handler): Re-enable float handler when hit.
* valarith.c (language.h): Include, need current_language.
* valarith.c (TRUNCATION_TOWARDS_ZERO): Define default macro
for integer divide truncates towards zero for negative results.
* valarith.c (value_x_binop): Handle BINOP_MOD if seen.
* valarith.c (value_binop): Allow arithmetic operations on
TYPE_CODE_CHAR variables. Add case to handle new BINOP_MOD.
**** start-sanitize-chill ****
* ch-exp.y (operand_4): Add useful actions for MOD and REM.
* ch-exp.y (tokentab3): Add MOD and REM.
* ch-exp.y (yylex): Set innermost_block for symbols found
in local scopes. Return LOCATION_NAME for local symbols.
* ch-lang.c (chill_op_print_tab): Fix MOD entry to use
BINOP_MOD instead of BINOP_REM. Add REM entry, using BINOP_REM.
**** end-sanitize-chill ****
* 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.
* Makefile.in (SFILES_MAINDIR): Add typeprint.c, c-typeprint.c,
m2-typeprint.c, c-valprint.c cp-valprint.c m2-valprint.c.
* Makefile.in (HFILES): Add valprint.h.
* Makefile.in (OBS): Add typeprint.o, c-typeprint.o,
m2-typeprint.o, c-valprint.o, cp-valprint.o m2-valprint.o.
* typeprint.c, typeprint.h: New files for language independent
type printing functions.
* c-typeprint.c, m2-typeprint.c: New files for language dependent
type printing functions and definitions.
* valprint.h: New include file for language independent value
printing definitions.
* c-valprint.c, cp-valprint.c, m2-valprint.c: New files for language
dependent value printing functions.
* c-exp.y (production ptype): Add range_type variable and use new
create_range_type function.
* c-exp.y (tokentab2, tokentab3), c-lang.c (c_op_print_tab),
infcmd.c (path_var_name), language.c (unk_op_print_tab),
m2-lang.c (m2_op_print_tab): Change from ANSI-obsolescent
"const static" to ANSI-conformant "static const".
* c-exp.y (c_create_fundamental_type): Remove unused nbytes.
* c-exp.y (c_language_defn, cplus_language_defn): Add c_print_type,
and c_val_print.
* c-lang.h (c_print_type, c_val_print): Add prototypes.
* coffread.c (decode_type): Add range_type variable and call to
new create_range_type function.
* complaints.c (complain): Remove unused val variable.
* complaints.c (_initialize_complaints): Make it void.
* convex-tdep.c (value_of_trapped_internalvar): Add range_type
variable and call new create_range_type function.
* defs.h (enum val_prettyprint): Move enum from value.h to here
so we can avoid having to include value.h just for prototypes that
need the enum (thanks ANSI).
* dwarfread.c (struct_type): Local anonymous_size variable is
only used if !BITS_BIG_ENDIAN.
* dwarfread.c (decode_subscript_data_item): Add rangetype
variable and call new create_range_type function.
* elfread.c (elf_symfile_read): Remove unused dbx and text_sect
variables.
* eval.c (evaluate_subexp): Remove unused local variable name
and the statement with no side effects that initializes it.
* expprint.c (print_subexp): Change local_printstr to
LA_PRINT_STRING.
* gdbtypes.c (create_range_type): New function that creates
a range type using code fragments from object file readers as
an example of what has to be initialized.
* gdbtypes.c (create_array_type): Removed index_type, low_bound,
and high_bound parameters, replaced with a single range_type
parameter. Change function body to use passed in range_type
rather than handcrafting one.
* gdbtypes.h (create_range_type): Add prototype.
* gdbtypes.h (create_array_type): Change prototype parameters.
* infrun.c (normal_stop): Remove unused local variables tem and c.
* infrun.c (hook_stop_stub): Return 0 rather than random value.
* language.c (unk_lang_print_type, unk_lang_val_print): Add
stub functions that call error if called.
* language.c (unknown_language_defn, auto_language_defn,
local_language_defn): Add initializers unk_lang_print_type and
unk_lang_val_print.
* language.h (struct language_defn): Reformat for larger
comments, add la_print_type and la_val_print members. Add
LA_PRINT_TYPE and LA_VAL_PRINT macros. Change local_printchar
to LA_PRINT_CHAR and local_printstr to LA_PRINT_STRING.
* m2-lang.c (m2_create_fundamental_type): Remove unused local
variable nbytes.
* m2-lang.c (m2_language_defn): Add initializers m2_print_type
and m2_val_print.
* m2-lang.h (m2_print_type, m2_val_print): Add prototypes.
* main.c (execute_command): Remove unused local variable cmdlines.
* main.c (echo_command), stabsread.c (read_type), printcmd.c
(clear_displays), symmisc.c (block_depth), values.c
(clear_value_history):
Make testing of truth value of assignment result explicit.
* mipsread.c (upgrade_type): Update FIXME to include future use
of create_range_type.
* printcmd.c (ptype_command, ptype_eval, whatis_command,
whatis_exp, maintenance_print_type): Move prototypes and functions
to new typeprint.c.
* printcmd.c (_initialize_printcmd): Move add_com calls for
ptype_command and whatis_command to new typeprint.c.
* ser-bsd.c (serial_open): Remove unused variable sgttyb.
* source.c (find_source_lines): Local variable c only used
when LSEEK_NOT_LINEAR is defined.
* stabsread.c (read_array_type): Use new create_range_type
function.
* stabsread.c (read_range_type): Add new index_type variable and
call new create_range_type function rather than handcrafting
range types.
* symmisc.c (type_print_1): Change usages to LA_PRINT_TYPE.
* symtab.c (typedef_print usages): Use c_typedef_print, renamed.
* symtab.c (type_print_base usages): Use c_type_print_base.
* symtab.c (type_print_varspec_prefix usages): Use
c_type_print_varspec_prefix.
* symtab.c (type_print_method_args usages): Use
cp_type_print_method_args.
* valprint.c: Completely ripped apart and the fragments used
to create c-valprint.c, cp-valprint.c, m2-valprint.c, and
valprint.h. Remaining stuff is language independent.
* value.h (struct fn_field): Forward declare for prototypes.
* value.h (type_print_1): Remove prototype.
* value.h (enum val_prettyprint): Moved to defs.h.
* value.h (typedef_print): Prototype renamed to c_typedef_print.
* value.h (baseclass_offset): Add prototype.
**** start-sanitize-chill ****
* Makefile.in (SFILES_MAINDIR): Add ch-typeprint.c, ch-valprint.c.
* Makefile.in (OBS): Add ch-typeprint.o, ch-valprint.o.
* ch-typeprint.c: New file for language dependent type printing.
* ch-valprint.c: New file for language dependent value printing.
* ch-exp.y (parse_number): Remove prototype and stub function.
* ch-exp.y (decode_integer_literal): Removed unused digits and
temp variables.
* ch-exp.y (convert_float): Completely ifdef out for now.
* ch-exp.y (tokentab2, tokentab3, tokentab4, tokentab5),
ch-lang.c (chill_op_print_tab):
Change from ANSI-obsolescent "const static" to ANSI-conformant
"static const".
* ch-exp.y (yylex): Add unhandled storage class enumeration
literals to switch statement for completeness.
* ch-lang.c (chill_create_fundamental_types): Remove unused
nbytes variable. Change dummy type to 2 bytes to match int.
Handle FT_VOID types gratuituously added to chill DWARF by
compiler. Change FT_CHAR case to generate an TYPE_CODE_CHAR
type rather than a one byte TYPE_CODE_INT type.
* ch-lang.c (chill_language_defn): Add chill_print_type and
chill_val_print.
* ch-lang.h (chill_print_type, chill_val_print): Add prototypes.
**** end-sanitize-chill ****
* remote.c: Avoid printf_filtered line limit. Suggested by
Robert R. Henry, <rrh@tera.com>.
* main.c (main): Accept --silent as well as --quiet. Change +help
to --help. Suggested by Karl Berry, <karl@cs.umb.edu>.
Replace with simple default to C before processing any init
files. There MUST be a language set, even in the absence of
init files or executables, or expression parsing fails.
symfile.c. Fixup places where command files are processed to
be consistent in setting a default language if none has been
previously set.
* symfile.c (set_initial_language): Add code moved from
main() that sets an initial default language when a new
symbol file is read.
* symfile.c (symbol_file_command): Call set_initial_language.
* symtab.c (find_main_psymtab): Add FIXME comment.
* Makefile.in (SFILES_MAINDIR): Add new file maint.c.
* Makefile.in (OBS): Add new file maint.o.
* defs.h (command_class): Add class_maintenance.
* defs.h (MAINTENANCE_CMDS): Default to including maintenance
commands. Allow for them (and other nonessential parts of gdb)
to be selectively left out under special circumstances.
* gdbtypes.c (recursive_dump_type): New function; supports
maintenance print-type command.
* gdbtypes.h (recursive_dump_type, maintenance_print_type):
Add prototypes.
* main.c (maintenancelist, maintenanceinfolist): Add maintenance
command lists.
* main.c (initialize_cmd_lists): Eliminate unnecessary casts on
initializers. Add initializations for setprintlist, showprintlist,
setchecklist, showchecklist, maintenancelist, and maintenanceinfolist.
* printcmd.c (maintenance_print_type): New maintenance cmd.
* valprint.c (setprintlist, showprintlist): Move to main.c, as
implied by comment that all cmd lists are owned by main.c.
* infcmd.c (unsetlist): Move to main.c, as implied by comment
that all cmd lists are owned by main.c.
* language.c (setchecklist, showchecklist): Move to main.c, as
implied by comment that all cmd lists are owned by main.c
* breakpoint.c (enablelist, enablebreaklist, disablelist, cmdlist,
deletelist): Remove redundant declarations (also in gdbcmd.h).
* symmisc.c (printsyms_command): Now maintenance_print_symbols.
* symmisc.c (printmsyms_command): Now maintenance_print_msymbols.
* symmisc.c (printpsyms_command): Now maintenance_print_psymbols.
* symmisc.c (printobjfiles_command): Now maintenance_print_objfiles.
* symtab.h (maintenance_print_symbols, maintenance_print_psymbols,
maintenance_print_msymbols, maintenance_print_objfiles):
Add prototypes.
* symmisc.c (printsyms_command, printpsyms_command,
printmsyms_command, printobjfiles_command): Removed from
_initialize_symmisc.
* main.c (dump_me_command): Moved to maint.c and renamed to
maintenance_dump_me.
* breakpoint.c (all_breakpoints_info): Rename to
maintenance_info_breakpoints.
* breakpoint.c (_initialize_breakpoint): Convert add_info of
all_breakpoints_info to add maintenance_info_breakpoints to the
maintenanceinfolist instead.
main.c (initialize_main): Set up maintenance class commands.
the argv arguments (e.g. reading symbol files or core
files). This allows global parameters to be set, which will apply
during the symbol reading. The ./.gdbinit is still read after
argv processing.
* symtab.c (list_symbols): `i variables' shouldn't show enum values.
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.
breakpoint.h, tm-sun4os4.h, tm-sparc.h, sparc-tdep.c, tm-mips.h,
mips-tdep.h, tm-sun3.h, tm-68k.h, m68k-tdep.h: Add support for
stepping (and nexting) through longjmp(). Also, cleanup
breakpoint handling quite a bit by creating explicit breakpoint
types instead of using magic breakpoint numbers.
Makefile.in: Update version to 4.4.3
* tm-68k.h (FPI_REGNUM): Add.
* infrun.c (child_create_inferior): flush stdout and stderr
before forking.
* configure.in: Handle amigados, amix hosts and targets.
* inflow.c: Handle TIOCGLTC_BROKEN for Amiga.
From Andreas Schwab:
* values.c (show_convenience): Use printf_filtered.
* main.c (define_command): Check result of lookup_command for
exact match.
(echo_command): Use printf_filtered, and force output out.
* dbxread.c (read_enum_type): Avoid Modula-2 kludge that breaks C
programs.
* i387-tdep.c (double_to_i387): Fix typo for double_to_ieee_extended.
* utils.c (_initialize_utils): If !ISATTY, don't paginate.
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.
* core.c (core_open): Open file ourselves, read or r/w, depending on
write_files. Use bfd_fdopenr.
* gdbcore.h (write_files): New variable.
* exec.c (write_files): Define variable, add set&show for it.
(exec_file_command): Use write_files to open for read or r/write.
Make shared library reading happen automatically. These changes
are mostly from Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.
* inferior.h (stop_soon_quietly): Add to exported variables.
* infrun.c (child_create_inferior): call solib hook, if defined.
(child_attach): call solib hook, if defined.
* solib.c: Include inferior.h. Add from_tty to so_list as kludge.
(find_solib): Use lookup_misc_func rather than hand-rolled.
(symbol_add_stub): New stub for catch_errors.
(solib_add): Avoid output if !from_tty. Catch errors rather
than just calling symbol_file_add and bombing.
(solib_create_inferior_hook): Interface with the target process
to let it read and alloc shared libs, then figure out what it did.
* core.c (validate_files): Fix typo, soften warning.
(Fix from Hiroto Kagotani <kagotani@cs.titech.ac.jp>.)
* utils.c (fputs_demangled): Avoid duplicate printing if
demangling is off. (Fix from J.T. Conklin <jtc@cayenne.com>.)
* infrun.c (proceed): Cast -1 to (CORE_ADDR) before comparing.
(Fix from pierre@la.tce.com (Pierre Willard).)
* main.c (catch_errors): Change argument to a char * from an int,
since a char * can point to a struct full of glop, but an int
is not guaranteed to be able to hold a pointer.
* breakpoint.c (breakpoint_cond_eval, bpstat_stop_status,
breakpoint_re_set_one, breakpoint_re_set): Adapt.
* core.c (core_open, solib_add_stub): Adapt.
* remote-vx.c (symbol_stub, add_symbol_stub, callers): Adapt.
* dbxread.c (read_struct_type): If const/volatile character is
missing, don't complain, just continue.
* dbxread.c (read_struct_type): Only try to read the fcontext if
it is there. Also change "error_type " to "return error_type ".
values.c (value_virtual_fn_field): If there is no fcontext,
then do things the way GDB 3.x did.
valops.c (search_struct_method): Add type to value_virtual_fn_field
arguments.
* dbxread.c (read_struct_type): Fix typo: *pp != '\0' -> **pp != '\0'.