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.
* partial-stab.h: Ignore N_ENDM.
* elfread.c (elf_symtab_read): Ignore symbols that don't have a
CODE or DATA section attachment. This eliminates a lot of random
values from shared libraries, which screw up the ordinary symbols
in the address ranges they happen to overlap.
* buildsym.c (define_symbol): Eliminate special tests
for function types; move into "function" cases in switch statement.
(define_symbol: 'f', 'F', 'P'): Process all parameter types
in case they define new type numbers. But ignore them (FIXME).
('k', 'B'): Ignore const and volatile if we see them (FIXME).
(read_sun_builtin_type): Add commentary.
* tm-mips.h (GDB_TARGET_IS_MIPS): Define for mips-xdep.c.
(READ_MIPS_FORMAT, COFF_FORMAT): Remove, unused now.
* mips-xdep.c: Remove most include files (unused, caused errs).
(fetch_core_registers): Use right parameters in dummy fn.
Fix from Jim Williams.
* stack.c (return_command): Evaluate expression *before* popping
off the stack frames! Fix inspired by Jim Williams.
(up_silently_command, down_silently_command): No sel frame is error.
* defs.h (memcpy, memset): Conditionalize decls on
#ifndef MEM_FNS_DECLARED, since DECstation differs.
(alloca): Break out the STDC and non-STDC alloca cases, to make
it work on old preprocessors as well as "picky ANSI" ones.
* xm-mips.h (memcpy, memset): Declare, and set MEM_FNS_DECLARED.
* mips-tdep.c (heuristic_proc_start): Zero arg produces zero.
* utils.c (fputs_demangled): Rename SLOP since DECstation system
header files define it!
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.
* defs.h (alloca): More diddling with alloca. Have to ensure
that it has a prototype, so that if alloca is defined as a macro
that takes an arg, the definition is seen as a use of a macro
that takes an arg, to satisfy picky ANSI preprocessors.
consistency with all other gdb files.
* cadillac.c: Use <string.h> rather than <strings.h>.
* cadillac.c (kernel_dispatch): Convert rindex usage to strrchr.
* Makefile.in (MAKE): Remove definition for consistency with
other Makefile.in files and to fix problem with recursive makes.
conditional.
* hppabsd-core.c: Don't include "param.h", include <sys/param.h>
instead.
* remote.c (remote_wait): Cast signal to void * to avoid warning
from busted HP compiler.
* gdbtypes.c (init_type): Use copy of typename on type_obstack.
* dwarfread.c (enum_type): Save enum names on type_obstack.
* dwarfread.c (struct_type): Save member name on type_obstack.
* symtab.c (_initialize_symtab): Fix misspelling.
* regex.c (store_jump, insert_jump): Return void.
detecting start of new symbol info after reading symtab for a
module with a zero length TEXT segment.
(Note that this fixes the BNR problem with printing vxWorksVersion. That ought
to make Ken happy).
* coffread.c (coff_end_symtab): Cast 2nd arg of complain() to
correct type.
* defs.h (NORETURN): Define away for Lucid compiler.
* remote.c (remote_timer, remote_interrupt): Signal handlers
take one int arg.
* ser-termios.c (serial_write, serial_close): Return whatever
value the write/close call returns, rather than falling off end.
* inferior.h (PTRACE_ARG3_TYPE): Third arg to ptrace is int on
more systems than it is "char *". Define PTRACE_ARG3_TYPE to
default to int.
* infptrace.c, hppabsd-xdep.c, hppahpux-xdep.c, i386-xdep.c,
inferior.h (call_ptrace): Use PTRACE_ARG3_TYPE to declare type
of third arg.
* a68v-xdep.c, arm-xdep.c, convex-xdep.c, hp300ux-xdep.c, infrun.c,
m88k-xdep.c, mach386-xdep.c, mips-xdep.c, os68k-xdep.c, pyr-tdep.c,
pyr-xdep.c, rs6000-xdep.c, sparc-xdep.c, sun3-xdep.c, sun386-xdep.c,
symm-xdep.c, ultra3-xdep.c: Use PTRACE_ARG3_TYPE to cast ptrace
argument 3.
* sparc-xdep.c, a68v-xdep.c (fetch_inferior_registers,
store_inferior_registers): Supply missing fourth argument to
ptrace().
appendix (too hard to maintain, esp w/recent versions of config.sub).
Also corrected xref to this section accordingly.
(2) updated sample output from config.sub to match latest variation of
that script
(3) minor editing to gnu contrib text on set/show remotedebug
* Use prototypes for all interface routines (fix bugs found as a result of
doing so).
* Make full_filename more robust in the face of null dirname/filenames.
* Get pty at startup instead of at child creation time. Put GDB descriptors
0, 1 and 2 on it so that we can see the output of shell commands.
* Get rid of prompt(), use print_prompt() instead. Fixes loads of stupid
prompting problems.
* 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.
(which is not a Posix signal) if it isn't defined.
* tm-linux.h, xm-linux.h, config/linux.m[ht], configure.in:
New port to Linux (a free Unix clone for 386 machines).
* coffread.c (record_minimal_symbol): Pass the minsym type to it.
Callers changed.
(coff_end_symtab): Sort blocks if needed. Complain if misordered.
(read_coff_symtab): Move patch_opaque_types call from
coff_symfile_read. Restrict it to symtabs from this objfile.
(process_coff_symbol: C_TPDEF): Don't put ordinary foward
references on opaque type chain; just let coff_lookup_type handle 'em.
(decode_type): Complain about tagndx values on
non-struct/union/enum types, which the EPI compiler tends to produce.
* symtab.c (list_symbols): Make minimal symbol variable-finding work.
* tm-68k.h (FIX_CALL_DUMMY): Avoid alignment and byte order
dependency.
* elfread.c (elf_symfile_read): Update bfd_elf_find_section
usage to match new prototype. Include libbfd.h to get prototype.
declarations of malloc/realloc/free that are inserted by some
versions of yacc.
* m2-exp.y: Prevent conflicts with TRUE and FALSE tokens by
#undeffing them.
* xm-rs6000.h: Declare malloc/realloc/free appropriately. Yet
another decl of strdup (this really ought to come from libiberty.h!).
(_initialize_remote): `set remotedebug' enables packet trace.
* dbxread.c (process_one_symbol:N_FUN): GCC now produces relative
N_SLINE's, etc, just like Sun cc on Solaris2.
* am29k-tdep.c (read_register_stack, write_register_stack):
Change RSTACK_HIGH_ADDR to rstack_high_address, a user-settable
variable. Add `set' and `show' commands for it.
* doc/gdb.texinfo: Document it.
* eval.c: Avoid residue-by-zero when evaluating without side effects.
(Bug and fix found by Pierre Willard.)
* sparc-tdep.c: Clean up slightly for Solaris2.
C++ syms as demangled, not just functions.
* buildsym.c (read_range_type): When we find a signed char
type, do a lookup of signed char, not plain char. Plain char's
still get looked up as plain char's elsewhere.
* xm-sun3os4.h: Define MALLOC_INCOMPATIBLE to avoid conflicts
with decls of malloc in c-exp.tab.c (as produced by yacc).
There's got to be a better way to do this...
* mipsread.c, dbxread.c: Remove troublesome inclusion of non-
standard <strings.h> file, now that the only single use of
rindex in the gdb source files is gone.
which #defines index to be strchr. Unfortunately, index is
a member of a symbol table structure that can't be changed.
* mipsread.c: tm-mips.h includes coff/symconst.h and coff/sym.h,
remove redundant #include's.
* symtab.c (decode_line_1): Until C++ support stabilizes, when
C++ lookups fail, print possibly helpful hint about completion.
* cplus-dem.c (demangle_signature): Fix ARM style demangling
for static data members.
* dbxread.c (dbx_psymtab_to_symtab_1): Fix prototype.
* config/ncr3000.mh (INSTALL): Don't use /usr/ucb/install,
it's broken on ncr3000's.
Change 'modifier' to char from unsigned char. Cast single use
that needs to be unsigned char.
* symtab.h (SYMBOL_BASEREG_VALID): Explain disabling.
* utils.c (strdup_demangled): Add function.
* defs.h (strdup_demangled): Add prototype.
* stack.c (return_command): Demangle C++ function names for query.
* infcmd.c (jump_command): Demangle C++ function names for query.
* cplus-dem.c (consume_count): New function and prototype.
* cplus-dem.c (demangle_class, gnu_special, demangle_func_type,
do_type): Replace conversion code with consume_count().
* cplus-dem.c (gnu_special): Fix demangled of static members.
* source.c (list_command): Print demangled function names
when appropriate. Fix supplied by Peter Schauer.
* xm-sun4sol2.h (gregset_t): Thinko in register set definition.
* symtab.h: Disable SYMBOL_BASEREG_VALID until it works.
* dbxread.c (dbx_psymtab_to_symtab_1): Renamed from
psymtab_to_symtab_1. Use current psymtab's sym_offset and symbol_size,
rather than the one for the first file in the dependency chain.
set. Don't reset our own texthigh, or dependency-only pst's, in
scanning all the rest of the psymtabs.
(process_one_symbol): Fix comments around N_OBJ, N_OPT, N_UNDF.
* buildsym.h (N_UNDF): Improve comments.
(N_LSYM, etc): Skip types without names (":T(0,3)=sfoob...").
an additional per-symbol value.
* symtab.h (SYMBOL_BASEREG, SYMBOL_BASEREG_VALID): Add defines.
* frame.h (FRAME_GET_BASEREG_VALUE): Provide default definition.
* findvar.c (read_var_value): Use SYMBOL_BASEREG if valid.
* printcmd.c (address_info): Use SYMBOL_BASEREG if valid.
* symmisc.c (print_symbol): Use SYMBOL_BASEREG if valid.
extra info in the minimal symbol.
(elf_symtab_read): The extra info is the size of an ELF object,
which was kludged to us in the `udata' field of the BFD symbol.
Gag me with a crowbar...
(elf_symfile_read): Keep track of both the absolute load address,
and the offset between load addr and symbols. Handle STABS as
well as DWARF sections, passing the absolute load address to
elfstab_build_psymtabs.
* objfiles.c (free_objfile): Eliminate storage leaks. Contributed
by <Peter.Schauer@regent.e-technik.tu-muenchen.dbp.de>.
* symfile.c (symfile_bfd_open): Comment where name is freed.
* symmisc.c (extend_psymbol_list): Comment where list is freed.
Add symbol_size and file offsets to struct symloc.
Add static symbol_table_offset, string_table_offset,
file_string_table_offset, next_file_string_table_offset,
last_function_name.
(add_old_header_file): Convert error() to complain()t.
(dbx_symfile_read): Get symbol size via the objfile.
Also get symbol_table_offset.
(dbx_symfile_init): Record symbol size and count via the objfile.
(dbx_next_symbol_text): Always add file_string_table_offset when
accessing string table.
(read_dbx_symtab): Initialize file_string_table_offset to 0.
(SET_NAMESTRING): Use the offset.
(end_psymtab): Large kludge to determine addresses where source
files start and end (for the psymtab header).
(psymtab_to_symtab_1): Set file_string_table_offset before reading.
Get this, symbol size, and symbol offset, from psymtab.
(read_ofile_symtab): Don't back up one symbol for Solaris2.
Patch up last_source_start_addr if zero in N_SO.
(process_one_symbol): Add variable function_start_offset.
( "", N_FUN, N_LBRAC, N_RBRAC, N_SLINE): Add ifdef for
BLOCK_ADDRESS_FUNCTION_RELATIVE.
( "", N_OBJ, N_OPT): Ignore.
(elfstab_build_psymtabs): New function to read stabs out of
an ELF file.
* Makefile.in: Accept $(BISON) even though we really want $(YACC).
(gdb): use GLOBAL_CFLAGS when linking, too.
* partial-stab.h (N_UNDF): Deal with Sol2 relative stringtab offsets.
(N_OBJ, N_OPT): Ignore.
('f', 'F'): Save last function name.
* symfile.h: Prototype elfstab_build_psymtabs.
* symfile.c: Add almost-OK debug versions of add_psymbol_*to_list.
* xm-sysv4.h: Add <limits.h> to avoid conflicting defns in defs.h.
* buildsym.c (read_sun_builtin_type, read_sun_floating_type): New.
(define_symbol): Skip arg types in function entries. Resolve
overloaded 'P' which acc uses for prototypes of functions called
by this file.
(read_type: 'b', 'r'): Handle Solaris2 builtin types.
* minsyms.c (prim_record_minimal_symbol_and_info): Hack to
save size of ELF symbols. FIXME.
* tm-sun4os5.h: Rename to tm-sun4sol2.h. Update defines for Sol2.
* xm-sun4os5.h: Rename to xm-sun4sol2.h. Hack more defines.
* config/sun4os5.m[ht]: Rename to config/sun4sol2.m[ht]; new xm, tm.
* defs.h (reg_names): Fix declaration to match that in infcmd.c
* stack.c (reg_names): Delete redundant (and inconsistent) decl.
* WHATS.NEW: Point out improved C++ function name handling.
* gdbtypes.c (lookup_fundamental_type): For now, use the same
type names for both implicitly and explicitly signed integral
types. See comment in the source code.
tokens with embedded whitespace, such as C++ demangled names.
* defs.h (demangle_and_match, strcmp_iw, skip_quoted): Prototypes.
* main.c (gdb_completer_quote_characters): Add global variable.
* main.c (symbol_completion_function): Total rewrite for C++
demangled name handling.
* main.c (skip_quoted): New function.
* main.c (main): Set rl_completer_quote_characters.
* symmisc.c (dump_symtab): Print source language for symtab.
* symtab.c (expensive_mangler): Add prototype and function.
* symtab.c (completion_list_add_symbol): Total rewrite for new
C++ demangled name handling.
* symtab.c (lookup_symbol): Check for demangled C++ symbol first,
other changes for demangled C++ symbol handling.
* symtab.c (lookup_demangled_block_symbol): Use demangle_and_match.
* symtab.c (lookup_demangled_partial_symbol): Use demangle_and_match.
* symtab.c (decode_line_1): Recognize C++ demangled names on input.
* symtab.c (completion_list_add_symbol): Total rewrite for new
C++ demangled name handling.
* symtab.c (expensive_mangler): New function.
* utils.c (strcmp_iw, demangle_and_match): New functions.
* xcoffread.c (aixcoff_symfile_read): Fix prototype.
* Makefile.in, config/*.mh, config/*.mt: Rename TM_CFLAGS
to MT_CFLAGS, XM_CFLAGS to MH_CFLAGS to match file names.
* config/sun4os5.mh: Add MH_CFLAGS=-xs to save debug info.
without masking, since it is signed and will later be compared
against signed quantities. The right fix is probably to make
it all unsigned, but this is a small, safe fix for this release.
FIXME -- make the real change sometime soon.
(Imported from progressive.)
this offers full control over the CPU parameters of vxworks systems we
are likely to encounter (not to mention other 68k embedded targets
that run a.out as their debugging format).
which triggers on DECstation even though all regs are accessible.
* m68k-pinsn.c (print_insn_arg): Use new macros to get
sign-extension of instruction fields even on unsigned-char hosts.
Bug found by Fred J Roeber, fjr@sgfb.ssd.ray.com.
* tm-m88k.h, tm-umax.h: Avoid sizeof() in REGISTER_xxx macros,
since they define the target, not the host.
* m88k-pinsn.c: Fix typo.
Patches by Paul Eggert <eggert@twinsun.com>.
* valarith.c (value_zerop): -0.0 is still zero.
* eval.c (evaluate_subexp): Avoid NaN anomalies in float compares.
disconnecting from controlling terminal, to avoid gdb hanging
on SVR4. Fixes bug reported by Oliver Okrongli.
* procfs.c (PROC_NAME_FMT): Change format to match default used
by system, as suggested by Oliver Okrongli.
* tm-68k.h (FRAME_FIND_SAVED_REGS): Apply missing parentheses
bug fix from Brent Townshend (bst%tt@cam.ORG).
* c-exp.y (nonempty_typelist): Fix memory overrun bug reported
by turlais@rechser.total.fr.
* dwarfread.c (decode_subscr_data): Fix bug in calculation of
length of non-zero lowerbound arrays. Bug fix from Peggy Fieland.
* objfiles.h (unlink_objfile): Add prototype.
* objfiles.c (unlink_objfile): Add function.
* objfiles.c (free_objfile): Call unlink_objfile.
* objfiles.c (allocate_objfile): Call unlink_objfile on newly
remapped objfiles. Bug reported by hahn@sunshine.labs.tek.com.
Also, discard old possibly bogus sf struct.
* symfile.c (symbol_file_add): Call init_entry_point_info() and
find_sym_fns() for remapped symbol files, in case of any changes
since the last mapping.
* gdb.texinfo: slight expansion of new text on reading info files
* gdbinv-s.m4.in: correct and expand info on cross-debugging
H8/300 from DOS.
* ChangeLog: guess...
* defs.h: if xm.h doesn't define FOPEN_RB, include "fopen-same.h",
allowing hosts with different text and binary file formats to
work.
* coffread.c (read_coff_symtab): changed calling convention and
operation - now it opens its own file with FOPEN_RB rather than
duping and fdopening the provided handle.
* dbxread.c, cplus-dem.c: #include mangling.
* exec.c: If O_BINARY isn't defined, set it to 0, call openp for
binary files oring in the right bit.
* utils.c, terminal.h, inflow.c: hackery because dos doesn't have terminals.
* remote-hms.c: cleanup to use the new remote serial stuff
* serial.h, ser-termios.c, ser-go32.c: newfiles to provide host
independent remote terminal I/O.
* remote.c: if DONT_USE_REMOTE is defined, then don't use it.
* source.c (openp): fix off by one problem removing / - can now
open a source file in the root directory with DOS.
* values.c (value_as_pointer): remove bogus address bits from
long. (unpack_long): unpack into unsigned long/short if pointer.
sun4.mh: use the ser-termios stuff
go32.mh: use the ser-go32 stuff
* defs.h: if xm.h doesn't define FOPEN_RB, include "fopen-same.h",
allowing hosts with different text and binary file formats to
work.
* coffread.c (read_coff_symtab): changed calling convention and
operation - now it opens its own file with FOPEN_RB rather than
duping and fdopening the provided handle.
* dbxread.c, cplus-dem.c: #include mangling.
* exec.c: If O_BINARY isn't defined, set it to 0, call openp for
binary files oring in the right bit.
* utils.c, terminal.h, inflow.c: hackery because dos doesn't have terminals.
* remote-hms.c: cleanup to use the new remote serial stuff
* serial.h, ser-termios.c, ser-go32.c: newfiles to provide host
independent remote terminal I/O.
* remote.c: if DONT_USE_REMOTE is defined, then don't use it.
* source.c (openp): fix off by one problem removing / - can now
open a source file in the root directory with DOS.
* values.c (value_as_pointer): remove bogus address bits from
long. (unpack_long): unpack into unsigned long/short if pointer.
It gets permanently stuck in many OSes.
* breakpoint.c, infcmd.c, infrun.c, utils.c: Change many printfs
to printf_filtered.
* breakpoint.c: Improve help text for info breakpoints.
It gets permanently stuck in many OSes.
* breakpoint.c, infcmd.c, infrun.c: Change many printfs to printf_filtered.
* breakpoint.c: Improve help text for info breakpoints.
info files.
* utils.c (print_sys_errmsg): Use stderr. Reported by Pierre Willard.
* symtab.c (output_source_filename): Remove old glop for wrapping
lines, use wrap_here. Reported by Pierre Willard (pierre@la.tce.com).
* Makefile.in: version.c should depend on Makefile, not Makefile.in.
* munch: Add sort -u to avoid duplications.
* symtab.c (lookup_symbol): Improve Stu's fix of 22 April.
Improved fix by hahn@sunshine.labs.tek.com (Doug Hahn).
* Makefile.in (DEMANGLE_OPTS): Remove obsolete -Dnounderscore
* Makefile.in (demangle): New target to create standalone
demangler with same code and options as internal demangler.
* cplus-dem.c: Massive restructuring, rewriting, cleanups, etc
to support ARM style and Lucid style demangling, improve
maintainability, fix several demangling bugs. More changes
to follow.
* defs.h (strstr): Add ANSI compatible prototype.
* valprint.c (type_print_1): Demangle using ansi option.
* config/ncr3000.mt (DEMANGLE_OPTS): Remove -Dnounderscore.
29k-share/dfe/yank.c, vx-share/xdr_ptrace.c, vx-share/xdr_regs.c:
Remove -I29k-share, -Ivx-share from Makefile.in. Make #includes
relative to each source file.
* am29k-tdep.c: Update to latest code from AMD.
(get_saved_register) don't crap out if no frame.
* remote-udi.c: Set/clear inferior_pid as appropriate.
(udi_open) call target_preopen, don't close fd 0!!!, clean up
error handling. Fixup end-of-debugging messages.
(udi_fetch_registers) clean up big time, mainly don't multiply
register_valid indices by 4, and use proper Offset when reading
gr96-gr127. (udi_store_registers) general cleanup.
(fetch_register) cleanup, simplify. (regnum_to_srnum)
INT_REGNUM->INTE_REGNUM.
* tm-29k.h: Upgrade to latest code from AMD.
* 29k-share/udi/udip2soc.c: Get rid of useless errmsg_m macro.
(UDIConnect) Clean up error processing (like, don't do exit() if
execlp fails), make code restartable, make more attractive.
(UDIStop) Use SIGINT instead of SIGUSR1, as isstip won't stop
otherwise.
* objfiles.c (free_objfile): Only try to unmap files when
reusable objfiles are supported.
* valprint.c (type_print_varspec_suffix): Add parameter that
specifies if C++ demangling included function arguments. Use
it to suppress printing extra pair of ()'s.
* valprint.c (type_print_1): Fix problem with printing demangled
C++ function types where demangled type includes the function
args.
Allows selection of C++ demangler to be a configuration option
until multiple demanglers are supported.
* demangle.h: New include file for extended demangler support.
* breakpoint.c, gdbtypes.c, printcmd.c, stack.c, symtab.c,
utils.c, valprint.c: Include "demangle.h" and change all calls
to cplus_demangle() or fputs_demangled() to use individual
demangling options.
* valprint.c (type_print_1): Change options to cplus_demangle
to print demangled function args. Still broken, but now less so.
* cplus-dem.c: Include demangle.h, reorganize and update some
comments to reflect reality.
* cplus-dem.c (cplus_demangle, cplus_mangle_opname): Change
second arg from fixed integer to bit based multiple options.
* cplus-dem.c (optable): Reformat and replace ansi members with
bit based options.
* cplus-dem.c (do_type): Fix bug with parsing missing return type.