blob: 199b73f84b7fbc2391b24b960e191d07c6087a26 [file] [log] [blame]
Mon Dec 30 10:57:02 1991 Per Bothner (bothner at
Mainly stuff to improve handling of TYPE_CODE_REF values.
* valops.c (value_addr): If taking the addres of a
TYPE_CODE_REF, just cast the object to the corresponding
TYPE_CODE_PTR. This yields correct C++ semantics, and
preserves the location information, which has the nice effect
that &(&R) given the location containing R.
* values.c (value_copy): Make non-static (used by value_addr).
* eval.c (evaluate_subexp_for_address): Use the default
scheme (with value_addr) for a variable if it has TYPE_CODE_REF.
* valops.c (value_addr), eval.c (evaluate_subexp_for_address,
evaluate_subexp_with_coercion): Factor out some common
expressions into variables, for easier reading.
* findvar.c (locate_var_value): Remove code to handle
TYPE_CODE_REF - it should no longer be needed.
* valops.c (value_assign): Do a COERCE_REF on the
destination operand, for correct C++ semantics.
* valarith.c (value_x_binop): Ditto: De-reference C++
references in the arguments.
* valops.c: ANSI-fy: bcopy->memcpy, bzero->memset.
Sat Dec 28 11:30:26 1991 Per Bothner (bothner at
* dwarfread.c, coffread.c: Use INIT_CPLUS_SPECIFIC.
* symtab.c (gdb_mangle_name): Recognize and handle
constructors specially.
* symtab.c (check_stub_method): Test for failure from
cplus-demangle by calling error() instead of seg-faulting ...
Fri Dec 27 22:21:30 1991 Fred Fish (fnf at
* defs.h: Add definition of null_cleanup()
* procfs.c: Many small changes to add base support for a new
"info proc" command (currently only printing of the address
space mapping is implemented) and allow iteration over the
address space mapping, calling an arbitrary function for each
mapping (used for shared library support).
* solib.c: Change all ifdefs that checked for "sun" to check
for "!SVR4_SHARED_LIBS" instead. Rewrite lookup_base() to
handle locating the debug base address even when not currently
stopped at the dynamic linker entry point.
* utils.c: Add null_cleanup() as a known function that does
nothing to serve as a base for possibly long cleanup chains
with no specific "first cleanup" to serve as an anchor.
* xm-sysv4.h: Add define of SVR4_SHARED_LIBS
Fri Dec 27 10:11:33 1991 Per Bothner (bothner at
* arm-opcode.h, m88k-opcode.h, pn-opcode.h, np1-opcode.h,
pyr-opcode.h, tahoe-opcode, vax-opcode.h: Removed -
these are all essentially the same as the versions
in ../include/opcode. The remaining *-opcode.h here
are not quite so obviously the same, and need study.
* arm-pinsn.c, gould-pinsn.c, m88k-pinsn.c, pyr-pinsn.c,
tahoe-pinsn.c, vax-pinsn.c: Change so these include
opcode/FOO.h (actually ../include/opcode/FOO.h)
instead of the recenntly departed opcode-FOO.h files.
* sparc-pinsn.c: Now that we're using the much tighter
opcode table in ../include/opcode/sparc.h, we shouldn't
need to sort the opcodes before dis-assembly.
* symtab.h, symmisc.c: Make cplus_struct_default be const.
* symtab.h, buildsym.c: Add and use INIT_CPLUS_SPECIFIC macro.
* symmisc.c: Remove unused 'nfields' variable.
* buildsym.h: Add extern decl of unknown_symtype_complaint,
since it used used by partial-stab.h (included two places).
* partial-stab.h: Re-arrange DBXREAD_ONLY #ifdefs so that
we should never hit the default case (until new stab codes
are added). Hence, we can leave the complaint in the
default case in even when DBXREAD_ONLY is off.
* partial_stab.h: Recognize a pair of N_SO stabs (one for the
directory, one for the filename proper) without peeking ahead.
* dbxread.c, mipsread.c: Because of previous change, don't need
ugly CHECK_SECOND_N_SO macro.
* buildsym.h, dbxread.c, mipsread.c: Make next_symbol_text a
macro that invokes a function pointer in next_symbol_text_func.
* mipsread.c: Added comments various places to
explain what is going on.
* mipsread.c (parse_symbol): Support the new (SGI-specific?)
symbol types stStruct, stUnion, and stEnum.
Also, some fixes in the code for dealing with tags.
* mipsread.c: Change handling of startup_file_start and _end
- now just use the textlow and texhigh of a psymtab
to check if we've found the startup-file.
* mipsread.c: Replace s_idx by global cur_sdx in many places.
This is so mips_next_symbol_text can get at it.
Thu Dec 26 19:52:01 1991 Fred Fish (fnf at
* dbxread.c, symmisc.c: Move add_psymbol_to_plist() from
dbxread.c to symmisc and change name to add_psymbol_to_list.
Ditto for add_psymbol_addr_to_plist(). Also expand their
body to not use ADD_PSYMBOL_VT_TO_LIST.
* dwarfread.c: Remove add_psymbol_to_list() and convert usages
to the ADD_PSYMBOL_TO_LIST macro.
* ieee-float.c: Change "#ifdef DEBUG" to "#ifdef IEEE_DEBUG"
to avoid collision with the DEBUG for ADD_PSYMBOL_VT_TO_LIST.
* partial-stab.h, symfile.h: Move definitions of the macros
partial-stab.h to symfile.h. They aren't stab specific.
Change ADD_PSYMBOL_VT_TO_LIST to use memcpy rather than strncpy.
Tue Dec 24 11:38:08 1991 John Gilmore (gnu at
* Roll VERSION to 4.3.2.
Mon Dec 23 13:54:35 1991 Per Bothner (bothner at
* m68k-opcode.h, mips-opcode.h, sparc-opcode.h: Deleted.
* m68k-pinsn.c, mips-pinsn.c, sparc-pinsn.c:
Include <opcode/FOO.h> instead of <FOO-opcode.h>.
* symtab.h, symtab.c, coffread.c, dwarfread.c, symmisc.c,
dbxread.c: The TYPE_CPLUS_SPECIFIC structure is now only
allocated when it is needed. Until it is needed, it points
to a shared statically allocated structure.
* buildsym.h, buildsym.c, dbxread.c: Remove the kludgy code
in read_ofile_symtab to recognize two initial N_SO stabs,
and let process_on_symbol handle it. This is cleaner, more
efficient, and lets mipsread.c share the same code.
* symfile.h, partial-stab.h: Move ADD_PSYMBOL_VT_TO_LIST
and related macros to here ...
* dbxread.c: ... from here.
* symmisc.c: Move the "overflow" handling from
ADD_PSYMBOL_VT_TO_LIST macro into new function extend_psymbol_list.
* dwarfread.c: Re-write add_psymbol_to_list to use
* mipsread.c: Extend mipsread.c to handle stabs-style symbols
encapsulated in ecoff symbols. This enable full g++ debugging.
* partial-stab.h: Move the code for pre-scanning symbols
and building psymtabs to an include file, out from dbxread.c.
This way, the same code can also be used by mipsread.c.
* dbxread.c, buildsym.h: Various changes to allow some functions
to be used by mipsread.c (also some arguable stylistic changes).
* tm-mips.h: Define BLOCK_ADDRESS_ABSOLUTE, at least for now,
since mips-tfile puts relocatable addresses into LBRAC/RBRAC
* mipsread.c: Replace code to handle ambiguous tag blocks.
Instead of allocating a TYPE_CODE_UNDEF, guess (by looking
at types and offsets) if a tag is a struct, union, or enum.
Still patch it later if we find out for sure.
* mipsread.c: In various ways, replace Forin's
ideo-syncratic code by code that fits better with the
rest of gdb, for both stabs-based and ecoff-based symtabs.
E.g. use end_psymtab; don't do extra passes over FDR table to
pre-partition global data; don't use external symbols to
create static/global symbols (just put them in the
misc_vector); use ADD_PSYMBOL_TO_LIST macro; don't
sort psymtabs or symtabs; use obstacks more.
* symtab.c, mipsread.c, dbxread.c, buildsym.c:
ANSIfy: Replace bcopy by memcpy, bzero by memset.
Sun Dec 22 19:31:04 1991 Fred Fish (fnf at
* solib.c (locate_base): Fix uninitialized variable that was
causing return of random value to callee.
* config/mh-amix, config/mh-i386v4: Change to find alloca by
compiling and linking alloca.c, even when it is not strictly
required. Also arrange to link with -ltermlib rather than
* Move TERMCAP definition to prior to inclusion
of host makefile fragments so it can be overridden.
Fri Dec 20 16:33:39 1991 John Gilmore (gnu at
* xcoffread.c (read_symbol_lineno): Logic error in incrementing
symbol table entry number. (From Metin Ozisik.)
Fri Dec 20 11:36:38 1991 Fred Fish (fnf at
* config/mh-i386v4: Change XM_CLIBS to "-lc /usr/ucblib/libucb.a"
so compiles with native compilers (without builtin alloca) can
pick up the version from the bsd emulation library. However, we
search the standard C library first so we don't pick up lots of
other broken stuff from libucb.a, that we *don't* want.
*, tm-amix.h, tm-i386v4.h, xm-amix.h, xm-i386v4.h:
Change svr4 references to sysv4.
* source.c: Move declaration of external function index to
front of file so it is in scope for all references.
* utils.c (error, fatal): Make definitions consistent with
defs.h declarations (declared as "volatile void").
Fri Dec 20 10:55:36 1991 John Gilmore (gnu at
* rs6k-opcode.h: Bugfix sfe and stbrx. By Al Kossow.
Wed Dec 18 17:09:06 1991 Stu Grossman (grossman at
* command.h, defs.h, eval.h, expression.h, remote-sa.sparc.c,
sparc-tdep.c, symtab.h, target.h, value.h, vx-share/ptrace.h,
vx-share/xdr_ptrace.h, vx-share/xdr_rdb.h: ANSIfy enums.
Mon Dec 16 12:31:46 1991 Fred Fish (fnf at
* config/mt-amix, config/mt-i386v4: Add solib.o to TDEPFILES
for these SVR4 systems.
* symfile.c (symbol_file_add): When verbose is set, print
the names of files from which symbols are being loaded, as
when from_tty is true.
* solib.c: Completely reorganized (rewritten) to support
SVR4 shared libraries in a manner very close to the original
SunOS implementation. This support is expected to change and
become more general at some future time. The SVR4 version
does not yet work for attached processes, for example.
* dwarfread.c: Arrange in dwarf_build_psymtabs() for the
relocation address to be valid whether or not symbols are
being read from a shared library or an executable. Use the
relocation address recorded in the psymtab when reading
full symbol tables (in read_ofile_symtab). Ensure that the
relocated address ranges are recorded in partial symtabs.
* elfread.c: Add new function elf_interpreter() to return the
string from the ELF ".interp" section. This is the interpreter
that the kernel tries to run and feed the executable to.
Expand arguments to record_misc_function to include a type arg.
Modify elf_symtab_read() to supply the type arg, and to do symbol
relocations for symbols read in from shared libraries.
* procfs.c: Add new functions proc_base_address() and
proc_address_to_fd(), used by shared library support.
* tm-svr4.h: Add macros to support SVR4 shared libraries.
Fri Dec 13 20:11:26 1991 John Gilmore (gnu at
* infrun.c, remote-eb.c, remote-nindy.c, remote-vx.c: Remove
* remote-eb.c: Change timeout to 24 seconds (*10 fits in byte)
to account for slow loading from floppies.
(eb_create_inferior): New fn, from eb_start and
(eb_close): Only use log_file if nonzero.
(eb_xfer_inferior_memory): If not writing, then read!
(eb_read_inferior_memory, eb_write_inferior_memory): Return length.
(eb_kill): A new no-op.
(eb_mourn_inferior): Remove breakpoints, then generically weep.
Fri Dec 13 16:09:23 1991 Fred Fish (fnf at
* breakpoint.c, findvar.c, infrun.c, putenv.c, stack.c: Fix
miscellaneous comparisons of integer with NULL that elicit
compiler warnings about comparison of integer with pointer, when
NULL is ((void *) 0) rather than just a bare 0.
Wed Dec 11 13:02:58 1991 John Gilmore (gnu at
* breakpoint.c (breakpoint_re_set_one): Disable each breakpoint
while we reset it, in case of problems. Print breakpoint number
in error messages.
* buildsym.c (read_struct_type): Avoid sun3 compiler bug with
* source.c (find_source_lines): If getting file mod time fails,
don't warn.
* target.c (target_xfer_memory): If errno is set, return it,
rather than EIO.
Tue Dec 10 04:07:22 1991 K. Richard Pixley (rich at
* infodir belongs in datadir.
Sun Dec 8 21:13:33 1991 Michael Tiemann (tiemann at
* symtab.h (struct fn_field): Add new fields `is_private',
`is_protected', `is_stub', making room by reducing the size of
(struct fn_fieldlist): Delete the fields `private_fn_field_bits'
and `protected_fn_field_bits'.
* valops.c, valprint.c, symtab.c: All callers updated.
* buildsym.c (read_struct_type): Delete the `visibility' field
from `struct next_fnfield', and rework code so that visibility
info is stored into the fn_field directly. Also, hacked to set
TYPE_FN_FIELD_STUB for both static and normal member functions.
Sat Dec 7 18:13:11 1991 Fred Fish (fnf at
* i386-tdep.c: Fix a problem on i386 systems where buffered code
stream access was failing to take into account the minimum size
granularity of the code section. For now, the buffering is simply
disabled. There is a similar problem in the i386 disassember code
that has not yet been fixed (FIXME).
* gmalloc.c: Use macros to hide some of the ugly casting required
in the previously applied fix for pointers with high bits set.
Sat Dec 7 16:49:35 1991 John Gilmore (gnu at
* Roll VERSION to 4.3.1.
Sat Dec 7 04:12:35 1991 John Gilmore (gnu at
GDB-4.3 release!
* Roll VERSION to 4.3
* README, TODO, WHATS.NEW, depend: Update.
* inflow.c (terminal_inferior): Avoid error msg if attached.
* gmalloc.c: Fix bug that causes malloc & free to
fail on systems where pointers have the high bit set (0x800efcf0
for example). The problem is that the difference between two
pointers is a signed integer, so the computation
(char *) 0x800efcf0 - (char *) 0
yields a negative value. The sign of the result of the modulus
operator is machine dependent for negative operands, thus it is
possible for it to end up negative. From Fred Fish.
Sat Dec 7 00:00:15 1991 K. Richard Pixley (rich at
added clean-info. added some standards.text support and made it
look like our other Makefiles.
* mark this directory target dependent. configure
now runs entirely in objdir so make existence tests and
references against ${srcdir}.
Fri Dec 6 08:30:36 1991 Fred Fish (fnf at
* dwarfread.c (enum_type, struct_type): Fixes for opaque and
anonymous enumerations, structures, and unions. Now passes all
the current gdb test suite tests.
Thu Dec 5 22:46:13 1991 K. Richard Pixley (rich at
* idestdir and ddestdir go away. Added copyrights
and shift gpl to v2. Added ChangeLog if it didn't exist. docdir
and mandir now keyed off datadir by default.
Thu Dec 5 21:53:21 1991 John Gilmore (gnu at
* symtab.c (decode_line_1): If SKIP_PROLOGUE leaves us in
mid-line, be more careful about possibly advancing to the next line.
Thu Dec 5 18:59:51 1991 Michael Tiemann (tiemann at
* cplus-dem.c (cplus_demangle): Call `string_need' when
null-terminating a partially-computed string.
Thu Dec 5 18:19:43 1991 Fred Fish (fnf at
* dwarfread.c (enum_type): Build a correct TYPE_NAME, add a
symbol to the symbol table for each member of the enum.
* dwarfread.c (struct_type): Build a correct TYPE_NAME.
* dwarfread.c (add_enum_psymbol): New function to extract enum
member names and add them to the partial symbol table while
building partial symbol tables.
Thu Dec 5 17:31:05 1991 John Gilmore (gnu at
* symtab.c (check_stub_method): Must allocate two extra argument
slots (one for `this', one for arglist terminator).
Thu Dec 5 10:51:05 1991 Fred Fish (fnf at
* inflow.c (child_terminal_info): Supply missing '"' character.
* buildsym.c (define_symbol): Supply missing parenthesis.
Thu Dec 5 03:34:21 1991 John Gilmore (gnu at
* coredep.c (fetch_core_registers): Fencepost error. Fixed by
Jay Lepreau <>.
* inflow.c: Remember whether GDB has a terminal. Avoid switching
terminals back and forth if we don't have one.
* c-exp.y (parse_number): Zero is not an unsigned int constant!
* dbxread.c (read_dbx_symtab): Enum type numbers can be in (1,2) form.
Improve type parsing.
* buildsym.c (define_symbol, read_range_type): Add
long_kludge_name that passes the names of range types being
defined, down to where we must choose between 'int' and 'long'
variants. This fails on Sun C anyway since the compiler itself is
confused between int and long.
(read_array_type, cleanup_undefined_types): Correct the size of
array type whose element-type size isn't immediately known.
Early preparation to blow away many builtin types, building them
on the fly as needed. Don't compare types to builtin types with
==; examine the relevant fields instead.
* coffread.c (process_coff_symbol: C_ARG, C_REGPARM): Avoid ==.
* buildsym.c (define_symbol, case 'p'): Avoid ==.
* valops.c (value_arg_coerce): Avoid ==. Don't assume host and
target types are the same.
* valprint.c (val_print): I finally understand arrays, remove FIXME.
* symmisc.c (printpsyms_command): Reduce redundancy, and put all
addresses in GDB itself into parens for easy cleanup and diffing.
Wed Dec 4 21:05:30 1991 Fred Fish (fnf at
* dwarfread (enum_type): Arrange for the order of enumeration
members to match the source code order; not the order in the
Dwarf information, which is explicitly reverse order.
Wed Dec 4 18:24:39 1991 John Gilmore (gnu at
* main.c (input_from_terminal_p): Check whether GDB has a
terminal at all.
(initialize_main): Revise doc for `set editing'.
Wed Dec 4 15:36:39 1991 Fred Fish (fnf at
* dwarfread.c (struct_type): Handle structures and unions which
contain DIE's other than just member dies.
Wed Dec 4 01:59:05 1991 John Gilmore (gnu at
* symfile.c (reread_symbols): Avoid kludging mtime_set, now that
BFD is fixed.
Tue Dec 3 17:24:57 1991 John Gilmore (gnu at
* 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
* xcoffexec.c: Change syms_from_objfile caller.
* sparc-xdep.c: Force tm-file as tm-sparc.h, to make it compile
when configured for cross debugging. FIXME, this needs a more
general solution.
Mon Dec 2 11:04:05 1991 Per Bothner (bothner at
* mips-tdep.c (init_extra_frame_info): Float register
'i' has gdb-internal number 'FP0+i', not '32+i'.
* mipsread.c (new_symbol): Translate g++ special
symbol "$t" to "this".
Sat Nov 30 21:29:55 1991 Steve Chamberlain (sac at
Changes due to include file renaming:
* xcoffread.c: internalcoff.h ->coff/internal.c,
coff-rs6000.h ->coff/rs6000.h
* mipsread.c: coff-mips.h ->coff/mips.h
* elfread.c: elf-common.h ->elf/common.h
elf-external.h ->elf/external.h,
elf-internal.h ->elf/internal.h
* dwarfread.c dwarf.h ->elf/dwarf.h
* dbxread.c: aout64.h ->aout/aout64.h
stab.gnu.h ->aout/stab_gnu.h
* coffread.c: internalcoff.h ->coff/internal.h
* buildsym.c: stab.gnu.h ->aout/stab_gnu.h
* depend Updated to take the above into account.
Fri Nov 29 16:59:25 1991 Fred Fish (fnf at
* Add SVR4 i386 configurations.
* config/mh-i386v4, config/mt-i386v4, tm-i386v4.h, xm-i386v4.h:
New files for i386/SVR4.
DECR_PC_AFTER_BREAK to be predefined by files including
* i386-tdep.c: Add supply_gregset(), fill_gregset(),
supply_fpregset(), and fill_fpregset() functions, which are
target dependent support functions for the SVR4 /proc register
* dwarfread.c (enum_type, struct_type): Expand recognized
compiler generated tags to include symbols beginning with '.' as
well as '~'.
* symtab.c (sources_info): Change simple printf of error message
to call to error().
Fri Nov 29 16:04:21 1991 Roland H. Pesch (pesch at
* doc/gdb.texinfo: remove leading comments that survived M4 but
described its role in the doc; add one more font to colophon;
strengthen disclaimer about unsupported configs.
Wed Nov 27 01:23:41 1991 John Gilmore (gnu at
Fix bugs in C++ debugging.
* symtab.h: target_type is not used in record types.
lookup_method_type. Add TYPE_TYPE_SPECIFIC macro.
* symtab.c (lookup_member_type): Don't chain them up, just
allocate one in symbol_obstack when we need one.
(allocate_stub_method): Build stub in symbol_obstack.
(check_stub_method): Move here from values.c. Don't deallocate
stub; overwrite it.
(lookup_method_type): Gone now.
* buildsym.c: Handle g++ v1 stabs a little bit better.
Change some C++ parsing error()s to complain()ts.
* buildsym.c, findvar.c, printcmd.c, symtab.c: Make unions and
structs have the same representation and work the same as far as
C++ is concerned.
* buildsym.c, symtab.c, values.c: Remove all references to
* valops.c: Improve comments and indentation. Only call
check_stub_method when the stub flag is on.
* valprint.c: Fix or mark minor bugs and unportabilities.
* coffread.c (anonymous unions): Allocate a cplus structure.
* mipsread.c: Eliminate "template" types. Build new, real
types whenever we need them. Allocate cplus structures as needed.
Bulletproof the type parsing a bit more. Mark storage leaks.
(parse_type): Copy TYPE_TYPE_SPECIFIC when copying a real type
on top of a partial type.
Fri Nov 22 16:39:57 1991 John Gilmore (gnu at
* inflow.c (terminal_inferior): Check the results of ioctl's, and
print a message if any of them fail.
(terminal_ours_1): Store result of ioctl's for debugging, but
don't print (the terminal isn't ours...).
* tm-tahoe.h (FRAME_ARGS_ADDRESS): No need to offset from frame
* m2-exp.y (MAX, MIN): Rename to MAX_FUNC, MIN_FUNC to avoid
conflicts with system header files.
Fri Nov 22 08:27:40 1991 John Gilmore (gnu at
* Roll VERSION to 4.2.95.
* buildsym.c, coredep.c, mem-break.c, xcoffread.c: Put <stdio.h>
first, before defs.h.
* config/mh-i386sco: Override compiler to gcc, print warning.
* Handle i386-none-aout rather than i386-aout-none.
* infptrace.c, language.h, utils.c: Lint.
* m2-exp.y: #undef MAX and MIN in case system includes set them.
* xm-tahoe.h: Set HOST_BYTE_ORDER. Include system versions of
{BIG,LITTLE}_ENDIAN and the INT_MAX family first, to avoid
redefinition warnings.
* defs.h: Reorder things so that the xm-file gets first crack
at #define's, followed by defs.h and then the tm-file.
* Remove spaces after 'ignore exit code' - flags.
Late-model BSD 'make's don't cope with them.
Thu Nov 21 23:48:56 1991 John Gilmore (gnu at
* Roll new files into various lists.
Thu Nov 21 18:26:11 1991 Fred Fish (fnf at
* dwarfread.c (struct_type): Must initialize the c++ specific
portion of union types as well as struct types, since gdb attempts
to reference the c++ specific info for both types.
Thu Nov 21 10:23:52 1991 John Gilmore (gnu at
* Roll VERSION to 4.2.90.
* defs.h: Incorporate param.h into defs.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.
* Remove getpagesize.h, param.h, param-no-tm.h.
* exec.c (exec_files_info): If `verbose' is set, show file offset
as well.
* main.c: Use getcwd rather than getwd.
* standalone.c: Fake getcwd rather than getwd.
* xm-*.h: Remove fake values of MAXPATHLEN.
* xcoffexec.c: Add /* */ to #if 0'd thing to help ANSI.
Wed Nov 20 18:35:56 1991 John Gilmore (gnu at
* Remove gdb/hp-include. Support for HP a.out oddities should be
in BFD, not in GDB. Move gdb/hp-include/a.out.h to include/a.out.hp.h.
* infptrace.c, tm-sun386.h: Cashier <a.out.gnu.h>, remove refs.
*, xconfig, tconfig,, doc/gdbint.texinfo:
Makefile fragments for various hosts and targets now come from
gdb/config/mh-* and gdb/config/mt-*. This is for consistency with
other config setups.
* rs6000-pinsn.c, rs6k-opcode.h: Clean up.
* rs6k-opcode.def: Delete.
Wed Nov 20 05:04:40 1991 Fred Fish (fnf at
* dwarfread.c: Recognize obsolete form of AT_element_list
attribute still used by at least one AT&T compiler, and possibly
Tue Nov 19 07:53:55 1991 Fred Fish (fnf at
* dwarfread.c (enum_type, struct_type): Ignore names invented by
helpful compilers for anonymous structs, unions, and enums.
* c-exp.y, m2-exp.y: Add defines for yymaxdepth, yy_yys, and
yy_yyv, so multiple parsers produced by SVR4 versions of yacc
can coexist in the same executable without collision.
* symtab.h: Add declaration for lookup_template_type() to kill
compiler warnings about conversions from int to pointer.
Mon Nov 18 17:45:18 1991 Fred Fish (fnf at
* procfs.c: Move inclusion of defs.h to before param.h, as in
all the other source files that include both. This is required
to supply some typedefs that are used in files included by param.h.
* m68k-tdep.c (m68k_skip_prologue): Add generic m68k support for
skipping function prologues, ala the other cpu families (i386,
mips, m88k, etc). Add the ability to skip movm and fmovm
instructions in the prologues. Still needs support for profile
(-p compiled) prologue sequences (FIXME).
* tm-68k.h: Change SKIP_PROLOGUE macro to use the new generic
m68k prologue skipping function by default.
* tm-altos.h, tm-isi.h: Continue to use the old definition of
Mon Nov 18 15:12:45 1991 John Gilmore (gnu at
* Remove tdesc stuff, and extra blanks before colons.
* blockframe.c: Remove tdesc-related code. Default
* infrun.c: Remove tdesc-related code.
* m88k-tdep.c (frame_chain_combine, init_frame_pc): Remove copies
of defaultable things.
* tm-m88k.h: New file, common to all Moto 88k target configs.
Derived from tm-delta88.h.
* tm-delta88.h: Use it.
* xm-m88k.h: Common file for 88K hosts. Remove obsolete stuff.
* xm-delta88.h: Use it.
* tm-*.h: Remove FRAME_CHAIN_COMBINE macros, since all are
* coffread.c: Remove tdesc stuff.
* tconfig/delta88, tconfig/m88k: Remove tdesc stuff.
* xconfig/m88k: Rename tm-88k.h to tm-m88k.h.
Mon Nov 18 13:51:37 1991 Per Bothner (bothner at
* source.c (open_source_file): If openp fails, try again
using just the base (non-directory) part of the filename.
This solves various annoying problems, such as when the
source was compiled with an absolute pathname - and the
source files have moved. Or if the source was compiled
using a relative pathname, it can be more convenient
to just specific the source directory to the dir command.
Mon Nov 18 00:04:41 1991 Fred Fish (fnf at
* cplus-dem.c (munge_function_name): Add missing third arg to
instance of call to do_type().
* dwarfread.c: Changes to match new dwarf.h. Remove
AT_deriv_list, AT_loclist, AT_incomplete, AT_const_data,
and AT_is_external.
Sun Nov 17 16:20:53 1991 Michael Tiemann (tiemann at
* symtab.h (struct type): Moved C++-specific fields into new type
`struct cplus_struct_type'. Now takes 10% less memory. Many
macros changed.
* symtab.c (init_type): Don't set fields belonging to
* buildsym.c (read_type): Allocate TYPE_CPLUS_SPECIFIC for
(read_struct_type): Ditto. Also, add comments about how we can
deduce TYPE_VPTR_FIELDNO from inheritance info and fieldname info.
* coffread.c (decode_base_type): Allocate TYPE_CPLUS_SPECIFIC for
(read_struct_type): Ditto.
* dwarfread.c (struct_type): Ditto.
* symtab.c (read_range_type): Don't set TYPE_MAIN_VARIANT.
(lookup_pointer_type): Don't use or set TYPE_MAIN_VARIANT.
(lookup_reference_type): Ditto.
* cplus-dem.c: Many changes made to handle decoding of
ANSI-mangled names.
* symtab.c (gdb_mangle_name): Mangle/demangle ANSI-mangled names
as well.
Fri Nov 15 17:57:59 1991 Stu Grossman (grossman at
* mipsread.c (parse_partial_symbols): patch to keep DEC C
compiler from making gdb bomb out. Thanks to Ed Santiago!
Thu Nov 14 19:27:30 1991 Fred Fish (fnf at
* symfile.c: Add function compact_misc_function_vector() to
remove duplicate misc function vector entries. See comments
in source for why this is necessary/desirable.
* dwarfread.c: Add misc function type parameter to internal
record_misc_function(). Remove calls to init_misc_bunches()
and condense_misc_bunches(), these are now done in elfread.c.
* elfread.c: Add support for reading bfd canonical symbol tables
and generating misc function vector entries for global and
absolute symbols. Do calls to init_misc_bunches() and
condense_misc_bunches() where they will enclose all calls to
record_misc_function(), including those in dwarfread.c.
Thu Nov 14 17:02:11 1991 Roland H. Pesch (pesch at
* doc/ new targets,,
(roffable documentation).
* doc/gdb.texinfo: embedded hints (as comments) for better
texi2roff conversion.
Thu Nov 14 13:18:25 1991 John Gilmore (gnu at
* m88k-tdep.c (examine_prologue): Deal with OR instructions
that shuffle parameters into other regs.
* symtab.c (decode_line_1): Fix bug introduced in Per's change
of Nov 12th.
Wed Nov 13 19:51:11 1991 Steve Chamberlain (sac at
*, xconfig/delta88 made it install a sysV manual page;
gdb.z into the right place.
Wed Nov 13 16:45:13 1991 John Gilmore (gnu at
Motorola 88000 port without tears, I mean without tdescs.
* m88k-tdep.c: Blow away all tdesc stuff.
Provide functions for all the frame-related macros in
tm-delta88.h. Adopt i960-style EXTRA_FRAME_INFO.
(examine_prologue, frame_find_saved_regs, skip_prologue): borrow
from i960-tdep.c and adapt to the function prologues on the 88k.
(read_next_frame_reg): Borrow from mips-tdep.c.
FIXME: frame_locals_address should go away.
* tm-delta88.h: Dump all the tdesc stuff.
Macros for all frame-related stuff call fns of same name.
Remove duplicated definitions. FP_REGNUM becomes same as
* xm-88k.h: Eliminate lots of library dependencies, now handled
in libiberty. Eliminate KDB nonsupport.
* doc/gdbint.texinfo: Add rudiments on frames. FIXME, add more.
* stack.c (frame_info): Mark frameless functions.
Print locals address (FIXME, remove if same).
* blockframe.c: Comment changes, FIXME after.
* coffread.c: Even without TDESC, need to zap "@" symbols.
Don't register for wierd format names; change the names in BFD.
* alloca.c, language.c, tdesc.c: Lint.
* tdesc.c, tdesc-lib: FIXME: remove these.
Tue Nov 12 19:30:22 1991 John Gilmore (gnu at
* Add tdesc library support. Fixups to lint,
copying.c rules.
Tue Nov 12 13:43:26 1991 Per Bothner (bothner at
* symtab.c (decode_line_1): Remove spurious call to operator_chars.
Allow setting breakpoints on C++ destructors.
* valops.c (destructor_name_p): Don't check TYPE_HAS_DESTRUCTOR,
since it lies. Rely on callers to catch missing destructors.
* symtab.c (decode_line_1): For example (see above), here.
* buildsym.c, symtab.h: Remove TYPE_FLAGS_HAS{CON,DE}STRUCTOR
flags since they are no longer used.
Fixes to support C++ methods with functional parameters.
* c-exp.y (func_mod rule): Allow (and ignore) list of parameter
types in a function type.
* eval.c (parse_and_eval_type), value.h: New function,
parse_and_eval_type, is based on old code from check_stub_method.
But don't actually evaluate the cast, since that calls
value_cast(), whcih may fail. Just extract the type
from the parsed expression.
* values.c (check_stub_method): While looping through the
arguments, adjust depth *after* parameter has been handled.
Replace call and setup of parse_and_eval with new function
Tue Nov 12 09:40:07 1991 Fred Fish (fnf at
* utils.c, rem-multi.shar: Remove fixed arg count version of
* altos-xdep.c, arm-xdep.c, coffread.c, command.c, convex-xdep.c,
core.c, dwarfread.c, gould-xdep.c, infcmd.c, language.c,
m88k-xdep.c, main.c, printcmd.c, pyr-xdep.c, source.c,
sun386-xdep.c, symm-xdep.c, umax-xdep.c, values.c, xcoffread.c:
Change all instances of use of fixed args concat() to variable
args concat() now located in libiberty.
Tue Nov 12 07:23:46 1991 John Gilmore (gnu at
* Add xcoffread.c, xcoffexec.c.
* xcoffread.c: New file for handling AIX mangled-coff files.
* xconfig/rs6000, tconfig/rs6000: New files.
* buildsym.c: Add hooks for xcoffread.c.
* rs6000-pinsn.c, rs6000-tdep.c, rs6000-xdep.c, tm-rs6000.h,
xm-rs6000.h, rs6k-opcode.def, rs6k-opcode.h: New files.
* xcoffexec.c: New file for handling AIX shared libraries.
Mon Nov 11 19:14:31 1991 Fred Fish (fnf at
* core.c: Minor rewording of message to user containing name of
(and possibly arguments to) the program that generated a core
* elfread.c: Remove the register_addr() stub now that it is no
longer needed.
* procfs.c: Move misplaced #endif for ATTACH_DETACH. Add new
fetch_core_registers() function for core file support.
Sat Nov 9 13:37:57 1991 Fred Fish (fnf at
* dwarfread.c (dwarf_psymtab_to_symtab): Remove leftover call
to do_cleanups() which resulted from a previous change.
* elfread.c: Re-enable compilation of register_addr() stub
whenever it is not supplied by coredep.c
Sat Nov 9 00:40:32 1991 John Gilmore (gnu at
Add tracking of object files (that contain symbols) to gdb.
This includes a "struct objfile" that owns symtabs and psymtabs
that were read in from that binary file.
* symfile.h: Add struct objfile. Add pointer to the objfile
into the struct sym_fns.
Replace global `symfile' and `symfile_mtime' with
`symfile_objfile'. Add global object_files chain.
* symfile.c: Move param.h above symtab.h.
(sort_misc_function_vector): Add.
(syms_from_objfile): Was syms_from_bfd.
(symfile_open): Now returns objfile.
(allocate_objfile): New.
(free_objfile): New, replacing free_all_.*symtabs.
(symfile_init): Takes objfile arg, puts it in sym_fns result.
(reread_symbols): Searches whole chain of objfiles.
(allocate_symtab): Takes objfile as new parameter, chains them.
(free_all_psymtabs, free_all_symtabs): Move here from symmisc.c.
* dbxread.c: Make more errors into complaints.
(push_subfile, pop_subfile): Move to buildsym.c.
(dbx_symfile_read, dbx_symfile_init, fill_symbuf, read_dbx_symtab,
start_psymtab, psymtab_to_symtab_1, read_ofile_symtab,
dbx_psymtab_to_symtab, ): Use bfd ops, don't use file descriptor.
Pass objfile. Change callers.
(fill_symbuf, SWAP_SYMBOL): Take bfd as arg.
(read_dbx_symtab): Just wipe out new symbols, not all, on error.
(end_psymtab): Blow away psymtab if empty.
(process_symbol_pair): Swallow into read_ofile_symtab.
(process_one_symbol): Use push_context and pop_context.
(virtual_context): Delete #if 0'd obsolete stuff.
* buildsym.c (end_symtab): Pass objfile.
(dbx_lookup_type): Handle null typevector.
(dbx_alloc_type): Check file number, not sym number, for -1.
(find_symbol_in_list): Add for xcoffread.
(start_symtab): Default typevector is empty. Keep reusing same
(end_symtab): Take objfile argument and pass it to
allocate_symtab. Don't make a symtab if no blocks or symbols.
Handle empty typevector.
(push_context): New function for context stack nesting.
(read_type): Mark FIXME where we need to reintroduce type smashing.
* buildsym.h (pop_context): Macro, paired with push_context.
(subfile_stack): Move here from dbxread.c.
* coffread.c (end_symtab, read_coff_symtab): Take and use objfile arg.
(read_coff_symtab): Cleanup by freeing objfile, not all symtabs.
* mipsread.c (read_mips_symtab, parse_partial_symbols, parse_fdr,
new_psymtab, new_symtab): Take and use objfile arg.
* dwarfread.c (scan_compilation_units, start_psymtab,
process_dies, end_symtab, dwarf_build_psymtabs,
read_lexical_block_scope, read_func_scope, read_file_scope): Take
and use objfile argument.
(psymtab_to_symtab_1, read_ofile_symtab): Don't take or use file
descriptor. Use BFD internal functions instead.
(end_symtab): Call global allocate_symtab.
* elfread.c, target.c: Minor changes to accommodate objfiles.
* symtab.h: partial_symbol_table has no symfile_name member now.
(fn_fieldlists voffset): avoid non-int bitfield.
(struct symtab): Add objfile * and objfile_chain * of symtabs.
(struct partial_symtab): Add objfile * and objfile_chain * of
psymtabs. Remove symfile_name.
* symmisc.c: Lose free_all_symtabs, free_all_psymtabs.
(printsyms_command): Rename from print_symtabs. Add selective
listing if 2nd argument given. Print objfile info.
(printpsyms_command): Rename from print_partial_symtabs. Ditto all.
(printobjfiles_command): New; prints objfiles lists, and checks
for consistency of symtab, psymtab, and objfile lists.
* symfile.h, symfile.c, symtab.h: Lint
Fri Nov 8 23:38:48 1991 John Gilmore (gnu at
* command.c: Include param.h.
* defs.h (warning_setup, warning): Declare.
* expprint.c (print_subexp, UNOP_MEMVAL case): Lint.
* inflow.c (new_tty): Use USE_O_NOCTTY #define.
* language.c, printcmd.c (print_scalar_formatted), signame.c,
stack.c: lint.
Thu Nov 7 18:26:15 1991 Steve Chamberlain (sac at
* link with libiberty after libreadline, since
readline might want something in libiberty.
* m88k-xdep.c: Fixed the register offsets in the ptrace_user
struct for BCS 88k machines.
* xm-m88k.h: don't define USIZE if already defined.
* Added delta88 target.
Thu Nov 7 04:51:19 1991 John Gilmore (gnu at
* am29k-pinsn.c, am29k-opcode.h: Fix decoding of mtacc, dmac, fmac.
* tm-*.h: Remove READ_DBX_FORMAT, COFF_FORMAT, and
READ_MIPS_FORMAT, which have been unused since BFD. Still
* tm-sun3.h, tm-altos.h: Remove detritus accidentally left from
function calling code moved to m68k-tdep.c.
Wed Nov 6 17:21:59 1991 John Gilmore (gnu at
* coffread.c: Eliminate c_nsyms in favor of c_naux.
Complain if no auxents on .bf and .ef FCN symbols, and assume
lots of line numbers.
(init_linenos, enter_linenos): Use a sentinel at the end of the
read-in linenos, to make for a fast, safe loop-end test.
Wed Nov 6 02:54:08 1991 Steve Chamberlain (sac at
* coffread.c (read_coff_symtab): coffread used to rely on the
x_sym.x_misc.x_lnsz.x_lnno field giving the # of linnos in a
function. Two of the formats I'm using (29k and 88k) don't seem to
set it. Ths patch to fcn_last_line and (enter_linenos) is an
attempt to use the actual size of the linno table in the file to set
the number of linenos to process.
Tue Nov 5 22:47:46 1991 Steve Chamberlain (sac at
* put a - infront of the mv and
mv, so that if bison is used, and the files
are created in place, so the mv fails, then the make continues.
Tue Nov 5 16:47:47 1991 Per Bothner (bothner at
Add C++ as a separate language.
* defs.h (enum language): Add language_cplus.
* dwarfread.c (end_symtab): Support language_cplus.
* c-exp.y: Add new struct language_defn cplus_language_defn.
Don't set c to be the default language (see main.c).
* c-exp.y (yylex): Only look for field of this if
language is C++. (First difference from C!)
* language.c: Add case branches for C++ (currently, all
the same as C). Also, add c++ to "usage" note for "set lang".
* valprint.c (typedef_print). Add case branches for C++.
* main.c (main): New way to set initial language: Look at
file extension of psymtab containing main(). (Same as we
do for symtabs, but avoid loading the symtab yet.)
* symtab.c: New routine find_main_psymtab(), used by main()
to set initial language.
* symfile.c (allocate_symtab): Move code for mapping file
extensions-> languages to new deduce_language_from_filename().
Fix a C++ problem when looking for methods in super-classes.
There was confusion between base and derived types.
* valops.c (value_fn_field): Change function interface.
* values.c: Use new value_fn_field interface.
Mon Nov 4 10:49:33 1991 Per Bothner (bothner at
* infrun.c: Fixed typo in comment.
* utils.c: All the v*fprintf emulation is now in libiberty,
so we can get rid of some junk.
* xm-sun3os4.h, xm-sun4os4.h, xconfig/decstation, xconfig/i386sco,
xconfig/sun3os4, xconfig/sun4os4: Don`t need HAVE_STRSTR any more.
* m68k-pinsn.c (print_insn_arg): Support BB/BW/BL
type operands, as used by branch instructions.
* gmalloc.c: Fix prototype of memcpy.
* elfread.c: Comment out register_addr, since it conflicts
with the one in coredep.c.
* buildsym.h: Remove extern declarations of two functions
that are really static in buildsym.c.
* tm-mips.h: Add symbolic names for more registers.
* mips-xdep.c (store_inferior_registers): Use new register names.
* xm-mips.h: Simplify REGISTER_U_ADDR, since it is now
only used for core files, not ptrace. Therefore,
the KERNEL_U_ADDR hack is no longer needed.
The mapping to ptrace number is now in in mips-xdep.c.
* mips-xdep.c: Define REGISTER_PTRACE_ADDR (using the
mapping from the old REGISTER_U_ADDR), and use it
in {fetch,store}_inferior_registers.
* mipsread.c: Rename #include ecoff.h to new name coff-mips.h.
* mips-tdep.c (mips_push_dummy_frame, mips_pop_frame):
Save/restore FP regs correctly (?).
* dbxread.c: Remove duplicate define_symbol and type_synonym_name
(these had been previously moved to buildsym.c).
Hence, define_symbol becomes extern instead of static.
* buildsym.c (read_struct_type): Comment out bogus handling
of C++ operator methods. Minor hacking of reading of class
contexts. Make define_symbol non-static, so dbxread.c can call it.
Fri Nov 1 11:05:47 1991 John Gilmore (gnu at
* mipsread.c (read_mips_symtab, read_the_mips_symtab): Use real
filename with error messages.
* stack.c (frame_select_command): Rename to select_frame_command
to avoid "fr" and "fra" having nonunique completions.
* symfile.c (sort_symtab_syms): Ignore sort of zero symtab *.
(symfile_init): Print file format name when unable to handle it.
(free_named_symtabs): Use BLOCKVECTOR rather than obsolete BLOCKLIST.
* symmisc.c (free_symtab): Only free linetable if nonzero.
* symtab.h: Remove obsolete BLOCKLIST macros.
Thu Oct 31 18:12:43 1991 Stu Grossman (grossman at
* infrun.c (wait_for_inferior): another stepi/nexti fix. Ensure
that stop_step is 1 at bottom of main loop. I don't know why this
needs to be done, but it helps me sleep better at night.
Sun Oct 27 18:18:39 1991 Stu Grossman (grossman at
* main.c (initialize_history): Read history after reading all
init files.
Sun Oct 27 14:09:25 1991 John Gilmore (gnu at
* buildsym.c: Break out initial malloc sizes.
(record_line): Record directly in a subfile. Alloc on demand.
(compare_line_numbers): Add from xcoffread.c.
(end_symtab): New params say whether to sort pendings and
linetable. Patch block stabs if defined. Shrink linetable before
allocating the symtab.
* buildsym.h: Delete line_vector* and prev_line_number. Add
global_stabs and file_stabs for xcoffread.
* dbxread.c (start_subfile): Move to buildsym. Change above calls.
* symtab.h: LINETABLE(symtab) can now be null. Zap LINELIST.
* symmisc.c, symtab.c: Cope with null LINETABLEs.
* blockframe.c: Pass fromleaf to INIT_EXTRA_FRAME_INFO.
* tm-29k.h, tm-88k.h, tm-i960.h, tm-irix3.h, tm-mips.h, tm-pyr.h,
tm-sparc.h: Accept fromleaf parameter.
* c-exp.y (yyerror): Pass error message if given.
* Add rs6000 host and target.
* inflow.c (new_tty): O_NOCTTY kludge for RS/6000.
* symfile.h (entry_point): Add.
Sat Oct 26 00:16:32 1991 John Gilmore (gnu at
* buildsym.c: New file. Breaks out symbol-table-building routines
from dbxread.c, so they can be shared with xcoffread.c.
* buildsym.h: New file. Declarations for buildsym.c users.
* dbxread.c: Remove large chunks into buildsym.c.
* Add buildsym.c and buildsym.h.
* symfile.c (syms_from_bfd): New routine.
(add_symbol_file): Call it to do the real work.
(syms_from_bfd): Initialize entry_point before calling symfile_init.
* symtab.h, symfile.c, coffread.c, mipsread.c, dwarfread.c:
Avoid declaring or setting entry_point (symfile.h & symfile.c cope).
Fri Oct 25 10:58:16 1991 Mark Eichin (eichin at
* cplus-dem.c (cplus-demangle): added support for templates, static
data, and the new (correct) mangling for destructors.
* dwarfread.c: (dwarfwarn): created a varargs version of
dwarfwarn, for non __STDC__ compilers.
* c-exp.y: (yylex): added match for "template" token.
(typebase): added TEMPLATE name '<' type '>' clause, for explicit
specification of template types.
* symtab.c: (lookup_template_type): new function for finding
templates in symbol table.
(type_name_no_tag): changed to explicitly check for s/u/e at the
beginning of the symbol - if it is a template, none of these will
be there (but the name will still contain spaces.)
Fri Oct 25 18:59:32 1991 Per Bothner (bothner at
Various fixes to improve g++ debugging.
* symtab.h: Add is_const and is_volatile flags for each method.
These are bit fields - take their space from voffset,
which shrinks to 30 bits. Since voffset is now a bitfield,
make it unsigned for portability. This changes its interpretation
slightly: Static methods now have voffset 1 instead of -1,
and virtual offsets start at 2, not 1.
* symtab.c: Renamed gdb_mangle_typename to gdb_mangle_name,
since it now returns an entire magled method name, not just
the type part. This avoids some duplication.
It also allows us to correctly mangle const and volatile
methods (using the new is_const and is_volatile bit fields
mentioned above).
* valprint.c (type_print_base), values.c (check_stub_method):
Simplify by using new gdb_mangle_name.
* values.c (value_headof): Fix to correctly handle single
inheritance (actually two fixes, either of which suffices).
* dbxread.c (read_struct_type): Handle const and volatile
method specifiers.
* dbxread.c (read_struct_type): Yet one more place where
we must handle '\\' continuations.
* valprint.c (vtbl_ptr_name): Add final '\0'.
Fri Oct 25 16:06:38 1991 Stu Grossman (grossman at
* tm-sparc.h, tm-68k.h (EXTRACT_RETURN_VALUE): fix output of
short return values for sparc and 68k. Patch from Paul Eggert.
* coffread.c, coredep.c, i386-xdep.c: install patches for
SysV/386 3.2 from Mauro DePalma.
Fri Oct 25 02:02:13 1991 John Gilmore (gnu at
* core.c (core_file_info), exec.c (exec_file_info): Print file
type. Use printf_filtered.
* valops.c (value_fetch_lazy): Avoid 0-length fetches.
Thu Oct 24 23:06:40 1991 Fred Fish (fnf at
* dwarfread.c: Add casts to remove compiler warnings.
* tm-3b1.h, tm-68k.h, tm-altos.h, tm-amix.h, tm-hp300bsd.h,
tm-hp300hpux.h, tm-isi.h, tm-news.h, tm-pn.h, tm-sun2.h,
tm-sun3.h: Remove locally duplicated code for calling functions
in the inferior. The only differences were in the specific trap
vectors used and whether or not an fpu was present. These are
now handled by appropriate definitions of BPT_VECTOR and
HAVE_68881 respectively. Other minor obvious cleanups.
* valops.c: Correct a minor misspelling.
* utils.c: Remove local BSD/USG hacks that are now in libiberty.
* dwarfread.c: Remove prototype for dwarfwarn. Does not work
with <varargs.h>.
Thu Oct 24 09:33:44 1991 John Gilmore (gnu at
* stack.c (frame_command): Always print. Use new
frame_select_command to select a frame without printing.
* dwarfread.c: Use <varargs.h>, since <stdarg.h> is not portable.
Thu Oct 24 01:32:51 1991 Fred Fish (fnf at
* dwarfread.c: New file for DWARF debugging format support.
* elfread.c: New file for ELF object file format support.
* procfs.c: New file for SVR4 /proc (process file system) support.
* tm-amix.h, xm-amix.h, tconfig/amix, xconfig/amix: New files for
Amiga UNIX support.
* xm-svr4.h, tm-svr4.h: New files for SVR4 support.
* xm-m68k.h: New file for host machines with m68k cpu.
* Add elfread.c and dwarfread.c to SFILES_MAINDIR.
Add elfread.o and dwarfread.o to OBS.
* symfile.h: Add "elf" to list of supported formats in comment.
* c-exp.y, defs.h, symtab.h, valprint.c: Add three new builtin
types to gdb, builtin_type_long_double, builtin_type_complex, and
builtin_type_double_complex. Add and use new TARGET_SHORT_BIT,
TARGET_DOUBLE_COMPLEX_BIT, as the sizes in bits of the indicated
types on the target machine (ala the existing TARGET_LONG_LONG_BIT).
* infrun.c: When using SVR4 /proc interface instead of ptrace(),
call proc_set_exec_trap() to setup child to stop at first instruction.
* inftarg.c: When using SVR4 /proc interface, call proc_wait()
rather than wait().
* m68k-tdep.c: Add new routines supply_gregset(), fill_gregset(),
supply_fpregset(), and fill_fpregset(), which are machine
dependent support routines for SVR4 /proc interface.
* utils.c: Add warning_setup() and warning(). Warning() behaves
the same as error() except that it returns normally rather than
jumping back to command level. Modules that don't want to call
warning() for some reason, but want to produce their own warnings,
can call warning_setup() to ensure compatibility with the way
warning() and error() deal with the terminal.
* symtab.c: Make internal errors produce more useful messages.
* tm-68k.h: Move code that is duplicated in almost every single
m68k based machine's configuration files to this common file.
Duplications in the configuration files still need to be removed
* infrun.c (child_create_inferior): System V versions must call
setpgrp() with no arguments, to comply with prototyping typically
in <unistd.h>.
* munch: Add support for SVR4 style nm output.
* dbxread.c, mipsread.c symmisc.c, symtab.c: Remove the object
file specific fields from the partial symbol table structure and
replace them with a pointer to private data for each different
flavor of object file reader to initialize appropriately.
Wed Oct 23 09:38:20 1991 John Gilmore (gnu at
* xconfig/sun[34]os4: Add note about strstr botch on sunos4.0.3c
and previous.
* mipsread.c (fixup_undef_type): New function. If a struct /
union / enum is defined in a header file but nowhere else used,
(by typedefing, pointer referencing or declaration) the mipsread code
builds the complete tree for the structure but leaves its code as
TYPE_CODE_UNDEF as it doesn't know what kind of aggregate it is.
Guess its type based on the details of the members.
Tue Oct 22 18:04:32 1991 Stu Grossman (grossman at
* infrun.c (wait_for_inferior): Check return value from
Mon Oct 21 17:47:03 1991 Stu Grossman (grossman at
* infrun.c (wait_for_inferior): fix stepi/nexti that was broken
by my last edit to this routine.
Mon Oct 21 14:27:43 1991 John Gilmore (gnu at
* tm-sun3.h (FIX_CALL_DUMMY): problem with cross debugging.
FIX_CALL_DUMMY does unaligned accesses and/or forgets to byte swap
the values before putting them into the dummy code. (From Peter
Mon Oct 21 10:04:39 1991 Steve Chamberlain (steve at
* added ebmon target.
Wed Oct 16 22:49:58 1991 John Gilmore (gnu at
GDB-4.2 release!
* Roll VERSION to 4.2.
* core.c (core_open): Improve error message for bad file.
Pass .reg virtual memory address to fetch_core_registers to help
it find the registers in the core-file header.
* coredep.c (fetch_core_registers): Take new argument, use it,
and pass it to register_addr to locate the block of registers.
* xm-mips.h: Update KERNEL_U_ADDR for new scheme. Cleanup a bit.
* dbxread.c (read_dbx_symtab, process_one_symbol): Handle
Sequent N_FN_SEQ like everybody else's N_FN.
* main.c: Circumvent SCO cc bug with #if !!defined(USG).
* tm-i386v.h: #endif guck.
* xconfig/i386*: Remove -Dgetpagesize()=4096 kludge.
* xconfig/i386sco: Add HAVE_STRSTR to avoid ANSI bdeath.
* xconfig/tahoe: Add REGEX, which seems to be missing.
* coredep.c: Add <sys/types.h> for SCOnix.
* dbxread.c (read_dbx_symntab): Avoid coredump on malformed file.
* printcmd.c (print_formatted): Flush output before disassembly.
Tue Oct 15 20:12:32 1991 Roland H. Pesch (pesch at
* doc/refcard.tex (sec "Working Files"): consistent metavars and
other improvements, due to comments by Fran├žois Pinard
* doc/gdb.texinfo (appendix "Installing GDB"): changes in
configure, and improvenets related to Pinard's refcard comments
Tue Oct 15 08:45:12 1991 John Gilmore (gnu at
Changes from Fred Fish:
* tm-68k.h (FPI_REGNUM): Add.
* infrun.c (child_create_inferior): flush stdout and stderr
before forking.
* 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
* i387-tdep.c (double_to_i387): Fix typo for double_to_ieee_extended.
* utils.c (_initialize_utils): If !ISATTY, don't paginate.
*, tconfig/decstation, xconfig/decstation: Rename
dec3100 to decstation.
Mon Oct 14 13:37:50 1991 Roland H. Pesch (pesch at
* doc/gdb.texinfo: Catch up to changes recorded here in ChangeLog
(nodes Continuing and Stepping; Memory; Targets) clarifications
due to Larry Breed
Fri Oct 11 23:27:06 1991 John Gilmore (gnu at
* tm-{irix3,mips,nindy960,pn,symmetry,vx960}.h: Move
REGISTER_U_ADDR to corresponding xm- file. Sugg. by Peter Schauer.
* symmisc.c (print_partial_symtabs): Add printpsyms debug cmd.
* m68k-tdep.c (m68k_push_dummy_frame, m68k_pop_frame): Add
generic routines for calling inferior functions.
* blockframe.c (inside_main_scope, inside_entry_scope): New.
* copying.awk: Filter formfeeds out of copying & warrantee.
Make them available as `show copying' and `show warrantee' also.
* main.c (print_gnu_advertisement): Advt `show' commands.
Thu Oct 10 17:25:47 1991 John Gilmore (gnu at
* mach386-xdep.c: Even when cross-compiling, leave in the
core-file reading code.
* core.c (get_core_registers): Avoid coredump if no .reg section.
Wed Oct 9 17:03:34 1991 John Gilmore (gnu at
* mipsread.c, coffread.c: initialise TYPE_VPTR_FIELDNO to -1.
This avoids coredumps under `set print object on' in value_headof
(called erroneously by value_from_vtable_info) for `p &struct'
or `p *struct'. From Peter Schauer.
Mon Oct 7 00:06:52 1991 John Gilmore (gnu at
* Roll version to 4.1.2.
* dbxread.c: Use aout64.h, not a.out.gnu.h. Get external symbol entry
size from BFD (but, FIXME, we don't yet read external nlists's and
convert them to internal nlists's before handling them -- we still
assume they have the same size and alignment.) Use SET_NAMESTRING
everywhere useful.
* exec.c (exec_file_command): Move dead coff-encapsulation code
to BFD.
* m88k-tdep.c, m88k-xdep.c: Remove encap test and #inc <a.out.h>.
Fri Oct 4 22:30:06 1991 John Gilmore (gnu at
*, tm-i386v.h, xm-i386v.h: Intel 386 Mach host port.
* xm-i386mach.h, mach386-xdep.c, xconfig/i386mach: New files.
Fri Oct 4 17:04:31 1991 Per Bothner (bothner at
More patches from Peter Schauer <>:
* mips-xdep.c (store_inferior_registers): Don't try to
write the (pseudo) FP.
* mipsread.c (parse_partial_symbols): Improved algorithm for
setting pst->texthigh.
Fri Oct 4 16:47:32 1991 Roland H. Pesch (pesch at
* doc/Makefile: make TEXINPUTS include . everywhere
Fri Oct 4 00:35:56 1991 John Gilmore (gnu at
* coffread.c, dbxread.c, symfile.c, symmisc.c, symtab.h: Remove
vestiges of typevectors, which were for symsegs and are no longer
used. (From a question by Eliot Dresselhaus
Thu Oct 3 09:33:26 1991 John Gilmore (gnu at
* dbxread.c, coffread.c: static-ize functions that were
gratuitiously external. (From Fred Fish.)
* c-exp.y: sym->class to SYMBOL_CLASS (sym).
* dbxread.c (dbx_lookup_type): Keep doubling size of typevector
until it is large enough.
* dbxread.c (read_type): Handle error case slightly better.
Make complaint message not C++-specific.
Wed Oct 2 17:21:07 1991 Stu Grossman (grossman at
* infrun.c (wait_for_inferior): Fix step/next so that you only
stop at the beginning of a new line. This fixes various problems
with for loops, nested if-else's and switch statements.
Tue Oct 1 06:33:55 1991 John Gilmore (gnu at
* symtab.c (lookup_symtab_1, lookup_symbol): "fatal" errors
between symtabs and psymtabs become ordinary error()s.
* dbxread.c (read_dbx_symtab): Relocate end_of_text_addr
properly, making "end pc" correct in shared lib psymtabs.
(From Guy Harris <>.)
Mon Sep 30 13:15:31 1991 John Gilmore (gnu at
* dbxread.c: Enable, but soften, const_vol_complaint.
(read_dbx_symtab): N_STSYM and N_LCSYM define static vars.
Ditto Gould N_NBSTS and N_NBLCS. Also, all types in the psymtab
should be file-scope, not global.
(read_struct_type): Remove ancient multiple-inheritance warning.
(read_range_type): Check base type, complain & patch if undefined.
* stack.c (frame_info): Demangle the function name in `info stack'.
(From Peter Schauer)
Sat Sep 28 10:02:33 1991 John Gilmore (gnu at
* eval.c (evaluate_subexp_for_address): Don't use
TYPE_POINTER_TYPE directly (it might be zero if this type has
never had a pointer created before); use lookup_pointer_type.
* symtab.c (lookup_method_type): Arguments were swapped in all
callers, so fix it here. I'm amazed this worked at all!
Fri Sep 27 18:09:31 1991 John Gilmore (gnu at
* c-exp.y, m2-exp.y: Define more yysymbols that happen to be
"bss" rather than "data" symbols, but which still conflict.
* m2-exp.y: Lint.
* coffread.c (coff_symfile_read): Use xmalloc, not malloc.
* core.c (core_files_info): Shorten output.
* exec.c (exec_files_info): Ditto.
(build_section_table): Ignore zero-length sections.
* language.c, printcmd.c: Lint.
* language.h (get_frame_language): Declare.
* saber.suppress: update.
* stack.c (find_relative_frame): Remove complex code that was
#if 0'd, stick with simple code. Lint.
* saber.suppress: Update a bit.
* symfile.c (add_symbol_file_command): Add "?" to question.
* utils.c (parse_escape): Avoid \a due to bdead compilers.
* value.h: Declare typedef_print.
* valprint.c (val_print, type_print_base): TYPE_CODE_RANGE less
* nindy-tdep.c (nindy_frame_chain_valid): Use lookup_misc_func.
(Reported by Mark Peek <>.)
* solib.c (solib_map_sections): Relocate all sections, even
though only the text section's size is tracked. Mark ld_text
for eventual elimination as we generalize to N sections.
* infrun.c (wait_for_inferior): Don't check if the PC is in a
call_dummy if we were stopped by a random signal that is being
passed to the program. This produced wierd results when calling
functions in the inferior and signals (e.g. SIGALRM) were in use.
Tue Sep 24 18:05:30 1991 John Gilmore (gnu at
* infrun.c (IN_SIGTRAMP): Not parenthesized properly.
Bugfix from Paul Eggert <>.
* tm-ultra3.h (IN_SIGTRAMP): Ditto.
* valprint.c (print_floating): Print 9 digits for IEEE floats.
From Paul Eggert.
Mon Sep 23 15:50:07 1991 John Gilmore (gnu at
* Roll VERSION to 4.1.1.
* source.c (line_info): Peter Schauer fixes a bug I introduced in
hex conversion.
Fri Sep 20 16:10:52 1991 John Gilmore (gnu at
GDB-4.1 release!
* (VERSION): Set to 4.1.
* language.c (set_language_command): Print useful help message,
and restore the language string after giving help.
* valprint.c (typedef_print): Print typedef in C or M2.
* symtab.c (list_symbols): Use it.
* main.c (main): Avoid any output before (gdb) prompt when -q.
* language.c (set_language_command): Handle errors by restoring
the language string to its current state (fix from A. Beers).
* doc/gdbint.texinfo: Roll in information from README. Rearrange
"how to install" and "how to print the doc" stuff so it drops
easier into README.
* Rename rtpc CPU to romp to match config.sub.
* README, WHATS.NEW, TODO: Update for gdb-4.1.
Fri Sep 20 17:39:14 1991 Roland H. Pesch (pesch at
* doc/gdb.texinfo: Updates from ChangeLog. set/show write,
autoloading shared libs, copyright etc on GDB startup, clean up $_
and $__ index refs, set/show listsize and related updates to list
cmd. New host/target configs.
Fri Sep 20 15:46:00 1991 Roland H. Pesch (pesch at
* doc/Makefile: generate aux version-no file doc/gdbVN.m4
from main version definition
doc/gdb.texinfo: use version recorded in doc/gdbVN.m4 for current
GDB version no refs (setup-to-dist): generate doc/gdbVN.m4
* doc/gdb.texinfo: merge new language-switching and lang-specific
doc by Andrew Beers
Fri Sep 20 15:00:57 1991 Per Bothner (bothner at
* mcheck.c: Add __ONEFILE kludge to allow compilation by non-ANSI
compilers (which may lack stddef.h).
Fri Sep 20 13:29:42 1991 John Gilmore (gnu at
* dbxread.c (read_dbx_symtab, process_one_symbol): N_FN and
N_WARNING are the same except for the N_EXT bit, so just use their
values alone, rather than OR-ing them with N_EXT.
Fri Sep 20 12:27:55 1991 Stu Grossman (grossman at
* mipsread.c (parse_lines): Deal with negative extended line
offsets correctly.
* c-exp.y, m2-exp.y: #define yyerrflag and yynerrs to avoid
global symbol conflicts.
Fri Sep 20 02:28:15 1991 John Gilmore (gnu at
* .gdbinit: Move 'set complaints' to top, so it runs even in
case we aren't debugging GDB.
* language.c (_initialize_language): Fix type check and range
check documentation strings.
* utils.c (!HAVE_VPRINTF): Define vfprintf as a function, so
language.c can use it. (Though language.c should really not be
handling warnings/errors the way it does, FIXME.)
* symtab.c (lookup_primitive_type): const lint.
Bugfix from Peter Schauer:
* source.c (lines_to_list): Make signed, to avoid comparison
going unsigned and complaining that -3 is too high for 21 lines.
* stack.c (lines_to_list): Ditto.
Thu Sep 19 23:33:41 1991 John Gilmore (gnu at
* (HFILES): Add minimon.h.
(VERSION): Roll version number to 4.0.95.
(gdb.tar.Z, make-proto-gdb.dir, setup-to-dist, gdb-XXX.tar.Z):
New rules for building distributions. Normal distribution
is built by doing `make -f gdb.tar.Z' in the directory
one level up from here; it calls make-proto-gdb.dir to build a
directory `proto-gdb' which is an image of the release. The old
`gdb.tar.Z' rule still works too.
* config.sub, configure: Roll in latest from ..
Thu Sep 19 17:41:24 1991 Roland H. Pesch (pesch at
* doc/gdbint.texinfo: Reorder contents; reorganize new-host,
new-target, and new-config chapters; fix minor typos; come closer
to usual GNU markup conventions for @file @samp @code @var.
Thu Sep 19 17:04:12 1991 Per Bothner (bothner at
Patches from Peter Schauer <>:
* mipsread.c (parse_partial_symbols): Enter the name of all
structs/unions... into the psymtab so we can access them if the
symtab is not read in.
* mips-tdep.c: Remove some unneeded #includes.
* xconfig/dec3100: Add HAVE_STRSTR.
Thu Sep 19 15:14:23 1991 John Gilmore (gnu at
* Circumvent Sun Make bug on *
* c-exp.y, m2-exp.y: Lint.
* m2-exp.y: Avoid using yytname[] which is a Bison-ism.
* valprint.c (val_print_fields): Check for stub type.
* mipsread.c (_initialize_mipsread): Avoid using
builtin_type_void at initialize time.
(mipscoff_symfile_read): use it now.
Wed Sep 18 15:55:51 1991 John Gilmore (gnu at
Merge multiple-language support, and partial Modula-2 support,
from Andrew Beers <>.
* i387-tdep.c: New file, consolidates most 80387 support,
and eliminates host dependency on double<->extended conversions.
* i386-xdep.c, symm-xdep.c: Remove most 387 support.
* xconfig/i386{sco,v,v-g,v32,v32-g}: Now need i387-tdep.o.
* symfile.c (allocate_symtab): New fn, consolidates the work
of allocating and initializing a new struct symtab. Set the
language of the symtab based on its filename extension.
* symfile.h: Declare it.
* mipsread.c (new_symtab): Use it. Minor formatting changes.
* dbxread.c (end_symtab): Use it.
* mipsread.c (parse_symbol, case stParam and stProc): Add #if 0'd
code for saving types of parameters with each function definition.
* dbxread.c (define_symbol, function and parameter cases): Ditto.
(read_dbx_symtab, case N_DEFD): Ignore.
(read_enum_type): Recognize FALSE/TRUE enum as Modula-2 BOOLEAN.
(read_range_type): Rename MAX_OF_TYPE to MAX_OF_C_TYPE, etc.
#if 0 out its uses, though, since they set a dead value.
* coffread.c (end_symtab): Use allocate_symtab.
(process_coff_symbol): #if 0'd for functions and params as above.
(read_enum_type): Recognize Modula-2 BOOLEAN.
* symtab.c (add_param_to_type): #if 0'd function to add a
parameter type to a function type's field list.
* defs.h (local_hex_format, local_hex_string, *_custom): Add.
* i386-xdep.c, pyr-tdep.c, pyr-xdep.c, remote-vx.c, solib.c,
source.c, symfile.c, dbxread.c, breakpoint.c, core.c, exec.c,
i387-tdep.c, infcmd.c, mips-tdep.c, stack.c, printcmd.c: Output
hex with local_hex_string for Modula-2 support.
* breakpoint.c (breakpoint_cond_eval): Use new value_true to test
breakpoint condition language-independently.
* parse.c: New file with the common code remains of expread.y.
* parser-defs.h: New file with common declarations from expread.y.
* c-exp.y: New file with the C parser from expread.y, and other
language-specific information.
* m2-exp.y: New file with the Modula-2 parser and etc.
* expread.y, Remove.
* breakpoint.c, eval.c, printcmd.c, expression.h: Use
parse_expression and parse_exp_1 rather than parse_c_expression
and parse_c_1.
* symtab.h (enum languages): Move to defs.h.
(enum type_code): Add TYPE_CODE_CHAR and TYPE_CODE_BOOL.
Declare Modula-2 builtin types.
Add MAX_OF_TYPE and MIN_OF_TYPE macros.
* symtab.c (_initialize_symtab): Remove builtin type
definition and initialization to *-exp.y.
(lookup_primitive_typename): Use language-dependent vector.
(lookup_typename): Fix bug, make it work if primitive typename.
(lookup_unsigned_typename): Call above.
(create_array_type): Set up range type for array index.
(list_symbols): Call typedef_print to print typedefs.
* values.c (unpack_long, value_from_longest): Handle
* expression.h (enum exp_opcode): Add Modula-2 specific opcodes.
* expprint.c: Look up expression opcodes in language-specific
table, based on expression's language. Handle some Modula-2
specific opcodes.
* stack.c (frame_info): Print language of stack frame.
(select_frame): Also select language, if in auto-mode.
(get_frame_language): New subroutine.
* main.c (execute_command): Warn as language changes automatically.
* printcmd.c (ptype_command): Parse types using the language
parser, both for language-independence, and so that scopes can
be specified.
* language.h, language.c: New files for language-specific macros,
declarations, and definitions.
Misc fixes:
* main.c (main): If error() is called during early
initialization, print its message and then exit(1) from GDB.
* valprint.c (type_print_base): Avoid printing garbage for ints
of unusual sizes.
(_initialize_valprint): Warn about host/target size assumption;
improve long long support slightly.
* convex-tdep.c (comm_registers_info): Avoid parsing decimal and
hex -- let parse_and_eval_address do it.
* doc/gdbint.texinfo (Languages): Doc how to add a language.
* Cope with new files and removed files.
Tue Sep 17 08:37:41 1991 John Gilmore (gnu at
Add Andrew Beers' changes for Modula-2 support. His ChangeLog
entries are enclosed herein. Not all of these changes
have been merged into the master GDB sources -- check the
ChangeLog above here for the merge log.
Mon Jun 3 17:05:45 EDT 1991
m2-exp.y Created. Tested outside of GDB for a few days. Proper
operators were added, C specific operators and tokens
removed. yylex() revamped to some extent. Still things
missing from the grammar, such as sets.
Tested for two weeks in GDB v3.5.
Tue Jun 11 17:23:48 EDT 1991
m2-exp.y Added boolean constants TRUE and FALSE to the grammar
so they are built-in. Sort of a hack.
Fri Jun 14 12:53:51 EDT 1991
m2-exp.y Added range checking for numeric constants. Any numeric
constant is assumed to be of builtin type INTEGER unless:
(1) it is octal or hexadecimal, in which case it is a
CARDINAL; (2) it is too big to fit into an INTEGER, in
which case it is a CARDINAL.
eval.c Added simple range checking for +, -, and * on integers.
Doesn't work very well for *, since 6 * 1,000,000,000 =
1,705,032,704, which fails the simple test of result >=
first_operand, no matter in what order the operands are.
Tue Jun 18 14:11:30 EDT 1991
Broke the parser into parts, one containing the C grammar and the other
containing code to be shared by all of the grammars.
The following files no longer exist:
The following files were added:
c-exp.y (The C grammar)
m2-exp.y (The Modula-2 grammar)
parser-code.c (Code that is shared by the above grammar)
Makefile.dist Changed to reflect the above dependencies. NOTE: It is
now necessary to use the Bison compiler compiler, since it
will generate function/variable prefixes other than yy.
Tue Jun 18 16:47:49 EDT 1991
symtab.[ch] Added the external variable working_lang, than holds the
value of the current working language.
Added the ennumerated type language_mode, with the values
language_auto and language_manual, the former meaning that
GDB sets working_lang as needed, and the latter meaning
that the value of working_lang is totally under user
symtab.[ch] Added the Modula-2 pervasive types INTEGER, CARDINAL,
REAL, BOOLEAN and CHAR. Also added the type codes
utils.c Added set_language_command and show_language_command to
implement the GDB support commands "set language" and
"show language".
expression.h A number of identifiers were added to the type exp_opcode
to facilitate Modula-2 builtin functions, integer
division, and array indexing.
Wed Jun 19 13:25:58 EDT 1991
language.h Added the macro STRICT_TYPE, which evaluates to non-zero
if the language specified by working_lang requires the use
of strict typing of expressions. Eventually, even this
will be able to be changed by the user.
Added the macro RANGE_CHECK, which evaluates to non-zero
if the language specified by working_lang requires the
checking of a value against the domain of its type.
Eventually, even this will be able to be changed by the
language.[ch] Predicates involving types (simple_type, ordered_type,
same_type, integral_type, numeric_type, character_type,
boolean_type, float_type) are added. These predicates are
based on the current value of working_lang, and are handy
in type-checking.
Wed Jun 19 15:39:34 EDT 1991
eval.c Added the function type_array_rank which computes the rank
of an array type.
valarith.c Added the funtion value_bool, which when given a integer
value.h value (ie. struct value *) as an argument, it returns a
boolean value (ie. struct value *) true if that integer
is non-zero, and a boolean value false otherwise.
valprint.c Added cases for TYPE_CODE_BOOL, so Modula-2 BOOLEAN values
will print out properly.
Wed Jun 19 16:36:34 EDT 1991
valops.c Added the function value_capitalize, which returns it
value.h argument capitalized if its argument is a lowercase
letter, or the argument unchanged if its argument is not a
valarith.c Added the function range_check_p, which returns non-zero
value.h if its value argument is between the integral bounds upper
and lower.
Added the function range_check_enum_p, which makes sure
that its value argument is a valid member of the domain of
its type argument.
Added the function range_check_range_p, which makes sure
its value argument lies between the upper and lower bounds
of its type argument, which must be a ranged type.
Added the function check_array_index, which range and type
checks an index of an array.
Added the function value_multi_subscript, which computes
array[idx1,idx2...idxN], given a value array and an array
of values representing indicies.
values.c Changed value_from_long to work with TYPE_CODE_CHAR and
unpack_long to work with TYPE_CODE_BOOL and
Wed Jun 19 18:04:08 EDT 1991
symtab.c Stored pervasive types in a structure and make
lookup_pervasive_type() a lookup function that was based
on working_lang. If lookup_pervasive_type() returned
non-zero, then that value was returned (a fix, since
before it simply wouldn't return the pervasive type.)
language.h Added the macro CAST_IS_CONVERSION, which evaluates to
non-zero if the language specified by working_lang means
"conversion" when it says "cast".
valops.c Added the function value_real_cast(), which performs a
value.h *cast*, not a *conversion*, which is what value_cast()
does when it can. In particular,
value_cast(<float_type>,4) = 4.0, while
value_real_cast(<float_type>,4) = some mess.
eval.c Modula-2 builtin functions implemented: ABS, CAP, CHR,
parser-code.c FLOAT, HIGH, MAX, MIN, ODD, ORD, TRUNC, and VAL.
expression.h Added macros MAX_OF_TYPE and MIN_OF_TYPE to work with MAX
and MIN on integral types. *NOTE*: These are currently
hardcoded to work only if there are 8 bits per storage
unit. FIXME.
eval.c Made logical functions call value_bool to return a
properly typed boolean value, based on working_lang.
Thu Jun 20 11:55:27 EDT 1991
valprint.c Types now print out in a Modula-2 fashion. This works for
the cases when the type is printed out step-by-step, that
is, it doesn't work when the name of a structured type
(which includes the keyword "struct", etc.) is simply
FIXME: Perhaps this is bad. Parts of it seem to kludgey,
since type specifications in C and Modula-2 are very
different. The C printing of a type is very recursive,
whereas in Modula-2 it is generally very simple. C has
type prefixes and suffixes, which have no real analogue in
Modula-2. Maybe type_print() should call a language
specific type printer. This is also advantageous if we
compile GDB to exclude some of the languages. We'll just
leave those functions out.
Thu Jun 20 16:57:10 EDT 1991
dbxread.c When reading the complete symbol table in (via
psymtab_to_symtab()), the number and types of function
arguments are added to a function type. define_symbol()
calls add_param_to_type() to accomplish this.
Assumption: when we come across a function definition
(N_FUN symbol with an 'f' or 'F' in the name), its
arguments will appear before another function definition.
When a function is found, a pointer to its type is placed
in the global in_function_type. Changes that
add_param_to_type() makes are to this global.
valprint.c The type of a function now includes (for Modula-2) the
types of its parameters.
eval.c Type checking and a check for the proper number of
arguments is now done for function calls. Not sure of the
impact this has on C++ member function yet.
Thu Jun 20 19:58:48 EDT 1991
valprint.c Rewrote the type printer. Broke it into two language
specific parts, adding the functions type_print_m2() and
An unfortunate consequence is this: if you debugging a C
program in Modula-2 mode (why?), info types does not work
well with regular expressions, since the types are printed
out in Modula-2 terminology, but stored in C terminology.
language.[ch] Added the functions new_type_last(), type_keyword(), and
type_sep() to aid in the printing of typedefs.
symtab.c Made the printing of typedefs as language independent as
possible through calls to new_type_last(), type_keyword(),
and type_sep().
Fri Jun 21 11:50:26 EDT 1991
dbxread.c Check all incoming ennumerated types. If it looks like
Modula-2's BOOLEAN type, then change the type_code of the
type to TYPE_CODE_BOOL so we can process it as a boolean
valprint.c Replaced some of the 0x%x with calls to sprintf and
hexformat() in val_print().
language.[ch] Added the function hex_to_string(), which converts its
integral argument to a hexadecimal number (format is
language based) and returns the result as a string.
Mon Jun 24 12:25:07 EDT 1991
valprint.c Some functions call type_print_1() directly, instead of
value.h using type_print(), so they can specify where (column) to
print things. Since type_print() takes care of language
dependence, that needs to be called first. Added a
parameter depth to type_print() (so it is now like
type_print_1). Changed type_print to type_print_at, and
made type_print a macro that passes a depth argument of
symmisc.c Changed all calls to type_print_1 to calls to
Makefile.dist Made it possible to build GDB for a specific set of
depend languages. Do this by passing a definition for the macro
LANGS to make. LANGS should be a string containing a
space-separated list of language names (ie. LANGS="c m2").
The default is to build all languages. Note that grammar
files must follow the naming convention of <lang>-exp.y.
gdb.lang This holds the current value of the LANGS macro. It is
examined every time make is called, and is updated if
eval.c Added #ifdef _LANG_<lang> to these files.
expread.c Still need to add them to dbxread.c and coffread.c.
Mon Jun 24 16:33:11 EDT 1991
language.[ch] Added the functions hexformat_pre() and
hex_to_string_pre(), which take a prefix argument to
include in the format string. Thus, hexformat_pre("08") will
return "0x08x" (if the working language is language_c).
Made hexformat() and hex_to_string() calls to the above
with "" as the prefix argument.
am29k-pinsn.c, arm-pinsn.c, breakpoint.c, convex-tdep.c, exec.c, core.c,
dbxread.c, i386-pinsn.c, i386-stub.c, i386-xdep.c, i960-pinsn.c,
infcmd.c, inflow.c, m68k-pinsn.c, m68k-stub.c, m88k-pinsn.c,
mips-pinsn.c, mips-tdep.c, ns32k-pinsn.c, printcmd.c, pyr-pinsn.c,
pyr-tdep.c, pyr-xdep.c, remote-vx.c, remote.c, solib.c, source.c,
stack.c, sun386-xdep.c, symfile.c, symm-xdep.c, symmisc.c, tahoe-pinsn.c,
valprint.c, vax-pinsn.c
Changed all occurences of 0x%[0-9]*l*x in printf format strings to
calls to hexformat() and hex_to_string(). Format strings without
the leading "0x" were ignored.
depend Updated to take the above into account.
Tue Jun 25 15:27:18 EDT 1991
symtab.h Added the types range_mode_t, range_check_t, type_mode_t,
and type_check_t to keep track of the current state of
range and type checking.
main.c Added the variables range_mode, range_check, type_mode,
and type_check to record the current state of range and
type checking. Added initialization code to main().
language.h Changed the macros STRICT_TYPE and RANGE_CHECK to examine
the above variables.
Tue Jun 25 17:57:08 EDT 1991
dbxread.c process_one_symbol() updates the variable (enum language)
source_lang based on the extension of the filename
contained in the N_SO sybmol that started this symtab.
When end_symtab() is called, the value of source_lang is
put into the language field.
stack.c select_frame() sets working_lang (and possibly type_check
and range_check) to the language field of the symtab
associated with the frame that is selected if working_mode
is language_auto. If working_mode is language_manual, a
warning is printed and working_lang is not set.
language.c Added the function set_type_range(), which sets the value of
type_check and range_check (if their modes call for
automatic setting) based on the current value of
working_lang. A non-zero argument will cause the current
settings to be output.
Wed Jun 26 14:51:40 EDT 1991
eval.c Added range checks on assignment.
m2-exp.y Added the grammar for sets to the language. Currently,
these do not do anything except print an error message.
Wed Jun 26 17:01:04 EDT 1991
m2-exp.y Added the ability for parse_number() to parse negative
numbers. A global flag is set upon encountering a unary
minus. This was done to make, for example, 1 parse as a
CARDINAL, and not as an integer, per Wirth's examples in
Programming in Modula-2 ed.4.
valprint.c Added support for "set radix 2" by then setting
output_format to 't'.
eval.c Implemented range checking on subrange types. Added calls
to range_check_range_p for BINOP_ASSIGN and BINOP_VAL.
Implemented MIN and MAX for ennumerated types. The
minimum value of an ennumerated type is defined by Wirth
as the first identifier, and the maximum as the last.
m2-exp.y Made octal numbers ending with "B" be characters and those
ending with "C" be numbers, per Wirth's book. (p. 34)
Thu Jun 27 14:11:52 EDT 1991
stack.c select_frame() now only sets working_lang, it does not
notify the user. If working_mode is language_manual, then
a warning is issued once.
main.c At the end of each call to execute_command(), working_lang
is checked against the local static (enum language)
current. If they differ and working_mode is
language_auto, the new settings of language, type and
range checking are printed out.
stack.c Modified frame_info() to include the language of the
current frame in the output of "info frame".
language.[ch] Added the function language_str() which returns the name
of the current language.
Fri Jun 28 15:33:14 EDT 1991
m2-exp.y Added the built-in procedures INC, INCL, DEC, and DECL to
the language. INCL and DECL currently cause an error,
since sets are not implemented yet. INC and DEC are
implemented as PREINCREMENT/PREDECREMENT with one
argument, and as ASSIGN_MODIFY with two arguments.
eval.c Added type checking to the above cases.
value.h Added not_lval_constant to the lval_type ennumerated type.
not_lval_constant means that the value is a constant
value; that is 3 or 'a' or TRUE, not as in a constant
identifier. This is used to help coerce numbers such as 3
to either signed or unsigned numbers.
valops.c Added the function value_coerce_constants() which coerces
constant integers as following: if one is a constant and
the other is not, the constant's type is set to the type
of the other argument. If both are constants and one is
signed, the other is converted to a signed constant.
Sat Jun 29 17:26:29 EDT 1991
valarith.c Added a better range checker. It now checks range
(successfully) on integral operations [+-] (signed and
unsigned) for any C sized type. Still does not work well
for multiplication.)
int_in_size() returns an integer that is coerced to fit into
specified number of bytes.
Mon Jul 1 13:04:14 EDT 1991
language.[ch] Added the function binop_result_type(), which returns the
builtin (struct type *) type that would be the result of a
binop on the two values V1 and V2.
Wed Jul 3 19:22:53 EDT 1991
source.c Extended source_info() to include the source language in
the output from "info source".
Fri Jul 5 13:48:52 EDT 1991
utils.c Moved the support functions for the GDB set/show commands
dealing with language into language.c.
language.c Added the function language_info(), which displays info
about the current working language, type and range check
settings. Called via the GDB command "info language".
Added an initialization routine _initialize_language(),
that sets defaults for the language, type and range
variables and sets up the new GDB commands.
main.c Language setup moved to language.c.
depend Rebuilt.
Mon Jul 8 10:10:22 EDT 1991
valarith.c Debugged the range checker for arithmetic. Still does not
work for multiplication very well.
Mon Jul 8 12:40:37 EDT 1991
language.[ch] Added the function value_true() which returns non-zero if
its argument represents a boolean true value.
breakpoint.c Changed breakpoint_cond_eval() to call value_true() to
check the truth of an expression.
Thu Jul 11 12:51:34 EDT 1991
language.[ch] Added the predicate structured_type(), which returns
non-zero if the argument is a structured type.
Added the predicate pointer_type(), which returns non-zero
if the argument is a pointer type.
eval.c Added the ability to do addition and substraction on
pointers and integers. This case simply bypasses the
type checker.
Thu Jul 11 14:41:42 EDT 1991
Added the symbol N_DEFD (0x4a) which is a definition
module dependency that is used by the GNU Modula-2
compiler and the linker. It is not important to GDB,
except that [dbx|coff|mips]read.c should ignore these
Fri Jul 12 16:07:00 EDT 1991
valprint.c Changed the TYPE_LENGTH(type) >= 0 to TYPE_LENGTH(type) >
0 in val_print(). Also added statements to the else part
to coerce type (argument to val_print) to a pointer type
if it is an "array of unspecified length".
valops.c Added the function value_m2_string(), which returns a
(value) value which is a constant string, whose type is
(ARRAY [0..n] OF CHAR). The length field of the type
structure is set to zero, so it will be interpreted as an
"array of unspecified length".
stack.c Moved the language/frame mismatch check to
main.c The working language is recorded each time
execute_command() is executed. If working lang has
changed during its execution, then the new
language/type/range info is printed out for the user. If
the working language does not match the language of the
frame, a warning is issued.
Sat Jul 13 16:16:39 EDT 1991
eval.c Moved all the type-checking stuff for operators to
language.[ch] language.c. This is so we can keep language-specific
stuff (like for what type operators are defined) in
language.[ch] Added the function binop_type_check(), which checks to see
if its two (value) arguments are type-compatible with its
opcode argument. The opcode should represent an operation
involving an operator. Also added the macro function
unop_type_check, which calls binop_type_check with a
NULL second argument.
expprint.c Added Modula-2 operators to the op_print_tab, so info
expression.h break works correctly. Also added "op_string", which
returns the string corresponding to the (enum exp_opcode)
opcode that is its argument.
Sat Jul 13 18:26:18 EDT 1991
coffread.c Added code to record the type of function arguments with
each paricular function. Code is very similar to that
added to dbxread.c.
dbxread.c Moved add_param_to_type() to symtab.c
symtab.[ch] Added function add_param_to_type() from dbxread.c
*** NOTE: The above additions have not been tested.
Mon Jul 15 12:50:47 EDT 1991
langauge.[ch] Added the functions type_error and range_error, which work
like error() except if the type/range mode is set to
*_mode_warn, then they do not do a return_to_top_level(),
but merely print a warning.
Also changed [set|show]_[type|range]_command() to support
the new "warn" feature.
Thu Jul 18 17:50:54 EDT 1991
mipsread.c Added code to record the type of function arguments with
each particular function. Code is very similar to that
added to dbxread.c.
*** NOTE: The above additions have not been tested.
Fri Jul 19 11:19:10 EDT 1991
defs.h Added macros MAX_OF_SIZE, MIN_OF_SIZE, UMAX_OF_SIZE, and
UMIN_OF_SIZE, which when given a size of a numeric type,
return the maximum and minimum value it can hold. UMAX...
and UMIN... return the result for unsigned types.
symtab.h Added the macros MAX_OF_TYPE and MIN_OF_TYPE to operate on
struct types. They call above macros.
dbxread.c Renamed the MAX and MIN_OF_TYPE macros to ..._OF_CTYPE to
avoid a name conlict with the above.
c-exp.y Added range checking on numeric constants in
parse_number() for completeness.
valarith.c Made binop_user_defined_p() and unop_user_defined_p()
return 0 if working_lang is not language_c.
Thu Aug 8 14:17:22 EDT 1991
breakpoint.c Documentation strings of some commands changed to
eliminate the references to the C language where
Tue Aug 13 15:48:03 EDT 1991
m2-exp.y Added qualified identifiers to the grammar. The semantics
are slightly different from those of the GDB operator ::
m2-exp.y Added a rule to each grammar of the form: start ::= exp |
type_exp, where type_exp is any valid type expression.
eval.c Added the opcode OP_TYPE, and an error case in eval.c.
printcmd.c Modified ptype_command() so it actually parses the input
(necessary for type expressions with scope qualifiers).
Added the function ptype_eval() which expects an
expression composed of one OP_TYPE element.
*.[ch] Replaced all occurences of parse_c_expression with
*.[ch] Replaced all occurences of parse_c_1 with parse_exp_1
[End of ChangeLog entries from Andrew Beers for Modula-2 support.]
Mon Sep 16 17:19:46 1991 John Gilmore (gnu at
Small fixes from Peter Schauer:
* infrun.c (child_attach): Lint.
* solib.c (find_solib): Handle shared libs version 2.
Small fixes from David Wood:
* xm-ultra3.h (SYS_SIGLIST_MISSING): Typo.
Small fixes:
* remote-vx.c: Move <stdio.h> to top, for FILE. Fix from
John S <>.
* utils.c (wrap_here): Avoid wrap action of fputs_filtered if
chars_per_line is at maximum (user typed `set width 0'). Fix
from Andreas Schwab <>.
Tue Sep 17 17:31:04 1991 Stu Grossman (grossman at
* coredep.c: include ptrace.h where necessary.
* mipsread.c(parse_lines): fix unsigned char problem that was
messing up line numbers on SGI's and possibly other MIPS based
* infrun.c (child_create_inferior): use better test to check
return val from setpgrp().
* tm-irix3.h, xm-irix3.h, tconfig/irix3, xconfig/irix3: add these
for sgi/irix support.
Wed Sep 18 04:33:31 1991 Per Bothner (bothner at
* mipsread.c (parse_symbol): Put non-static procedures
in the global block.
Fri Sep 13 00:14:52 1991 John Gilmore (gnu at
Patch together `text_start' and `text_end' for 29K port.
* exec.c (exec_command): If NEED_TEXT_START_END, define the
variables and set them based on the exec file.
* am29k-tdep.c: declare text_start.
* valops.c (call_function_by_hand): declare text_end.
* inferior.h: Eliminate CANNOT_EXECUTE_STACK in favor of
because machines that do this will also have to know to
set NEED_TEXT_START_END. Besides, it was a redundant way to
say the same thing.
* tm-29k.h, tm-convex.h, tm-np1.h: Eliminate
Thu Sep 12 00:22:24 1991 John Gilmore (gnu at
AMD 29000 changes from David Wood <>:
* (CLIBS): Put XM_CLIBS and TM_CLIBS at end.
Pass MUNCH_DEFINE to munch whenever we run it.
* am29k-pinsn.c (print_insn): Handle NOP specially. Avoid %#x
format string; use 0x%x instead.
* am29k-tdep.c: Use DUMMY_SAVE_GREGS and RETURN_REGNUM.
* ultra-xdep.c, xm-ultra.h: New files for Ultracomputer host system.
* xm-rtbsd.h: New host support for RT/PC running BSD Unix.
* inflow.c: Handle `short' process group IDs.
* infptrace.c (fetch_register): Support CANNOT_FETCH_REGISTER,
and check for ptrace errors.
* coffread.c (SDB_REG_TO_REGNUM): Define if not already.
(coff_symfile_init): Initialize text_bfd_scnum.
(read_coff_symtab): Use it to find the text [and absolute?] sections.
* ../config.sub: Add vendor nyu and os "sym[1-9]*".
* Add hosts rtpc-*-* and a29k-*-*.
Merge target arm case with other "easy" cases. Add target
cases a29k-*-none (rehack of am29k), a29k-*-kern (remote to
Ultracomputer kernel), and a29k-*-sym1 (ultracomputer OS's user
* minimon.h, remote-adapt.c, remote-mm.c: Add.
* munch: Cope with RT/PC putting fns in data segment.
Restore ability to override `nm' by specifying MUNCH_NM.
* xconfig/rtbsd, xconfig/ultra3: New host systems.
* tconfig/a29k: Rename from tconfig/am29k. Add remote-mm
and remote-adapt. Remove encapsulated coff #define's (the
support should go in BFD, and gdb shouldn't know or care).
* tconfig/a29k-kern: Same, but for remote kernel debugging.
* tconfig/ultra3: For debugging user processes on Ultra3/Sym1.
* tm-29k.h: Update BADMAG (though it should go away).
Allow the register definitions to be overridden in another
tm-file. Fix SR_REGNUM. Add a mess of _REGNUM's. Separate
DUMMY_SAVE_GR96, for handling kernel calling conventions
that use GR64+ rather than GR96+.
* tm-ultra3.h: New file, for use on Ultra3 Unix as well as for
remote debugging of Ultra3 kernel. Includes tm-29k.h and
overrides various things.
* remote-mm.c (mm_attach, mm_wait): Handle attach like
child_attach does, making a clean stop in the newly attached
* remote-eb.c: Lint.
* coffread.c: Make coffread independent of any particular
variant of COFF. Avoid #include-ing any particular one except
internalcoff.h. BFD now passes key values for symbol reading
as part of its coff_data structure (LINESZ, SYMESZ, AUXESZ,
and the symbol masks and shifts); use them.
Remove obsolete end_of_text_addr.
* exec.c: Remove unused include files.
Wed Sep 11 19:38:44 1991 John Gilmore (gnu at
* (documentation targets): Pass $(M4).
Bugfix from (Paul Eggert).
* stack.c (down_silently_command): Check for stack existence.
Tue Sep 10 23:08:29 1991 John Gilmore (gnu at
* (VERSION): Update to 4.0.3.
Tue Sep 10 09:19:29 1991 John Gilmore (gnu at
* core.c (core_file_command): Print frame at coredump with
its level number, by calling print_stack_frame.
* frame.h: Add selected_frame_level, print_stack_frame.
* frame.h, stack.c: Remove print_sel_frame, print_selected_frame.
* convex-tdep.c, convex-xdep.c, infcmd.c, inflow.c, infrun.c:
Change print_sel_frame and print_selected_frame callers to
* dbxread.c (read_ofile_symtab): Avoid empty else clause.
* symfile.c (free_named_symtabs): Ditto.
* main.c (main): wrap_here needs an arg.
* solib.c (find_solib): Avoid memory access if _DYNAMIC is zero.
(solib_add): Avoid noise.
(solib_create_inferior_hook): Lint.
(sharedlibrary_command): Move dont_repeat to here.
* utils.c (error): Call wrap_here to force buffered output.
Small patches from Peter Schauer:
* coffread.c (start_symtab): Free any existing line_vector before
malloc-ing new one.
(read_coff_symtab): Ditto for type_vector.
* source.c (lines_to_list): New variable, replacing function.
(all uses): Use as variable.
(_initialize_source): Add 'set listsize' and 'show listsize'.
* utils.c (lines_to_list): Remove function.
* stack.c (print_frame_info): Use as variable.
* defs.h (lines_to_list): Remove declaration.
Mon Sep 9 13:45:57 1991 John Gilmore (gnu at
* breakpoint.c (insert_breakpoints): Restore warning about
the program might be running in another process, but only for
systems with this brain death (#ifdef ONE_PROCESS_WRITETEXT).
* xm-hp300bsd.h, xm-mips.h, xm-vax.h: Define it.
* utils.c (error): if error_pre_print is set, print the string
* 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.
* (VERSION): Set to 4.0.2.
Thu Sep 5 23:49:48 1991 John Gilmore (gnu at
* .gdbinit: Remove useless "rr" command. Set complaints
to 1 for people debugging gdb.
* breakpoint.c, remote-vx.c: Reword strings printed by
catch_errors callers.
Wed Sep 4 11:07:50 1991 John Gilmore (gnu at
* WHATS.NEW: "history write -> history save". Doc "write on/off".
(Fix from
Fix some infrastructure to be able to cope with host and target
machines with different sized basic types (ints, ptrs, etc).
(Idea from (Pierre Willard).)
* values.c (value_from_longest): Rename from value_from_long.
Handle pointer types as well as integers, so that targets with
different pointer sizes from the host can be accomodated.
* breakpoint.c, convex-tdep.c, eval.c, expprint.c, printcmd.c,
valarith.c, valops.c, valprint.c, value.h, values.c: Rename
uses of value_from_long to value_from_longest.
* eval.c, findvar.c, printcmd.c, valarith.c, valops.c: Pass
the correct pointer type to value_from_long{est}.
* doc/gdb.texinfo ($_, $__): Describe types of these variables.
* remote-vx.c: Remove obsolete code for calling functions via
vxworks kludge interface (it referenced value_from_long).
* valops.c (value_string): Find malloc with lookup_misc_func, not
raw search.
Tue Sep 3 18:37:46 1991 John Gilmore (gnu at
Make writing to files work properly. (Fixes to BFD are also needed.)
* 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 <>.
* 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 <>.)
* utils.c (fputs_demangled): Avoid duplicate printing if
demangling is off. (Fix from J.T. Conklin <>.)
* infrun.c (proceed): Cast -1 to (CORE_ADDR) before comparing.
(Fix from (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.
Wed Aug 28 18:18:05 1991 John Gilmore (gnu at
* Update VERSION to 4.0.1. Evade GNU Make bug
by adding .NOEXPORT target.
Fri Aug 23 17:14:25 1991 John Gilmore (gnu at
* GDB-4.0 release!
* Update README.
* (VERSION): Roll to 4.0.
(gdb.tar.Z): Make as well, for shipment.
Fri Aug 23 14:07:09 1991 Roland H. Pesch (pesch at
* doc/gdb.texinfo: minor rewordings, crossref to ptype from print,
more on printsyms.
* doc/Makefile, generate "gdb-all.texi" rather than
* doc/rdl-apps.texi: renamed from rdl-apps.texinfo
*, doc/Makefile, doc/gdb.texinfo:
reflect above name change
* WHATS.NEW: correct pointer to refcard.
* doc/gdb.texinfo: update New Features, Installing
* doc/gdbint.texinfo: add short description of configure +template
Fri Aug 23 11:46:08 1991 Roland H. Pesch (pesch at
* doc/gdb.texinfo: update, fix bugs in "Installing" appendix
Fri Aug 23 01:02:00 1991 John Gilmore (gnu at
* Add config.sub, make doc/rdl-apps.texinfo for
tar file, add dependencies for referenced doc files.
Thu Aug 22 22:17:06 1991 Stu Grossman (grossman at
* coffread.c, symfile.c, stack.c: saberized.
Thu Aug 22 16:20:27 1991 Roland H. Pesch (pesch at
* doc/refcard.tex: permuted Essential Commands sec
* doc/gdb.texinfo: new C++ chapter; revised installation appendix;
new doc for
set/show symbol-reloading
default set complaints 0
info all-registers
RET-repeat disabled after prompted long displays
processID (attach) interpretation of 2nd GDB cmdline arg
Thu Aug 22 14:05:47 1991 Stu Grossman (grossman at
* expread.y, coffread.c, dbxread.c, target.c, mem-break.c,
cplus-dem.c, values.c, valprint.c, symfile.c, remote.c,
breakpoint.c, main.c: lint.
Thu Aug 22 02:02:26 1991 John Gilmore (gnu at
Install new configuration scheme for GDB and friends.
* config.sub: Translate ordinary names to three-part names.
* configure: Use three-part names internally.
* Translate three-part names to filenames.
* README, WHATS.NEW: Update for gdb-4.0.
* Roll VERSION to 3.99.
Wed Aug 21 18:21:09 1991 John Gilmore (gnu at
* infptrace.c (KERNEL_U_ADDR_BSD): Include a.out.gnu.h.
* i960-tdep.c, m68k-tdep.c, sparc-tdep.c, tm-i960.h,
tm-m68k.h, remote-nindy.c: Change ext_format_XXX structs
to single structures rather than arrays; when passing
their address, use &. This avoids trouble with bdead compilers.
* mcheck.c: Don't include <stdlib.h>; just declare "void abort();"
instead. This avoids portability headaches.
* mips-tdep.c (mips_do_registers_info): Only print FP regs if
asked to.
* source.c (open_source_file): Avoid ANSI const bdeath by
skipping declaration and then casting result value.
* tm-hp300bsd.h: Clarify comment.
* utils.c (strstr): Result is const char *; ANSI bdeath.
* xm-hp300bsd.h: Define HOST_BYTE_ORDER. Redefine INT_MIN,
since system include file defines it differently from "defs.h",
though the two are equivalent for our purposes.
* tconfig/hp300bsd: Add m68k-tdep.o.
Tue Aug 20 16:01:11 1991 John Gilmore (gnu at
* tconfig/sun*4: Remove warnings about system assembler.
Mon Aug 19 13:44:46 1991 John Gilmore (gnu at
* mcheck.c: Avoid warning about undeclared abort fn.
* tm-sparc.h (PC_ADJUST): Avoid calling error() from this;
it causes recursive calls to error() when used in cleanups.
To do so requires that we make it a function, so we do.
* sparc-tdep.c (sparc_pc_adjust): New implem of PC_ADJUST.
* utils.c (do_cleanups): Remove the current cleanup from the
chain *before* calling it, in case error() is called from it.
The result won't be pretty, but won't be an infinite loop either.
Mon Aug 19 00:41:04 1991 Michael Tiemann (tiemann at
* dbxread.c (read_struct_type): Grok anon structs for C++.
(vb_name, vptr_name): Null terminate these strings.
Fri Aug 16 08:31:03 1991 John Gilmore (gnu at
Minor bug fixes from BSD Net2 gdb:
* blockframe.c (get_prev_frame_info): If FRAME_CHAIN_COMBINE
returns 0, there is no previous frame.
* breakpoint.c (commands_command): If !from_tty, don't call
* dbxread.c (record_misc_function): Speed up slightly.
(compare_psymbols): Ditto.
* infcmd.c (do_registers_info): Take a second argument to
determine whether to print float registers. "info registers"
does not do so anymore. "info all-registers" does, now.
* mips-tdep.c, pyr-tdep.c (xxx_do_registers_info): Take second
arg and ignore it.
* tm-mips.h, tm-pyr.h (DO_REGISTERS_INFO): Pass second arg.
* inflow.c (initialize_inflow): Set tflags_ours correctly.
Other fixes:
* breakpoint.c (bpstat_do_actions): Use a cleanup to restore
executing_breakpoint_commands if we are interrupted by error.
* coffread.c (init_lineno): Avoid problem with zero-sized linetab
versus malloc/free. From: (John Carey).
* core.c (solib_add_stub, core_open): Call SOLIB_ADD inside a
catch_errors() so we can setup the frame regardless of whether
the shared libs work.
* ieee-float.c (double_to_ieee_extended): Get exponent from
right place in little-endian systems. From John Carey.
Thu Aug 15 18:43:57 1991 John Gilmore (gnu at
* main.c: Remove unused terminating_signals and catch_termination().
(long_options): Terminate with a zero element.
[Bugfix from Atsuo Kawaguchi <>.]
(gdb_readline): Make call-compatible with readline.
(init_signals): Improve comments re vfork vs. signal.
* utils.c (prompt_for_continue): Use new gdb_readline().
If we prompt for continuation, we don't let CR repeat the previous
command, once we get back to a prompt. It's too easy to keep
hitting CR, expecting "--more--" prompts, and have some long
command start repeating on you.
Tue Aug 13 16:17:56 1991 John Gilmore (gnu at
* blockframe.c (frameless_look_for_prologue): Speed up by
calling SKIP_PROLOGUE_FRAMELESS_P if it's defined.
Define two variants, one faster.
* sparc-tdep.c (sparc_frame_chain): Use target_read_memory
and return zero, rather than giving an error.
(setup_arbitrary_frame): Initialize the PC in the new frame.
(skip_prologue): Add a second arg saying whether we're just
checking for a frameless function or not.
* core.c (core_open, core_close, core_xfer_memory): Move
section table pointers and bfd* into the target_ops.
(core_open): Allow errors in shared lib reading, etc.
(core_files_info): Describe shared library sections.
* exec.c (exec_open, exec_close, exec_xfer_memory, xfer_memory,
exec_files_info, set_section_command): Move section table
pointers and bfd* into the target_ops.
(add_to_section_table): Add BFD to section table.
* target.c (target_xfer_memory, target_info): Pass target to
xfer_memory and target_info functions.
* target.h: ''
* gdbcore.h: Move struct section_table.
* target.h: New home of struct section_table.
* solib.c (solib_add): New argument is the target_ops whose
section list is to be added to, if any. Reallocate the
sections in that target to add any that come from shared libs.
(throughout) so_sections renamed to sections.
(solib_xfer_memory): Deleted.
* tm-sunos.h (SOLIB_ADD): Add target argument.
* core.c, exec.c, inftarg.c, remote-eb.c, remote-nindy.c,
remote-vx.c, remote.c, target.c, target.h: Remove add_syms vector
from target_ops. It's the same on all targets. Add two section
pointers to target_ops.
* stack.c (find_relative_frame): Dump ancient algorithm for
"down", just use handy "next" pointers.
(frame_command): Don't error if there is no stack; let user
set one.
* inflow.c (new_tty_prefork, new_tty): New prefork routine
modifies static state in the parent process; new_tty itself
runs in the child and modifies the child's file descriptors
to match the saved static state.
* infrun.c (child_create_inferior): Call new_tty_prefork,
fork, then new_tty.
* infptrace.c (child_xfer_memory): Add ignored target arg.
* remote-eb.c (eb_xfer_inferior_memory): ''
* remote-nindy.c (nindy_xfer_inferior_memory): ''
* remote-vx.c (vx_xfer_memory): ''
* remote.c (remote_xfer_memory): ''. Rename from
* main.c (main): Only try to attach "corefile" argument if
it starts with a digit.
* symfile.c (symbol_reloading): New "set/show" variable.
(symbol_file_add): Shorten message about symbol reading.
(add_symbol_file_command): Merge with add_syms_addr_command,
since this should work on all targets now.
(stop_whining): Default to zero, to shut up complaints
about bad symbol tables on many systems.
(free_named_symtabs): Just exit unless symbol_reloading.
* xm-sun3os4.h, xm-sun4os4.h: Define BROKEN_LARGE_ALLOCA,
and add comment explaining shared library screw.
* source.c: #if defined => #ifdef.
Thu Aug 8 12:23:19 1991 John Gilmore (gnu at
* doc/gdbint.texinfo: Improve doc on porting to new OS's.
Tue Aug 6 17:16:15 1991 Roland H. Pesch (pesch at
* doc/rdl-apps.texinfo: provide default readline-appendix finder
(doc/Makefile knows how to make one for local config)
* use doc/Makefile for doc targets
* doc/Makefile: GDB documentation now has its own Makefile
doc/refcard.tex: renamed from "gdbrc.tex"
doc/gdbint.texinfo: add markup in "Cleanups" chapter
Fri Aug 2 00:13:06 1991 John Gilmore (gnu at
* values.c (baseclass_addr): When reading target memory, use the
length of the basetype, not the upper type. We've only malloc'd
enough space for the basetype, leading to errors in free().
* expprint.c (print_subexp): Print UNOP_MEMVAL of an OP_LONG that
ends up as a function specially, since we know the actual type of
the pointed-to address. This (somewhat) fixes display of
expressions that include misc_function_vector names. Try `cond 1
!strcmp("a","b")' then `i b'.
* infrun.c: Move DO_DEFERRED_STORES from proceed() to resume().
The child can be proceeded from inside wait_for_inferior in
evaluating breakpoint conditions, and DO_DEFERRED_STORES was
getting skipped in that case.
* expprint.c (print_subexp): Use filtered output, since the
subroutines we call use it, otherwise the output is horribly
mangled, since output of wrappable stuff comes out late.
* Bump VERSION to 3.98.1
* infrun.c (child_create_process): Use execlp to find the
shell to exec our target program. This requires some fiddling
with `environ' since there is no execlpe().
Thu Aug 1 15:35:17 1991 Roland H. Pesch (pesch at
*, doc/gdbrc.tex, doc/rc-* (new files):
Minor rearrangement of refcard permits two new make targets--
gdbrc.dvi DVI output for refcard, using CM fonts PostScript refcard, using PS fonts
Wed Jul 31 16:46:21 1991 John Gilmore (gnu at
* GDB-3.98 release.
* TODO, Projects, WHATS.NEW, README: Update for gdb-3.98.
* (gdb-all.texinfo): Avoid touching file if M4 dies.
Wed Jul 31 16:35:58 1991 Roland H. Pesch (pesch at
* doc/gdb.texinfo: last changes for release.
Minor typo and formatting fixes; incorporated most fixes remaining from
filed mail commenting on earlier drafts.
Added warnings: pipes don't work in run command;
conditions are converse of assertions;
step over fn without debug info goes to next fn;
vars may have "wrong" values near fn entrance, exit
Added example from Kingston on printing repeated nonadjacent values
Added explicit mention that in Emacs gdb mode C-c and C-z are like
shell mode for signals
Renamed "Stepping and Continuing" to "Continuing and Stepping" so it
doesn't sound so much like its parent "Stopping and Continuing"; also
moved entries on continue to top of section, so they don't get lost.
Improved installation directions in appendix, added manual formatting
Tue Jul 30 17:26:39 1991 John Gilmore (gnu at
* Remove xm.h and tm.h even if we aren't linking
new ones, so "./configure sun4; ./configure none" does the right
thing. Assume that alldeps.mak and depend are already built in
srcdir, and avoid running "make" (particularly "make depend",
which involves "gcc") from inside configure. Build Makefile
directly rather than building Makefile.conf first.
* configure: Regenerate with above changes.
* Use $(BISON) to find bison. Roll VERSION
to 3.98. Revise gdb.tar.Z procedure to produce a file
called gdb-$(VERSION).tar.Z but which unpacks into a
directory called "gdb". Move non-source files out of
$(SFILES_SUBDIR). Pretty up alldeps.mak with comments.
(depend): Don't try to do "gcc expread.y".
(expread.o): Update dependencies by hand.
Mon Jul 29 15:21:09 1991 Roland H. Pesch (pesch at
* doc/gdb.texinfo:
Fixed a variety of small typos that prevented info from formatting
cleanly; altered too-long heading for GPL Appendix, as discussed
w/RMS; Changed date on cover to July 91.
Fri Jul 26 13:20:02 1991 Roland H. Pesch (pesch at
* doc/gdb.texinfo:
(1) Applied some fixes due to comments from Larry Breed (easier ones
through chapsec 5.2)
(2) Eliminated use of @footnote---had my doubts about it anyways, and
it's broken in latest texinfo
(3) Introduced *some* use of [] for optional arguments, where
explanation is not simpler by listing cmd w arg and cmd w/out arg
separately. Still not using @deffn.
(4) Dropped in GPL-2. NOTE: one of GPL-2 or texinfo is broken; a
couple of headings are too long. Need patches to texinfo or revision
to GPL-2.
* Partial update to README (which still needs work for this
release!): (1) use of configure corrected for new script,
(2) "make gdb.dvi" and "make" mentioned.
Wed Jul 24 06:44:02 1991 John Gilmore (gnu at
* symtab.c (lookup_symbol): Don't complain right off about
no debug symbols; use the misc function vector first.
(list_symbols): Use misc function vector to find symbols
that don't have debug info, and print them.
(find_pc_symtab): Temporarily avoid fatal() when psymtab
PC range doesn't match symtab PC range, as it does on the
MIPS because our symtab reading isn't perfect.
* dbxread.c (dbx_symfile_read): Make warning about
"no debug symbols" slightly nicer.
* source.c (select_source_symtab): If "main" symbol exists,
but decode_line_spec can't find line info, don't just return
a zero; try other source symtabs or give an error.
* mipsread.c (parse_partial_symbols): Sort the psymtabs by
their low addresses first, then rip through fixing high addrs.
* ns32k-opcode.h (sfsr): Bugfix from Rune Nerg}rd,
(NS32K_SVC_IMMED_OPERANDS): Reverse the #ifndef.
Tue Jul 23 18:52:43 1991 Roland H. Pesch (pesch at
* Minor, mostly mechanical, cleanup of doc subdir for clean
makeinfo'ing and TeXing; also ensured gdb-all.texinfo (post-m4)
and (post- texinfo2 makeinfo) generated for distribution.
Sun Jul 21 03:54:52 1991 John Gilmore (gnu at
Mostly MIPS and general symbol-reading fixups.
* doc/gdbint.texinfo: Add documentation on symbol-reading
* mipsread.c: Remove kludges around #include "ecoff.h".
Remove redefinitions of a_magic, etc, no longer used.
(parse_symbol, ): Convert "Internal:" printfs to complain()ts.
Fix global overview comments to match symfile.c protocol.
(mipscoff_new_init): Eliminate cur_hdr if we have one.
(mipscoff_symfile_read): Eliminate unused code. Avoid
sorting all the symtabs, when all we have read here is psymtabs.
The symtabs are sorted as they are created anyway. Tell
condense_misc_bunches whether we're mainline.
(psymtab_to_symtab_1): Pass filename when recursing, to make
stack trace more informative.
(parse_partial_symbols): Assume cur_hdr as argument.
(read_mips_symtab): Don't clobber cur_hdr, so it can be freed.
Pass cur_hdr implicitly to parse_partial_symbols. Avoid checking
the TYPE_NAME of char *, since that's done in symfile.c.
(free_numargs, parse_symbol, add_symbol, add_block,
shrink_linetable): Declare these fns void.
(upgrade_type): Convert tree of if's to switch. Clean up
bogus "off == 0" handling with a complaint. Avoid setting
field bitpos and bitsize of array with lower and upper bounds.
Check specified bitsize of elements against their actual type's
bitsize, and complain if different. Complain about unknown
type qualifiers.
(parse_fdr): Don't assume sizeof(char *) == sizeof (struct *).
(psymtab_to_symtab_1): Print names of subsidiary files that
are being read in. FIXME, we read far too many files. This code
is not the problem, the problem is in parse_fdr where the psymtabs
are set up.
(cross_ref): Result should indicate that we used one aux entry
normally, or two if we encountered a "next" entry. This used
to leave the caller pointing at the wrong aux entry.
(add_symbol): If overflowed cur_block, reallocate it larger,
chase all pointers to it, and complain(), rather than clobber memory.
(shrink_block): Use xrealloc rather than xmalloc-and-copy.
(new_field): Only allocate one field initially, not two.
Pull ++ out of macro argument. Simplify.
(_initialize_mipsread): Avoid initialization of importd
global_psymbols and static_psymbols.
* symfile.c (psymtab_to_symtab): Depend on XXX_psymtab_to_symtab
to properly set pst->symtab; avoid searching for it.
(symfile_fns): Improve comments, add a FIXME.
* dbxread.c: Update comments to reflect symfile protocol.
(read_ofile_symtab, end_symtab): Return the symtab.
(psymtab_to_symtab_1): Set pst->symtab.
* coffread.c (coff_symfile_read): tell condense_misc_bunches
whether we're mainline.
* symfile.h (sym_fns): Remove unused sym_discard member.
* coffread.c, mipsread.c, dbxread.c: Remove XXX_symfile_discard.
* mtrace.c (mtrace): Take effect if mallwatch is set, even if
the environment variable is not.
* infcmd.c (finish_command): Use filtered printfs.
* cplus-dem.c: Add struct tags to a few unnamed structs.
* valops.c (value_coerce_array): Improve comments.
* valprint.c (type_print_varspec_suffix): Print array size only
if greater than zero.
* m88k-tdep.c: Shift some lines left by one space, that had
apparently been trashed at some point.
* TODO: More things to do, a few got done.
Thu Jul 18 22:46:05 1991 John Gilmore (gnu at
* symtab.h (LOC_EXTERNAL): Eliminate in favor of LOC_STATIC.
(ldsymoff, ldsymlen, globals_offset, statics_offset): Improve
* dbxread.c (read_dbx_symtab): LOC_EXTERNAL -> LOC_STATIC.
* expread.y, findvar.c, symmisc.c: Ditto.
* printcmd.c (address_info): Update printed forms of LOC_
symbols. Elim LOC_EXTERNAL.
(print_frame_args): Keep track of param stack offsets before
re-looking up to find the local register param is kept in.
* mipsread.c: Use <symconst.h> and <sym.h> rather than <syms.h>.
Further integration of mipsread into gdb. Eliminate unused
routines, duplicate declarations. Handle static symbols in
psymtabs as well as external symbols. When reading symtabs,
insert symbols into the correct block (global, static, or a local
(read_mips_symtab, parse_partial_symbols): Don't pass useless
"incremental" arg.
(mipscoff_symfile_read): Don't call select_source_symtab.
(parse_symbol): Use SYMBOL_VALUE_ADDRESS where appropriate,
rather than SYMBOL_VALUE.
(parse_external): Comment clobbering of top_stack.
(parse_partial_symbols): Update comments. Allocate and parse
static symbols as well as external symbols. FIXME, enum values
are not handled in this pass, but should be. Inline new_psymbol.
(psymtab_to_symtab_1): Read symbols into global static block
by default (until enter some function's local block context).
(sort_blocks): Clean up STATIC_BLOCK as well as GLOBAL_BLOCK.
(destroy_all_symtabs, new_psymbol): Eliminate, unused.
* source.c (select_source_symtab): Select a source symtab
from either the symtabs or, failing that, the psymtabs.
(list_command): Update error message.
(forward_search_command, reverse_search_command): Use getc, not
fgetc, for speed. FIXME, add comment about buffers that die if
overrun by long line.
* values.c (unpack_field_as_long, modify_field): Avoid shifting
by an entire word, which is not portable, if we have a 32-bit
field. (Code in dbxread.c already turns such bitfields, if
aligned, into ordinary ints, but fixing this will help for other
symbol formats and for future changes.)
* core.c (core_open): Handle ANSI const brain death.
* utils.c (vprintf): Fix varargs typo.
Sun Jul 14 00:42:53 1991 John Gilmore (gnu at
* findvar.c (find_var_value): Handle &function better.
* TODO: Document work needed on &fn and &array.
* printcmd.c (print_address_symbolic): New arg is the prefix
to print if a name is printed.
(print_address_demangle): Honor "set print address" now.
Use new arg above to improve spacing of output.
* valprint.c (val_print): When printing function pointers,
print symbolic form too.
* breakpoint.c (breakpoint_1): Use new print_address_symbolic.
Mon Jul 8 19:02:46 1991 John Gilmore (gnu at
* core.c (memory_error): Reword error msg to mislead less.
* mips-pinsn.c (print_insn_arg 'd'): Print $ with reg name.
* mipsread.c (read_mips_symtab, read_the_mips_symtab,
parse_partial_symbols): Use newer BFD internals (external_filehdr
and external_aouthdr), byte-swap the fields that we care about
before using them, and make the file header data local to
read_the_mips_symtab rather than global.
Sat Jul 6 01:34:15 1991 John Gilmore (gnu at
* ns32k-opcode.h (movmw, movmd): Fix opcodes. Bug fix
from Rune Nerg}rd <> on 5 Jul 1991.
* main.c (command_line_input): Flush stdout and stderr
before every call to readline. This reportedly fixes a bug
that comes up in Sys V running emacs-gdb and/or xxgdb,
when stdin/out are pipes or sockets.
Thu Jul 4 14:47:06 1991 John Gilmore (gnu at
*, Avoid rebuilding "depend" as much.
Avoid declaring Makefile dependencies, because GNU Make stupidly
tries to update it if we do.
* coffread.c: Revise for minor changes to bfd internal coff
* configure: If -template= is given a relative path, make it
absolute before recurring in subdirectories.
* configure,, Install "configure" script
as replacement for config.gdb.
* config.gdb, Makefile.dist, Makefile.sdir: Remove
* README: Update for configure, mostly. FIXME.
* Add dec3100 as equivalent to littlemips. Indicate in all host &
target config files that they are for the host. When the lines
get copied into the Makefile, this makes it more obvious what's
Mon Jun 24 23:49:07 1991 John Gilmore (gnu at
* sparc-opcode.h (trap opcodes): Avoid leading spaces or
tabs, which end up in the disassembler output inadvertently.
Wed May 29 23:01:03 1991 John Gilmore (gnu at
Make it compile cleanly in an ANSI GCC2 environment.
* blockframe.c: <stdio.h>
* cplus-dem.c: free takes a void *, ifdef __STDC__
* dbxread.c (read_huge_number): avoid gcc2 bug hoisting calc of
* defs.h (alloca): Avoid doing anything if alloca already def'd.
* stddef.h, stdlib.h: Remove these files.
* symtab.c: Avoid declaring qsort, close.
* symfile.c: Avoid declaring close.
* utils.c (vprintf): Declare "ap" arg as proper va_alist.
* sparc-tdep.c: Avoid including lots of Sun-host-specific files.
Assorted other changes.
* dbxread.c: include "libaout.h", not "liba.out.h".
* printcmd.c (print_frame_args): Set recurse properly for
indentation of struct and array parameters.
* valops.c (value_cast): Allow cast to void.
* infrun.c (resume): If NO_SINGLE_STEP, call machine dependent
single_step() in a target-independent fashion.
* sparc-tdep.c (single_step): Don't call ptrace ourselves, just
set up to be ready to continue. This makes us target independent.
* infptrace.c (child_resume): Remove call to single_step; now
can single step a SPARC target of any kind.
Wed May 22 18:18:24 1991 Roland H. Pesch (pesch at
* Makefile.dist, doc/gdb.texinfo, doc/*-m4.texinfo: split up GDB
docn into separate sections---basically chapters, plus two loose
pieces that can be configured to go in different places. This
allows GNU m4 to preprocess the manual without coredumping.
* Makefile.dist: tell TeX where to find texinfo.
Mon May 20 12:15:04 1991 Roland H. Pesch (pesch at
* Makefile.dist, doc/gdb.texinfo: respectively create, and use,
the new target "rdl-apps.texinfo" which captures the Makefile
variable that records where to find the Readline libraries.
Sun May 19 05:36:59 1991 John Gilmore (gnu at
* tahoe-pinsn.c: #include "tahoe-opcode.h", not "opcode.h".
* tm-tahoe.h (FIX_CALL_DUMMY): Ignore more parameters.
* defs.h (const, volatile): Only define if not already defined.
* Makefile.dist (gdb.tar.Z): Create doc subdir w/out CVS/RCS crud.
* README: Update for release 3.95.
* config.gdb: Don't create readline dir in subdir builds.
* main.c: Include with "..." form for non-system include files,
so "gcc -MM" for "make depend" works.
Include readline files with "...h" rather than <readline/...h>.
* mipsread.c: Include "ecoff.h" rather than "intel-coff.h".
* coffread.c: Undo minor damage done by Rich Pixley. Use
different internal and external representations of COFF
data structures. Use new BFD routines for swapping them in and
* symfile.c (free_named_symtabs): Avoid freeing file names that
are null or empty. Old i960 tools seem to produce files that
claim to have empty names, causing each successive file read
to blow away the previous one.
* sparc-xdep.c (deferred_stores): Repair minor damage by Rich.
Move deferred_stores to top of file, but don't separate its
#define's from its variable. Add commentary.
* Makefile.dist: Fix Rich damage; undo "configure" changes in
favor of keeping the (working) config.gdb. Move readline
library up a notch.
Fri May 17 12:49:56 1991 Per Bothner (via gnu at
* dbxread.c (read_struct_type): Try to handle g++ version 1 MI
debug info.
* infptrace.c (fetch_registers): no result, since now void.
* tconfig/news: target depends on m68k-tdep too.
Fri May 17 14:40:14 1991 Roland H. Pesch (pesch at
* Makefile.dist: added readline/inc-*.texinfo to dependencies for
gdb.dvi target
* readline/inc-history.texinfo, readline/inc-readline.texinfo:
applied various small fixes due to or inspired by RMS comments
* doc/gdb.texinfo: finished using all RMS comments, save those for
appendices on readline and cmd history (which are in other source
Thu May 16 18:06:05 1991 Roland H. Pesch (pesch at
* doc/gdb.texinfo: (1) Updated w/ref to RMS comments through
chapter 9; (2) documented 'break' command's menu mode for
overloaded names, in response to hgs problem report C++ p-31
Wed May 15 11:02:48 1991 Roland H. Pesch (pesch at
* doc/gdb.texinfo: (1) better introductory example; (2) more
consistent use of @code, @samp, @file, @kbd throughout; small
cleanups to first three nodes; (3) new "Contributors" node;
(4) Appendix, Renamed Commands; (5) divert specialized startup
instructions to "Targets" chapter for generic manuals, while
leaving them up front for manuals specific to specialized
environments; (6) apply fixes from RMS comments through chapter 4.
* pretex.m4: modify explanatory text slightly (and redefine
"regexp") to keep GNU m4 from complaining. (It still crashes
later, but one step at a time...)
Wed May 15 10:32:12 1991 John Gilmore (gnu at
* readline/readline.c (update_line): Avoid dereferencing a pointer
before comparing it to its bounds. Saber caught this.
(init_terminal_io): Don't set BC from the "pc=" termcap variable,
and only set PC if tgetstr returned non-null. Saber caught this.
Tue May 14 16:29:53 PDT 1991 Roland Pesch (pesch at
* Makefile.dist: put gdb.dvi stuff (updated to use M4 preprocessor
stuff for config manual) here where it counts; updated
to use new subdir structure (gdb/doc/).
* Makefile: generated from above via
config.gdb none
before checkin
* gdbint.texinfo: added instructions on generating* files
locally for release. These are ordinary info
files, formatted from gdb.texinfo (via gdb-all.texinfo, see
Makefile)---but due to use of texinfo 2, can't count on makeinfo
to generate these, so we distribute them already formatted.
* gdb.texinfo: included full Info node and menu crud (as generated
by C-u M-x texinfo-master-menu using the texinfo-2 elisp code).
* Makefile: updated "gdb.dvi" target to use M4 preprocessor;
put in comments-for-future target (one day makeinfo will
work again).
Tue May 14 13:51:36 PDT 1991 Roland Pesch (pesch at
* gdb.texinfo: Updated to include new or old undocumented
commands, at least the following (perhaps some others I forgot to
record): info f, info float, info path, info program, info s, info
set, info source, info terminal, info types, info user, set/show
print object.
Also covered all recent GDB command renames for v4.
Mon May 13 14:57:46 1991 John Gilmore (gnu at
* mipsread.c: Rather than keeping count of how many symtabs
and psymtabs we have, for sorting purposes, count them when
we need to sort. This fixes bug in rereading of symbol tables.
Fri May 10 15:43:33 PDT 1991 Roland Pesch (pesch at
* infcmd.c: renamed "info path" to "show paths"
* gdbrc.tex: documented above.
Wed May 8 04:51:11 1991 John Gilmore (gnu at
* remote.c: Fix comments.
* utils.c (error): Force out any pending wrap output.
Sat May 4 11:11:07 1991 John Gilmore (gnu at
* Makefile.dist: Roll VERSION to 3.95.
Fix up "saber_gdb" to work again.
* saber.suppress: Update.
* coffread.c, exec.c, infptrace.c, inftarg.c, remote.c, solib.c,
symtab.h, target.c, target.h: Lint.
* core.c: setup and select frame after reading shared libs,
else reading shared libs will clobber them. Lint.
* utils.c (error): Force out any buffered wrap text.
Fri May 3 22:01:56 1991 John Gilmore (gnu at
* remote.c: Remove decls of memory_insert_breakpoint
and memory_remove_breakpoint, no longer used. (Suggestion of
Jan Norden).
* Makefile.dist: use ${subdir} in paths of BFD and LIBIBERTY,
to make it easier to interface to "configure"'d libraries.
Fri May 3 13:10:01 PDT 1991 Roland Pesch (pesch at
* valprint.c: introduce "set p", "set pr", "show p" and "show pr" as
aliases for set/show print.
Thu May 2 11:22:02 1991 Jim Kingdon (kingdon at
* coffread.c (coff_sym_fns) [TDESC]: Make the type be m88kbcs.
* m88k-tdep.c (IEEE_isNAN): New function.
* infrun.c, m88k-tdep.c, m88k-xdep.c: Change
initialize_{tdesc,dcontext} to init_{tdesc,dcontext}.
* infrun.c [TDESC]: Add a bunch of crud.
* xm-88k.h [__GNUC__]: Don't define memset.
* m88k-xdep.c: #if 0 out push_breakpoint.
* tm-88k.h: Define GET_SAVED_REGISTER.
* tm-88k.h: Define DGUX.
* m88k-opcode.h (UEXT, SEXT, MAKE): Put parentheses around arguments.
* m88k-pinsn.c (sprint_address): Declare at top of file.
* m88k-xdep.c: #if 0 out core_file_command.
* values.c ({unpack_,value_as_}pointer): Just call
{unpack_,value_as_}long (for now anyway).
* m88k-tdep.c (get_saved_register): Make get_reg a dc_word_t (*)().
(psr_register): Change return type to dc_word_t.
* m88k-tdep.c (tdesc_read_function): Comment out call to ptrace.
* m88k-tdep.c (get_saved_register): Add lvalp parameter.
* gdbcore.h (write_memory): Don't prototype it.
* tm-88k.h, m88k-tdep.c: Make stack_error, stack_jmp global.
m88k-xdep.c: Don't mention stack_error.
* {x,t}config/m88k ({X,T}DEPFILES): Add missing files.
* mtrace.c: Don't typedef things like size_t, just #define them.
* coffread.c [TDESC]: #if 0 out references to coffsyn.
* symtab.h (struct symtab): Include EXTRA_SYMTAB_INFO.
tm-88k.h: Define EXTRA_SYMTAB_INFO.
* coffread.c [TDESC]: Include "tdesc.h" and make tdesc_handle
dc_dcontext_t not int.
* coffread.c [TDESC]: Use system include files not <intel-coff.h>.
* coffread.c [TDESC]: Move setting of debug_info from
coff_symfile_read to find_linenos and make it work with BFD.
* cplus-dem.c [__STDC__]: Make x{m,re}alloc return void*.
* signame.c: Cast const char* to char* when assigning to sys_siglist.
* utils.c (strsave): Make arg const char* not char*.
* infrun.c (wait_for_inferior) [SHIFT_INSN_REGS]: Use
bpstat_explains_signal (stop_bpstat) not stop_breakpoint.
* tm-88k.h (START_INFERIOR_HOOK): Make tdesc_handle a dc_handle_t.
* tm-88k.h (EXTRACT_RETURN_VALUE): Use char * not void *.
* findvar.c (read_var_value, case LOC_CONST_BYTES): Put the address
in a char *, not a CORE_ADDR. Use SYMBOL_VALUE_BYTES.
* tm-88k.h (INIT_EXTRA_FRAME_INFO): Use fci not prev (fci is
prev except from create_new_frame). Make next_frame a
local variable.
Declare get_prev_context.
{x,t}m-88k.h: Enclose USG and BCS defines in #if !defined.
m88k-{opcode.h,pinsn.c,xdep.c,tdep.c}: New files (same contents as
before; they had just been left out of the distribution for a long
Thu May 2 17:53:56 1991 John Gilmore (gnu at
Mips bringup and general cleanup
* cplus-dem.c: Move CPLUS_MARKER define to after defs.h.
* infptrace.c (PT_WRITE_D, PT_READ_D): Use correct values.
(This still doesn't seem to make MIPS bkpts work.)
* mipsread.c: Remove dup "Reading symbol data..." msg.
(symbol_file_command, add_file_command): Remove, obsol.
* printcmd.c (ptype_command): Say "an enum" rather than "a enum".
Wrap output appropriately.
* stack.c (locals_info, catch_info, args_info): Check
selected_frame rather than target_has_stack or coredumping.
* valprint.c (type_print_varspec_suffix): Wrap "ptype" output of
enums appropriately.
Wed May 1 14:10:22 1991 Jim Kingdon (kingdon at
* signame.c: Include defs.h and param.h.
* cplus-dem.c: Include defs.h and param.h.
Makefile.dist: Don't hack in the "param.h".
param.h: Don't include defs.h.
* expread.y: Use a union to deal with the fact that type_stack
can have both ints and enum type_pieces in it.
({push,pop}_type_int): New functions.
Tue Apr 30 13:18:58 1991 Jim Kingdon (kingdon at
* cplus-dem.c (cplus_mangle_opname): Don't call error.
values.c (check_stub_method): Call error if NULL return from
* blockframe.c, breakpoint.c, core.c, command.c, findvar.c,
eval.c, expprint.c, infcmd.c, infrun.c, main.c, printcmd.c,
remote.c, source.c, stack.c, dbxread.c, coffread.c, symfile.h,
symfile.c, utils.c, valarith.c, values.c, valops.c, tm-68k.h,
target.c, inftarg.c, ieee-float.c, environ.c, defs.h,
command.h, inferior.h, gdbcore.h, symtab.h, expression.h,
symtab.c, cplus-dem.c, value.h, expread.y, valprint.c,
copying.awk, solib.c, inflow.c, symmisc.c
: Lint. Use read_memory not read_memory_integer on CORE_ADDR's.
Use {value_as,unpack}_pointer (added to values.c)
not {value_as,unpack}_long on CORE_ADDR's.
Use longest_to_int (added to defs.h) instead of cast to int.
Remove from_tty arg to mod_path.
Put symfile_bfd in {coff,dbx}read.c not symfile.h.
Use OP_NULL instead of 0 where dummy enum exp_opcode needed.
* tm-sparc.h: Remove GET_RWINDOW_REG.
(FRAME_CHAIN): Call sparc_frame_chain.
sparc-tdep.c (sparc_frame_chain): New function.
sparc_extract_struct_value_address (added to sparc-tdep.c).
* xm-sun386.h: Don't define SET_STACK_LIMIT_HUGE.
Tue Apr 30 13:13:33 1991 Michael Tiemann (tiemann at
* valprint.c (type_print_base): If the type being printed is a
struct containing undefined types, print "<undefine type>"
as the type instead of crashing.
* values.c (value_headof): Get the vtable pointer taking
TYPE_VPTR_BASETYPE into account.
* symtab.c, symtab.h, dbxread.c: Fix various whitespace splotches.
Mon Apr 29 13:22:51 1991 Jim Kingdon (kingdon at
* Move BROKEN_LARGE_ALLOCA from tm-sun386.h to xm-sun386.h.
* sun386-xdep.c [!GDB_TARGET_IS_SUN386]: Just provide empty
functions which don't do anything.
tm-sun386.h: Define GDB_TARGET_IS_SUN386.
* Makefile.dist: Add comment about tm-sun3os4.h: tm-sun3.h, etc.
* sun3-xdep.c, tm-sun3.h, tm-68k.h: Change TARGET_SUN3 to
* infrun.c: Don't include sys/user.h and friends (wrong for
cross-debugging and not necessary anymore (see IN_SIGTRAMP in
[SET_STACK_LIMIT_HUGE]: Include <sys/{resource,time}.h>.
xm-tahoe.h: Don't define _DIRENT_.
* xm-tahoe.h: Remove USE_OLD_TTY (not needed now that terminal.h
includes sgtty.h before sys/ioctl.h).
Sun Apr 28 22:04:47 1991 Jim Kingdon (kingdon at
* param-no-tm.h: Make BITS_BIG_ENDIAN defined to 0/1, not defined
or not defined. Don't define it based on TARGET_BYTE_ORDER if
it's already defined (in the tm.h file).
mips-opcode.h (BIT_FIELDS_*),
values.c (modify_field, unpack_field_as_long):
{x,t}m-tahoe.h, tahoe-pinsn.c, tahoe-opcode.h: New files.
Fri Apr 26 12:02:06 1991 Jim Kingdon (kingdon at
* tm-sparc.h: Add comments about gcc version 2 and structure passing.
* xconfig/i386v{,32}{,-g}: Add XM_CFLAGS=-Dgetpagesize()=4096.
gmalloc.c: #if 0 out !HAVE_GETPAGESIZE code.
* expread.y (abs_decl): Accept '&' and '&' abs_decl.
* symtab.c, symtab.h: Have a builtin_type_{,unsigned_}long_long
regardless of LONG_LONG.
defs.h (TARGET_LONG_LONG_BIT): New macro.
expread.y (typebase): Add {unsigned,} long long {,int}.
Thu Apr 25 12:31:22 1991 Jim Kingdon (kingdon at
* valops.c (typecmp): If t2 == 0, return 1.
Wed Apr 24 09:45:17 1991 Jim Kingdon (kingdon at
Changes from Tiemann:
* cplus-dem.c (optable): Add "nw", "dl", "compound".
(cplus_mangle_opname): New function.
(do_type): Add case 'Q'.
* values.c (check_stub_method): Do lookup_method_type and stuff
rather than smash_to_method_type.
symtab.c, symtab.h (allocate_stub_method): New function.
dbxread.c (read_type): If we get "##", don't lookup_function_type
and start clobbering it; allocate_stub_method instead.
* printcmd.c (x_command): Dereference references.
* valprint.c (type_print_varspec_prefix, case TYPE_CODE_METHOD):
Don't print " " type_print_base (...) "::" if !passed_a_ptr.
* dbxread.c (read_struct_type): Put "op$" instead of "operator"
in the symbol table.
* values.c (check_stub_method): Deal with operator names.
* valprint.c (cplus_val_print): Check for error in baseclass_addr.
* values.c: Move declaration of cplus_demangle to top of file.
* values.c (baseclass_addr): If can't read memory, set *ERRP
rather than calling error().
* value.h: Remove redundant declaration of value_static_field.
* values.c (value_static_field): Recursively check all baseclasses.
Return NULL if not found.
* values.c, value.h: New functions value_{headof,from_vtable_info}.
* valprint.c (val_print): Print out first element of vtbl
* valprint.c: Move print controls to top and add objectprint.
Add command "set print object on/off".
* valprint.c (value_print, is_vtbl_member): Put things in local
variables rather than continually doing VALUE_TYPE (val), etc.
* valops.c (value_struct_elt_for_address): Call check_stub_method.
* valops.c (value_struct_elt): Remove found, arg1_as_ptr.
* valops.c (search_struct_method): Give error if j > 0 && args == 0.
* valops.c (search_struct_field): New argument looking_for_baseclass.
Give error if value_static_field or value_primitive_field
return NULL.
valops.c (various): Call search_struct_field with extra parameter.
* symtab.c (decode_line_1): Deal with operators specified as
"operator" <optional whitespace> <symbols for operator>.
(operator_chars): Help do it.
* symtab.c (lookup_struct_elt_type): Call check_stub_type.
Take additional argument noerr.
Don't dump core if TYPE_FIELD_NAME is NULL.
Check the baseclasses recursively.
* symfile.c (fill_in_vptr_fieldno): Don't call check_stub_type.
Return void not int. (also declarations in symfile.h and value.h).
Deal with multiple inheritance.
* printcmd.c (print_command_1): Add if (objectprint) code.
* expread.y (variable): Allow for destructor with foo::~name.
* eval.c (evaluate_subexp, case UNOP_LOGNOT): If following opcode
is OP_SCOPE, give an error.
* eval.c (evaluate_subexp): Pass third arg to lookup_struct_elt_type.
* eval.c (evaluate_subexp), values.c (value_virtual_fn_field):
Don't bother to do anything with
return value from fill_in_vptr_fieldno.
* eval.c (evaluate_subexp): If value_static_field returns NULL,
give an error.
* dbxread.c (read_struct_type): Set fcontext to 0 for normal member
* dbxread.c (read_struct_type): Initialize name to 0.
* dbxread.c (read_ofile_symtab, N_CATCH): Add offset to bufp->n_value.
* dbxread.c (dbx_create_type): Zero TYPE_VPTR_BASETYPE.
(read_struct_type): Don't bother to set TYPE_VTPR_{BASETYPE,FIELDNO}
if it's just going to be {0,1}.
* dbxread.c (virtual_context): Use TYPE_BASECLASS starting at 0
(yes, it's #if 0, but just in case...).
* vax-opcode.h, expread.y, expprint.c, cplus-dem.c: Declare some
things "const".
* i386-stub.c: New file.
* WHATS.NEW: Remove mention of readline and more paging (in 3.5).
Try to keep command names up to date with renaming.
* gmalloc.c [!HAVE_GETPAGESIZE]: Try to figure out the pagesize.
* infun.c (resume, resume_cleanups): New functions.
(wait_for_inferior, proceed, child_create_inferior): Use resume
not target_resume.
* remote.c (getpkt): Don't set immediate_quit.
* blockframe.c, frame.h (reinit_frame_cache): New function.
solib.c (solib_add), symfile.c ({,add_}symbol_file_command):
Use it.
Tue Apr 23 10:38:41 1991 Jim Kingdon (kingdon at
* symtab.c (lookup_symbol): Add 3 more of those loops through
the symtabs which we all know and love: (1) Look in the
STATIC_BLOCK for mangled symbols right after we check the blocks,
(2, 3) Look in the STATIC_BLOCK for all the symtabs and psymtabs
at the end.
* main.c (cd_command): Call dont_repeat.
* 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
* dbxread.c (read_struct_type): Fix typo: *pp != '\0' -> **pp != '\0'.
Mon Apr 22 00:02:43 1991 Jim Kingdon (kingdon at
* printcmd.c (print_scalar_formatted): Add 't' for binary.
* dbxread.c (end_psymtab): Initialize pst->symtab.
* core.c (core_open): Call ADD_SOLIB.
* tm-sparc.h: Include <sun4/reg.h> not <machine/reg.h>.
sparc-tdep.c: Don't include <machine/reg.h>.
* sun3-xdep.c [!TARGET_SUN3]: Just provide empty functions which
don't do anything.
* core.c (core_open): Add make_cleanup (unpush_target, &core_ops).
* Shared library/corefile changes from Peter Schauer:
core.c (core_close): Call CLEAR_SOLIB.
(core_open): Remove comment about "should deal with shared lib".
(core_xfer_memory): If we can't xfer the usual way, try the
shared libraries.
solib.c (so_list): New fields so_bfd and so_sections{,_end}.
(find_solib): Use solib_map_sections to get ld_text.
(solib_map_sections, solib_xfer_memory): New functions.
(clear_solib): Free so_sections and close so_bfd.
tm-sunos.h: Add solib_xfer_memory, solib_add.
* sparc-tdep.c (skip_prologue): Don't skip anything unless there
is a "save" instruction in there somewhere.
* symfile.c (symbol_file_add): Add comment.
solib.c (solib_add): Don't malloc name passed to symbol_file_add.
* exec.c (build_section_table): If *start isn't NULL, free it.
* stack.c (parse_frame_specification): Error if NULL selected_frame.
infcmd.c (finish_command): Error if NULL selected_frame.
inflow.c (kill_command): Deal with NULL selected_frame.
stack.c (record_selected_frame): Set *FRAMEP to NULL