Commit graph

853 commits

Author SHA1 Message Date
K. Richard Pixley
050d45c5ea * xcoffexec.c (exec_ops): child_attach and child_create_inferior
replaced with find_default_attach and
	  find_default_create_inferior.
1992-09-25 19:11:25 +00:00
K. Richard Pixley
8afd6ca547 Separate core functions along target vector in preparation for
native support.  Functions above vector now live in core.c.  Those
        below in corelow.c.

	* core.c (solib_add_stub, core_close, core_open, core_detach,
	  get_core_registers, core_files_info, core_ops): moved to corelow.c
	  (_initialize_core): removed addition of core_ops target.
	* corelow.c: new file.
	(solib_add_stub, core_close, core_open, core_detach,
	get_core_registers, core_files_info, core_ops): moved from core.c
	(_initialize_corelow): new function.
	* gdbcore.h (core_open, core_detach): added prototypes.
	(core_ops): add forward declaration.
	* Makefile.in (SFILES_MAINDIR): add core.c
	(OBS): add core.o
	(TSOBS): change core.o to corelow.o
1992-09-25 17:03:55 +00:00
Stu Grossman
cdfab26752 * m68k-tdep.c (m68k_saved_pc_after_call): Use 'GDB_TARGET_IS_SUN3'
instead of 'sun' predefined symbol so that trap analysis code is
enabled only when the TARGET is a sun3.
1992-09-23 18:19:19 +00:00
Ken Raeburn
5e9a7f0077 fix repeated ext_format_i960 local decls so sun4 cc accepts it 1992-09-22 21:55:21 +00:00
John Gilmore
ebeccdf0b8 * mips-pinsn.c (print_insn_arg, case 'B'): Disassemble `break'
instruction's argument.  Patch from jonathan@cs.stanford.edu
(Jonathan Stone).
1992-09-22 07:46:14 +00:00
John Gilmore
5ee4e16ca7 Break the thread of control that implies that a unix child
process will be the default target.

* target.c (find_default_run_target, find_default_attach,
find_default_create_inferior, return_zero):  new functions.
(cleanup_target):  Make return_zero the default for to_can_run.

* exec.c (exec_ops), core.c (core_ops):  Replace child_attach and
child_create_inferior references with find_default_XXX instead.

* target.h (struct target_ops): new field, to_can_run.
(find_default_attach, find_default_create_inferior):  new prototypes.
(target_can_run): new macro.

* Also added a zero (default) to_can_run element to all static
struct target_ops initializations throughout GDB, except:
* inftarg.c (child_ops): Use new child_can_run() to enable child runs.

* infrun.c (child_create_inferior):  Clean up error handling when
no exec file is specified.
(child_attach):  Don't require exec file.
1992-09-22 07:23:35 +00:00
John Gilmore
b28d361723 Remove kill_inferior_fast, in favor of target_kill, which goes
through the target vector.

* inferior.h (kill_inferior_fast): remove declaration.

* main.c (disconnect): call quit_cover using catch_errors rather
than calling kill_inferior_fast directly.  New way goes through
the target vector, handles attached processes, and writes
command history if appropriate.
(quit_cover): new function, wrapper for quit_command.

* convex-xdep.c, go32-xdep.c, hppabsd-xdep.c, hppahpux-xdep.c,
infptrace.c, procfs.c:  Removed all instances of kill_inferior_fast,
inlining them into the local kill_inferior when needed.
1992-09-22 05:23:57 +00:00
John Gilmore
6b50c5c242 * infrun.c (_initialize_infrun): Alias i handle' == i signals'.
* stabsread.c (read_struct_type): Simplify complicated expression
for dumb DECstation compiler.
1992-09-22 02:33:11 +00:00
Ian Lance Taylor
8f61b5e451 Patches from WRS:
Mon Sep 21 14:54:35 1992  Ian Lance Taylor  (ian@cygnus.com)

	* m68k-pinsn (print_insn_arg, fetch_arg): added support for
	operands to memory management instructions, from WRS.
1992-09-21 22:36:04 +00:00
Fred Fish
538280d81e * main.c (main): Back out previous language setting changes.
Replace with simple default to C before processing any init
	files.  There MUST be a language set, even in the absence of
	init files or executables, or expression parsing fails.
1992-09-20 15:45:52 +00:00
Fred Fish
d75710b02c * main.c (main): Move code that sets initial language to
symfile.c.  Fixup places where command files are processed to
	be consistent in setting a default language if none has been
	previously set.
	* symfile.c (set_initial_language):  Add code moved from
	main() that sets an initial default language when a new
	symbol file is read.
	* symfile.c (symbol_file_command):  Call set_initial_language.
	* symtab.c (find_main_psymtab):  Add FIXME comment.
1992-09-19 16:55:34 +00:00
John Gilmore
5f1c39efa2 * rs6000-tdep.c (push_dummy_frame, pop_dummy_frame): replace
calls to {fetch|store}_inferior_registers with calls to
target_{fetch|store}_registers, for remote-target independence.
1992-09-19 12:08:23 +00:00
John Gilmore
f7fe7196c2 * configure.in: removed target_dependent line.
* remote-mm.c (mm_attach): change printf to error to prevent
fallthrough bug.
* remote-udi.c (udi_attach): change printf to error to prevent
fallthrough bug.
1992-09-19 11:55:20 +00:00
John Gilmore
45413b27d2 comment changes 1992-09-19 11:47:19 +00:00
John Gilmore
dd9da95a1a Left out ChangeLog, oops 1992-09-19 11:45:20 +00:00
John Gilmore
d40309c72a * Makefile.in, configure.in: add support for files used only when
configured native, that is, when host == target.
1992-09-19 11:09:01 +00:00
John Gilmore
a4afec9ade * tm-sparc.h, xm-sparc.h: externs and macros relating to deferred
stores are target dependent and were moved from xm to tm.
1992-09-19 10:56:01 +00:00
John Gilmore
8c0950668f * Makefile.in (gdb-all.texi): Build in objdir, not $srcdir. 1992-09-19 10:47:09 +00:00
John Gilmore
2e384b3b50 * config/decstation.mh: Add MMALLOC_LIB and MMALLOC_DISABLE
overrides, to avoid problem in xdr_bytes with malloc(0) => 0.
1992-09-19 10:21:04 +00:00
John Gilmore
dcc8abceed * target.h (struct target_ops): removed to_convert_to_virtual and
to_convert_from_virtual elements.  Initializations removed from
all static initializations.
(target_convert_to_virtual, target_convert_from_virtual):
removed.
(host_convert_to_virtual, host_convert_from_virtual):  Removed
forward declarations.
* target.c (cleanup_target): removed default assignments for
to_convert_to_virtual and to_convert_from_virtual.
* inftarg.c (host_convert_to_virtual, host_convert_from_virtual):
removed.
* findvar.c (value_of_register, value_from_register):
target_convert_to_virtual inlined.
* infcmd.c (do_registers_info):  target_convert_to_virtual inlined.
* valops.c (value_assign):  target_convert_from_virtual inlined.
1992-09-18 09:53:47 +00:00
John Gilmore
c35475f9be * main.c (gdb_readline): Avoid printf_filtered, which sets char
position wrong if used for the prompt.
* utils.c (puts_filtered):  Comment:  NOT a puts() replacement!
1992-09-18 09:21:44 +00:00
John Gilmore
2886f8b253 Support for accessing arbitrary MIPS stack frames in memory.
* blockframe.c (get_prev_frame_info):  If INIT_FRAME_PC_FIRST is
set, run it before INIT_EXTRA_FRAME_INFO.
* stack.c (frame_info):  If PRINT_EXTRA_FRAME_INFO defined, call it.

* mips-tdep.c (init_extra_frame_info): Only clobber the `frame'
(FP) value in the frame_info struct if it is zero (as from top of
execution stack).
(setup_arbitrary_frame):  Implement FRAME_SPECIFICATION_DYADIC.

* mips-xdep.c (fetch_inferior_registers):  ZERO_REGNUM always
comes back as zero.  So does FP_REGNUM, as a trigger for
init_extra_frame_info.

* tm-mips.h (INIT_FRAME_PC_FIRST):  Kludge, FIXME, defined to get
the program counter set before INIT_EXTRA_FRAME_INFO is run.
(INIT_FRAME_PC):  Defined to null.
(PRINT_EXTRA_FRAME_INFO): print frame pointer location via symtab.
(FRAME_SPECIFICATION_DYADIC):  Ask for two args in frame command.
Briefly explain MIPS stacks in GDB.
1992-09-18 09:20:15 +00:00
John Gilmore
6bb40269a0 * tm-rs6000.h (AIX_BUGGY_PTRACE_CALL): Zap, we think we fixed it.
Rich and I believe the "real problem" was that both single_step
and target_resume were issuing PT_CONTINUE calls.  This would
cause the second PT_CONTINUE to sometimes fail because the process
was already running.
* infptrace.c (child_resume):  Remove AIX_BUGGY_PTRACE_CALL kludge.
1992-09-18 08:09:25 +00:00
John Gilmore
997cc2c0a3 Preliminary cleanup for splitting host/native/target.
* infptrace.c (child_resume):  Don't deal with NO_SINGLE_STEP
here; it is dealt with at a gdb-target-independent level.
* rs6000-tdep.c (single_step):  Don't call ptrace, we are a
high toned routine.  Fix return type to void.
1992-09-18 07:40:15 +00:00
John Gilmore
22473f727a * Makefile.in (update-depend, update-alldeps): Split out of
setup-to-dist, for convenience in rebuilding the depend and
alldeps.mak files.
(assorted):  Update to catch straggler files when building gdb.tar.Z
1992-09-18 07:06:38 +00:00
John Gilmore
cb1d36fc73 * copying.awk, copying.c (show_copying_command,
show_warranty_command):  Rename from copying_info, warranty_info,
to match command function conventions.
1992-09-17 11:02:44 +00:00
John Gilmore
d974236f80 * utils.c (prompt_for_continue): Reinitialize more-counts
before printing anything, and again afterward.  Fix comments.
(vfprintf_filtered):  Eliminate static buffer; use auto buffer,
or alloca() if needed.

* rs6000-xdep.c:  Use correct conditional (IBM6000_TARGET) to
detect native versus cross-host.
1992-09-17 10:58:53 +00:00
Stu Grossman
f499253491 * m68k-tdep.c (sun3_saved_pc_after_call): Only do trap check for
Suns.  Rename to m68k_saved_pc_after_call.
* tm-68k-noun.h, tm-sun3.h (SAVED_PC_AFTER_CALL):  Use
m68k_saved... instead of sun3_saved...
1992-09-17 05:01:51 +00:00
Stu Grossman
0055617716 * energize.c (pty_to_kernel): Must check for EAGAIN as
termination condition.
(full_filename):  Don't prepend dirname if filename begins with /.
(breakpoint_notify, kernel_dispatch):  Deal with DynamicLoad
messages properly!!
(getpty (NCR)):  Lotsa bug fixes...
(kernel_dispatch (case StopRType)):  Use kill() instead of
killpg() so we can deal with losing systems...
(wait_for_events):  Work around NCR select() lossage.  It doesn't
zero out readfds when select() returns zero.
(energize_initialize):  Use I_SETSIG to get SIGIO interrupts.  Use
getcwd() instead of getwd() (NCR getwd() seg faults).
(energize_wait):  Use sigaction() for NCR.  Their version of signal()
is unreliable by default.
1992-09-15 07:12:52 +00:00
Stu Grossman
34da36088e * procfs.c (proc_wait): Call print_sys_errmsg() if we get an
error from PIOCSWSTOP.
1992-09-15 06:42:19 +00:00
Stu Grossman
a8e033f2a2 * breakpoint.c, core.c, exec.c, language.c, main.c, printcmd.c,
symfile.c, target.c, valprint.c:  Use _filtered form of *printf.
defs.h, utils.c:  Make vfprintf_filtered global.
1992-09-15 06:27:18 +00:00
Stu Grossman
b36e3a9b49 Oops! Retract last change. Didn't mean to pollute things with energize just
yet!
1992-09-15 05:11:52 +00:00
Stu Grossman
3e3b0eb9d9 * utils.c (query): Remove test for energize from top. Now
handled in input_from_terminal_p().
1992-09-15 05:04:08 +00:00
Stu Grossman
5ca812d4fe * energize.c (send_location): New routine to consolidate all
places where we must notify kernel of where the given pc is.
(cplus_demangle):  Put single-quotes around demangled names.
(energize_call_command):  Call send_location() after doing up,
down, and frame commands.
1992-09-15 04:50:46 +00:00
Roland Pesch
d1d1ab12ab ...plus c'est la meme chose. 1992-09-12 05:28:20 +00:00
Roland Pesch
549ff1003e *** empty log message *** 1992-09-12 01:29:46 +00:00
John Gilmore
57a9bb5fb4 * mipsread.c: Clean up some white space.
(parse_symbol):  Handle stEnd of stFile.
(parse_partial_symbols):  Remove old #if 0'd code.  Handle stLocal.
1992-09-11 11:18:30 +00:00
John Gilmore
3de61d8c53 * xm-mips.h (KERNEL_U_ADDR): Get from <machine/param.h>.
(REGISTER_U_ADDR):  Fix up for Ultrix 4.2.
* tm-tahoe.h, xm-tahoe.h (KERNEL_U_ADDR):  Move macro to xm-tahoe.h.
* stack.c (_initialize_stack):  "dow" should be a valid abbreviation
for "down".  Suggested by Richard Stallman.
1992-09-11 09:11:11 +00:00
Ken Raeburn
73386fffdb from p3: remote-vx.c: hide name realloc for inclusion of rpc/rpc.h 1992-09-10 19:48:53 +00:00
John Gilmore
4ddd278ffa * i386-stub.c, sparc-stub.c (getpacket): Actually check checksums.
* m68k-stub.c:  Remove a few extraneous ANSI-isms.
* remote-nindy.c (nindy_prepare_to_store):  Only fetch regs if
they aren't already there.
* remote-vx.c (vx_prepare_to_store):  Ditto.
* xcoffread.c:  Surround forward struct defns with #ifdef __STDC__.
1992-09-10 19:18:05 +00:00
John Gilmore
2640f7e138 Removed a large number of changes inserted by Per Bothner
for C++ support.  These will go back in when they've been
examined.
1992-09-10 00:07:06 +00:00
Stu Grossman
ed3f6049b4 * serial.h: Fix prototye for serial_raw().
* ser-bsd.c, ser-termios.c:  Fix args for serial_open() &
serial_write() to match prototypes.
* remote-st2000.c (get_reg_name):  Make *p be const.
1992-09-09 04:09:56 +00:00
Ken Raeburn
120f867e06 nindy bug fixes (function types) and opcode library inclusion 1992-09-08 22:57:22 +00:00
Stu Grossman
a090e7063a * a68v-xdep.c (store_inferior_registers): declare as void.
* infptrace.c:  HP/Apollos have ptrace.h in the wrong place.
* remote-st2000.c:  Massive changes to use new serial package.
Also added 'connect' command to transparantly connect to serial
port.
* ser-termios.c:  Big cleanup, use nicer coding conventions.
* ser-bsd.c:  New module, serial stuff for BSD systems.
* serial.h:  Define struct ttystate properly using HAVE_TERMIO.
* xm-apollo68b.h:  #define PTRACE_IN_WRONG_PLACE...
1992-09-08 22:51:31 +00:00
Roland Pesch
4468ccfb4b changes, what else? 1992-09-05 02:04:57 +00:00
K. Richard Pixley
8005788cd1 tab completion optimization 1992-09-04 21:03:18 +00:00
Per Bothner
35fcebce93 A ton of changes to improve C++ debugging. See ChangeLog. 1992-09-04 07:37:18 +00:00
Stu Grossman
6c7e40b4ab * a68v-xdep.c (store_inferior_registers): Define as type void.
* configure.in:  Add host m68k-apollo*-bsd*.
* demangle.c (struct demanglers):  Use enum instead of constant
value to keep braindamaged HP/Apollo compiler happy.
1992-09-03 16:26:03 +00:00
Per Bothner
546014f750 * utils.c (strcmp_iw): Add a hack to allow "FOO(ARGS)" to
match "FOO".  This allows 'break Foo' to work when Foo is
	a mangled C++ function.  (See comment before function.)
1992-09-03 05:03:47 +00:00
John Gilmore
82eabd43a8 * config/rs6000.mh (MH_CFLAGS): Circumvent IBM <rpc/rpc.h> bug,
for files in vx-share/*.c.
* xm-rs6000.h (fd_set):  Circumvent the rs6000.mh circumvention,
for normal GDB source files.
1992-09-03 00:55:04 +00:00
John Gilmore
6d7bfa9a44 Roll VERSION to 4.6.6. 1992-09-02 20:53:39 +00:00
John Gilmore
6131a42a8d * tm-vx68.h, tm-es1800.h: Use tm-68k.h rather than tm-sun3.h.
* tm-sun3.h:  Remove STACK_END_ADDR, no longer used.
* tm-sun3os4.h:  Update comments.
* xm-delta88.h:  Remove STACK_END_ADDR.
1992-09-02 20:50:31 +00:00
John Gilmore
6aef3bdeb6 Roll VERSION to 4.6.5 for the P3 release. 1992-09-02 08:54:04 +00:00
John Gilmore
b52373a2b1 * ser-termios.c, ser-go32.c: Remove DEFUN crap, clean up.
* serial.h (EXFUN):  Remove all uses, convert to PARAMS.
* config/sun4os4.mh:  Include ser-termios.o.  FIXME, all .mh files
should include a ser-XXX.o module.

* dbxread.c (elfstab_build_psymtabs):  Remove DEFUN crap.
* defs.h, i960-pinsn.c, remote-hms.c:  Replace CONST with simple const.

* configure.in:  Map unrecognized sun 68k's, sun sparcs, into
known suns in configure.in, rather than mapping them to unique
config files that happen to duplicate other config files.
* config/sun3.{mh,mt}:  Remove (use identical sun3os4.*).
* config/sun4.{mh,mt}:  Remove (use identical sun4os4.*).
1992-09-02 08:51:17 +00:00
John Gilmore
ebb3a1e550 * configure.in (*-*-sunos*): Use trailing * to match all
sub-variants of SunOS, e.g. sunos4* to match sunos4.1.1.
(sparc-*-sunos3):  Remove host & target.  Sunos3 never shipped
in production on Sun-4.
({a29k,i[34]86,i960}-*-elf):  Add targets, equivalent to coff.
(m68k-*-{aout,coff,elf}):  Add targets, w/new config and tm files.
(sparc-*-{aout,coff,elf}):  Add targets, w/new config and tm files.

* tm-68k-un.h, tm-68k-noun.h, tm-spc-un.h, tm-spc-noun.h:  New
target definitions for embedded with and without underlines on
identifiers.  FIXME -- this ought to be known by BFD instead.

* tm-sparc.h, tm-sun2.h, tm-sun3.h:  Delete NAMES_HAVE_UNDERSCORE:
not a parameter of the CPU, but of the development environment.
* tm-es1800.h, tm-sunos.h, tm-vx68.h:  Add NAMES_HAVE_UNDERSCORE.
1992-09-02 08:03:42 +00:00
John Gilmore
ea678717a4 * breakpoint.c (breakpoint_re_set): Avoid setting source symtab
(which involves reading in main's symtab) if we have no breakpoints.
1992-09-02 02:31:52 +00:00
Ian Lance Taylor
b68b44fac8 Brought forward from p3:
Sun Aug 30 21:32:17 1992  Ian Lance Taylor  (ian@cygnus.com)

	* Makefile.in: map "gdb" through program_transform_name when
	installing.
1992-09-01 01:16:25 +00:00
Fred Fish
95ff889ecd * dwarfread.c (cu_language): New local variable to record
language for current compilation unit being processed.
	* dwarfread.c (set_cu_language):  New local function to decode
	and record language for current compilation unit being processed.
	* dwarfread.c (synthesize_typedef):  Add local function to
	synthesize a typedef for C++ classes, structs, unions, and
	enumerations.
	* dwarfread.c (read_structure_scope):  Synthesize typedefs
	for C++ classes, structs and unions.
	* dwarfread.c (read_enumeration):  Synthesize typedefs for
	C++ enumerations.
	* dwarfread.c (read_file_scope):   Call set_cu_language to
	record language for current compilation unit.  After symtab
	is built, save this recorded language.
	* dwarfread.c (process_dies, add_partial_symbol, struct_type,
	scan_partial_symbols, new_symbol):  Recognize TAG_class_type.
	* dwarfread.c (add_partial_symbol):  Synthesize partial symbol
	typedefs for C++ classes, structs, unions, and enumerations.
	* dwarfread.c (scan_compilation_units):  Call set_cu_language
	to record language for current compilation unit.
	* dwarfread.c (scan_partial_symbols):  Call add_enum_psymbol here
	for TAG_enumeration_types, rather than in add_partial_symbol.
	* dwarfread.c (add_partial_symbol):  Combine TAG_enumeration_type
	case with class, struct, and union type cases, now that they are
	the same.  Remove tests for non-NULL name attributes, now done
	by callers.
	* gdbtypes.h (TYPE_CODE_CLASS):  Add type for C++ classes, but
	treat as alias for TYPE_CODE_STRUCT for now.
1992-08-31 20:50:45 +00:00
Fred Fish
3877a2192c * {i386-tdep.c, m68k-tdep.c, mips-tdep.c, sparc-tdep.c}
(supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
	Use "regi" for local indexing through register numbers, reserving
	"regno" for the name of a specific register passed as an input
	parameter.  Fix bug propagated through all versions that sometimes
	used regno as an index when it should have been regi, thus using
	-1 as an index in some cases.
1992-08-31 04:22:46 +00:00
Per Bothner
3402b1cff2 * cplus-dem.c, demangle.h: Moved to ../libiberty and ../include,
respectively, so same demangler can be used by other programs.
	* Makefile.in:  Remove demangler stuff.
	* Makefile.in (depend):  Pass -I../readline (needed for main.c).
	* demangle.c (_initialize_demangler):  Tell demangler which
	CPLUS_MARKER to assume.
1992-08-31 01:23:24 +00:00
John Gilmore
9b280a7f53 RS/6000 portability changes (for hosting cross-debuggers).
* breakpoint.c (fixup_breakpoints):  Re-kludge to IBM6000_TARGET.
* buildsym.c, rs6000-xdep.c, rs6000-tdep.c, tm-rs6000.h,
xcoffexec.c, xcoffread.c:  Rename aixcoff to xcoff everywhere.
* printcmd.c (print_frame_args):  Remove an RS/6000 dependency.
* stabsread.c (define_symbol):  Remove RS/6000 dependencies.
* tm-rs6000.h (ATTACH_DETACH):  Remove: host-dependent.
(PTRACE_ATTACH, PTRACE_DETACH):  Remove: host-dep.
(NO_SINGLE_STEP):  Add, target-dependent.
(loadinfotextindex):  Lowercase, remove "aix_".
* xm-rs6000.h:  Add <sys/ptrace.h> for infptrace.c.
(NO_SINGLE_STEP):  Remove, target-dependent.
* xcoffexec.c (vmap_symtab):  Cleanup #if 0'd code.
* xcoffread.c:  Only build file if RS/6000 native GDB.
(build_function_symbol):  Remove #if 0'd code.
* rs6000-tdep.c:  Cleanup.  Add static fn protos.
Use CORE_ADDR for addresses throughout.  Make void fns void.
(pop_dummy_frame):  Add FIXME about bogosity of design here.
(rs6000_struct_return_address):  Ditto.
(frameless_function_invocation, frame_get_cache_fsr,
frame_initial_stack_address, xcoff_relocate_symtab,
xcoff_init_loadinfo, free_loadinfo, xcoff_add_toc_to_loadinfo,
add_text_to_loadinfo, find_toc_address):  Move from xdep file.
Use CORE_ADDRs.  Change identifiers to lowercase.

* rs6000-xdep.c:  Make whole file conditional on native RS/6000,
supplying dummy routines if non-native.  Add prototype for
static exec_one_dummy_insn.  Move a mess of functions to
rs6000-tdep.c (as above).  Remove #if 0'd code.

* config/rs6000.mh (XDEPFILES):  Move xcoffexec.o to target side.
(XM_CLIBS):  Add -lm to circumvent AIX 3.2 libc ldexp bug.
* config/rs6000.mt (TDEPFILES):  Adopt xcoffexec.o.
1992-08-29 00:32:58 +00:00
John Gilmore
d6776adba2 * vx-share/README, nindy-share/README: New files describing
how these directories' code is shared, and with whom.
(also 29k-share)
1992-08-28 20:16:45 +00:00
John Gilmore
ef131e1315 * configure.in (target configurations): Reformat into table.
Remove unsupp. Amigados host and target.  Ditto Mach 386 target.

* tm-altosgas.h, tm-i386v-g.h:  Remove ancient coff encap configs.
* config/{altosgas.mt, i386v-g.mt, i386v32-g.mt}:  Ditto.
* config/{i386sco.mt,i386v32.mt}:  Remove; identical to i386v.mt.
* config/{go32.mt,i960.mt}:  Remove; they only printed error msgs.
* config/nindy960.mt:  Remove useless MT_CFLAGS setting.
* config/i386aout.mt:  Use tm-i386v.h, not tm-i386v-g.h.

* Makefile.in (config-check):  Add command to check whether
configure.in is consistent with config/*.
1992-08-28 04:58:27 +00:00
John Gilmore
b1aa08e25f Remove -gas variants; GDB doesn't care. Cross-check with config/*.mh
to make sure all .mh files are represented and vice verse.
1992-08-28 02:00:26 +00:00
John Gilmore
19758e9ed7 * configure.in (host configurations): Reformat nested cases into
easy-to-maintain table.
(altos-*-gas):  Use -gas flag instead of OS "gas".
1992-08-27 04:15:42 +00:00
Fred Fish
38e9ed495c * cplus-dem.c: Reorder args to most local functions to make them
follow the consistent pattern of struct work_stuff pointer first,
	followed by pointer into string being demangled, followed by
	pointer to the string where the result is being stored, followed
	by other args.  Also generally replace most variables of name
	"type" with "mangled" for consistency.  They all pointed to the
	same string but half were one name and half the other.
	* cplus-dem.c (LONGERNAMES):  Remove #ifndef's.
	* cplus-dem.c (demangle_qualified):  Rewrite to clean up and allow
	use whenever a qualified name is being demangled.
	* cplus-dem.c (do_type):  Qualified names are treated similarly
	to fundamental types, not as modifiers of fundamental types.
1992-08-26 23:05:55 +00:00
Stu Grossman
ee97d6736c * sparc-stub.c (handle_exception): Flush instruction cache just
before returning to the user.  (hexToInt):  Fix overzealous cleanup.
1992-08-25 03:47:53 +00:00
Fred Fish
93220abe64 * infrun.c (handle_command): Rewrite to allow multiple signal
numbers, signal number ranges, and to recognize "all" to mean all
	signals except those used by the debugger.
	* infrun.c (SET_SIGS, UNSET_SIGS):  Macros used in handle_command
	to set or reset actions for specific signals.
1992-08-24 19:00:24 +00:00
Fred Fish
dac9734e58 * coffread.c (decode_type): Call alloc_type to alloc new
types.
	* stabsread.c (read_array_type, read_range_type, define_symbol):
	Call alloc_type to alloc new types.
	* stabsread.c (define_symbol):  Move dbl_valu symbol field data
	from type_obstack to symbol_obstack.
	* stabsread.c (define_symbol):  Move typedef_sym from type_obstack
	to symbol_obstack.
	* gdbtypes.h (TYPE_ALLOC):  New macro to allocate space for data
	associated with a type, using the same mechanism as was used to
	allocate space for the type structure itself.
	* coffread.c (patch_type, coff_read_struct_type,
	coff_read_enum_type):  Use TYPE_ALLOC.
	* dwarfread.c (struct_type):  Use TYPE_ALLOC.
	* gdbtypes.c (create_array_type, check_stub_method,
	allocate_cplus_struct_type):  Use TYPE_ALLOC.
	* mipsread.c (parse_symbol, parse_type):  Use TYPE_ALLOC.
	* stabsread.c (read_struct_type, read_array_type, read_enum_type,
	read_range_type):  Use TYPE_ALLOC.
1992-08-24 00:13:11 +00:00
Fred Fish
ca8820f938 * breakpoint.c (breakpoint_re_set): Select a default source
symtab if one is not currently selected.
	* utils.c (query):  Call wrap_here before building the output
	query string, to turn off wrapping and flush any buffered output.
	Otherwise our query may end up in the wrap buffer and never be
	seen by the user.
	* eval.c (evaluate_subexp):  Report error when attempting to
	evaluate subscript for types without a target type, rather
	than dumping core by using the NULL pointer.
	* symfile.c (symbol_file_command):  Forget current_source_symtab
	and current_source_line when discarding symbol table.
1992-08-23 18:09:19 +00:00
John Gilmore
42e8b6588e Bug fixes from Andrew Heybey <ath@lcs.mit.edu>.
* tm-mips.h (REGISTER_VIRTUAL_TYPE):  Float regs are float type.
* mips-tdep.c (mips_print_register):  Alloc enough space for two regs.
1992-08-23 05:36:09 +00:00
Stu Grossman
39a131782f * remote.c (remote_open): Fix baud rate setting to make -b flag
work.  (remote_wait):  Change 'T' message parser to deal with new
improved format which allows stub to send an arbitrary bunch of
registers.
* sparc-stub.c:  General cleanups.  (trap_low, handle_exception):
make all this re-entrant by storing all state on the stack.  Clean
up memory error trapping.  (computeSignal, set_debug_traps):
make it all table driven.  Make a start at a baud rate setting command.
1992-08-21 22:35:35 +00:00
Ian Lance Taylor
664cf43813 This is for PR 628.
Wed Aug 19 10:23:27 1992  Ian Lance Taylor  (ian@cygnus.com)

	* m68k-pinsn.c: handle new operand type 'r', introduced for cas2.
1992-08-19 18:28:48 +00:00
Ian Lance Taylor
0d6d92c707 Wed Aug 19 10:23:27 1992 Ian Lance Taylor (ian@cygnus.com)
* remote-vx.c: redefine malloc to avoid buggy declaration on
	RS/6000 <rpc/types.h>.
	xm-rs6000.h: include <sys/select.h> to define fd_set for
	<rpc/svc.h> on RS/6000.
1992-08-19 17:26:47 +00:00
Ian Lance Taylor
4bbefa86e2 Moved in from p3:
Tue Aug 18 14:48:24 1992  Ian Lance Taylor  (ian@cygnus.com)

 	* Makefile.in: added FLAGS_TO_PASS variable, and passed it to
	recursive invocations of make.  Always create installation
	directories.
1992-08-18 21:59:16 +00:00
Per Bothner
d6b38bfb24 * m68k-pinsn.c: Minor fix in style of output (don't use
range to indicate floating point control registers).
1992-08-18 01:35:31 +00:00
John Gilmore
67c9f54cb9 Surround extended support with #ifdef HAVE_68881. 1992-08-15 11:06:41 +00:00
John Gilmore
e893a126fb * infcmd.c (registers_info): Handle multiple register names.
Changes inspired by Roland McGrath.
1992-08-15 10:00:10 +00:00
Stu Grossman
4ecee2f9f1 * sparc-stub.c: New file. Mix it with your SPARClite
application, and it will speak GDB remote protocol!
* remote.c (remote_wait):  Change 'T' (expedited reply) message to
deal with arbitrary registers.  Needed for sparc-stub,
1992-08-15 09:34:25 +00:00
Fred Fish
3dc755fb81 * cplus-dem.c (cplus_markers): Add table for gnu style and
use throughout, in place of compile time constant CPLUS_MARKER.
	* cplus-dem.c (ARM_VTABLE_STRING, ARM_VTABLE_STRLEN):  Add.
	* cplus-dem.c (cfront_special):  New function, as suggested
	by pfieland@stratus.com.
	* cplus-dem.c (forget_types):  New function.
	* cplus-dem.c (cplus_demangle):  Call gnu_special, moved from
	demangle_prefix().
	* cplus-dem.c (mop_up):  Call forget_types().
	* cplus-dem.c (AUTO_DEMANGLING, GNU_DEMANGLING, LUCID_DEMANGLING):
	Use throughout, instead of checking current_demangling_style.
	* cplus-dem.c (demangle_signature):  When finding an explicit
	start of function args, forget all remembered types for
	lucid/cfront style demangling.
	* cplus-dem.c (demangle_prefix):  In a sequence of two or more
	underbar characters, use last pair as the delimiter.  Hoist
	gnu_special() call up to cplus_demangle().  Call cfront_special()
	when appropriate.
	* cplus-dem.c (cplus_special):  Fix virtual table name demangling
	for inherited classes.
	* cplus-dem.c (demangle_args):  Document quirks of numbered
	references to previously seen types.
	* dbxread.c (read_ofile_symtab, process_one_symbol):
	Use AUTO_DEMANGLING rather than explicitly checking
	current_demangling_style.
	* demangle.h:  Add some comments.
	* demangle.h (AUTO_DEMANGLING, GNU_DEMANGLING, LUCID_DEMANGLING,
	CFRONT_DEMANGLING):  New macros.
	* dwarfread.c (LCC_PRODUCER):  Remove trailing space, which is
	not found in the actual producer string produced by lcc.
	* dwarfread.c (handle_producer):  Use AUTO_DEMANGLING rather
	than explicitly checking current_demangling_style.
1992-08-14 19:14:15 +00:00
John Gilmore
4e8ea7a6e8 * breakpoint.c (enable_longjmp_breakpoint,
disable_longjmp_breakpoint, set_longjmp_resume_breakpoint):
Check for duplicate breakpoints at the same address.  Bug report
and preliminary fix from Dave Morrison, <drmorris@us.oracle.com>.
1992-08-13 19:02:32 +00:00
Fred Fish
7b5d965008 * buildsym.c (end_symtab): Document that end_symtab can return
NULL under non-error conditions.
 	* dwarfread.c (read_file_scope):  Guard against dereferencing NULL
 	returned from end_symtab for empty compilation units.
1992-08-12 18:17:48 +00:00
John Gilmore
6872cfda60 Changes to make MIPS x 29K compile.
* am29k-tdep.c:  Lint from DECstation compiler.
* mem-break.c:  Restore test of BREAKPOINT size that Fred removed.
As the man page says, "Sometimes you just can't get lint to shut
up".  That doesn't mean you should blow away the code it won't
shut up about.
* mips-xdep.c:  Revise stubbing-out of code until Rich cleans
it up over the next few weeks.  Make mips x 29k build.
* tm-29k.h (CALL_DUMMY):  Make it work on cross-endian hosts.
(FIX_CALL_DUMMY):  Comment in the patching of the breakpoint,
but leave it as a comment because the breakpoint instruction
is not easily accessible at this moment (it's static, and if
we define one here, it goes into every file compiled).
1992-08-11 09:54:24 +00:00
Fred Fish
a679650f37 * Makefile.in (VERSION): Bump to 4.6.3.
* dwarfread.c (scan_partial_symbols):  Skip over DIE's within
	function scopes when building partial symbol tables.
	* objfiles.c (open_existing_mapped_file):  Make it clear in
	warning message that out of date mapped files are ignored.
	* symtab.c (lookup_symtab_1, lookup_symbol):  Print compilation
	unit source file name in error message.
1992-08-11 05:29:41 +00:00
Fred Fish
50055e94a1 * dwarfread.c (struct dieinfo): Add has_at_byte_size.
* dwarfread.c (struct_type):  In absence of AT_byte_size for
	bitfield, use size of object of member's type for the size of
	the anonymous object containing the bit field.
	* dwarfread.c (completedieinfo):  Set has_at_byte_size when
	an AT_byte_size attribute is seen.
	* mipsread.c (psymtab_to_symtab_1):  Fix misspelled cast to
	union aux_ext (was aux_ent).
	* i386-pinsn.c (print_insn):  Cast 2'nd arg to read_memory from
	unsigned char* to char*, for Lucid compiler.
	* i386-tdep.c (codestream_fill):  Fix cast of 2'nd arg to read_memory
	to be correct type (from unsigned char* to char*).
	* valprint.c (type_print_derivation_info):  Minor tweak to placement
	of commas in derived class printing.
	* xcoffread.c (builtin_type):  Fix misspelling in fatal message.
1992-08-09 06:14:59 +00:00
Steve Chamberlain
f6492282df * xm-go32.h: Define LSEEK_NOT_LINEAR
* serial.c (find_source_lines): if LSEEK_NOT_LINEAR is defined
	then work out the lseek positions of newlines by running through
	the file and `tell'ing.  This makes source file listing work on
	OS's where the relationship between physical position in file and
	canonical position is indeterminate, eg VMS and DOS.
1992-08-07 18:22:54 +00:00
Fred Fish
c02a37ea00 * stabsread.c: Ensure that all members of all allocated structures
are initialized to known state to avoid hard to find bugs with gdb
	using fields containing random data.
1992-08-06 21:44:36 +00:00
Fred Fish
3416d90bd6 * buildsym.c (start_subfile): Compact dirname initialization.
* buildsym.c (patch_subfile_names):  New function.
	* buildsym.c (end_symtab):  Make copy of dirname on symbol obstack.
	* buildsym.c (end_symtab):  Free all malloc'd subfile fields.
	* buildsym.h (patch_subfile_names):  Add prototype.
	* dbxread.c (process_one_symbol):  Call patch_subfile_names.
1992-08-06 19:59:46 +00:00
Fred Fish
8275e802a7 * buildsym.c (end_symtab): Make copy of dirname on symbol obstack. 1992-08-06 17:58:26 +00:00
John Gilmore
15ee4caab2 Update comments. It doesn't do MiniMON, it does UDI! 1992-08-05 17:49:48 +00:00
John Gilmore
38094c6033 * remote.c (getpkt): Only force retransmission ten times;
after that, assume bug in target code, and handle pkt anyway.
1992-08-05 08:46:44 +00:00
Stu Grossman
d0d0f75ef1 * configure.in: Add support for apollo 68k under BSD environment.
* xm-apollo68b.h:  New file to support above.
1992-08-04 00:09:14 +00:00
Fred Fish
9e4667f601 * configure.in: Recognize i486 host cpu.
* valprint.c (type_print_derivation_info):  Print derivation info
	in same form as class declarations in source.
	* valprint.c (type_print_varspec_suffix):  Split arg printing
	code out to type_print_args function.
1992-08-03 07:28:46 +00:00
Fred Fish
cd46ffad4e * dwarfread.c (struct dieinfo): Remove obsolete at_visibility,
at_import, at_frame_base.
	* dwarfread.c (completedieinfo):  Remove cases for obsolete
	AT_visibility, AT_import, and AT_frame_base attributes.
	* breakpoint.h (BREAKPOINT_MAX):  Increase from 10 to 16 for
	i860, which can keep up to 4 shadow breakpoints.
	* tm-stratus.h (USG):  Define.
	* tm-stratus.h (TARGET_BYTE_ORDER):  Define to BIG_ENDIAN.
	* xm-stratus.h (HOST_BYTE_ORDER):  Define to BIG_ENDIAN.
	* xm-stratus.h (xm-sysv4.h):  Include, name changed from xm-svr4.h.
	* xm-stratus.h (NO_JOB_CONTROL):  Remove define.
	* config/stratus.mt (TDEPFILES):  Include files available from
	stratus that are not yet in release pending receipt of paperwork
	at FSF.
	* buildsym.c (finish_block):  Minor code format change.
	* gdbtypes.h (struct field):  Add to comments.
	* gdbtypes.h (virtual_field_bits):  Add to comments.
	* objfiles.c (allocate_objfile):  Change obstack interface to
	match FSF merging efforts.
1992-08-01 20:40:59 +00:00
David Henkel-Wallace
ddce75e075 Support OSE. 1992-07-23 18:57:29 +00:00
Fred Fish
d78086038e * lmode_inferior_valid, lmode_ours_valid: New static vars.
* inflow.c (terminal_init_inferior, terminal_inferior,
	terminal_ours_1, initialize_inflow):  Record and use state
	of lmode_inferior_valid and lmode_ours_valid.
1992-07-23 04:41:40 +00:00
Fred Fish
c0f1085b5a * buildsym.c (read_struct_type): Initialize structs allocated
with alloca, to avoid using random values from stack later on.
	* defs.h (fprintf_filtered):  Add prototype.
	* gdbtypes.c (check_stub_method):  Fix misleading comments.
	* gdbtypes.c (print_arg_types, dump_fn_fieldlists):  New maint
	support functions.
	* gdbtypes.c (print_cplus_stuff, recursive_dump_type):  Many
	small changes to maint support functions.
	* gdbtypes.h (cplus_struct_type):  Reorganize member ordering
	for some fields and expand comments.
	* objfiles.c (allocate_objfile):  Use new obstack_alloc_arg
	macro and track change to obstack_full_begin macro.
	* utils.c (fprintfi_filtered):  New function.
	* valprint.c (type_print_base):  Fixup field printing to not
	print extraneous lines and not print bogus "no data fields"
	messages for C++ classes with no data members.  Also use new
	fprintfi_filtered function.
1992-07-21 04:14:34 +00:00
Stu Grossman
b5fee91eae * energize.c: Second cut at DynamicLoad message handling. 1992-07-18 00:29:40 +00:00
Stu Grossman
509c1804ca * energize.c: Relativize pathnames in #include statements.
* (kernel_dispatch):  Better error messages for unknown protocol
messages.
* (kernel_dispatch):  First cut at DynamicLoad message handling.
1992-07-18 00:00:24 +00:00
Stu Grossman
f8e32b6ee5 * Makefile.in: Remove -I../readline from all compilations,
include a special case for main.o instead.
1992-07-17 23:53:49 +00:00
Fred Fish
51a9d78c44 * eval.c (evaluate_subexp): Ask lookup_struct_elt_type to call
error if it fails to find a member type, rather than return NULL
	and trigger a coredump.
	* symtab.c (lookup_symbol, lookup_demangled_block_symbol,
	lookup_demangled_partial_symbol,):  Ask demangle_and_match to
	match on complete demanglings, including argument lists for member
	functions, rather than just accepting the first demangling that
	matches the class and function name.
1992-07-17 18:52:05 +00:00
Fred Fish
d4902ab0a7 * dwarfread.c (read_file_scope): Pass contents of AT_comp_dir
to start_symtab as the directory name.
	* dwarfread.c (completedieinfo):  Strip off any leading hostname
	portion of the AT_comp_dir attribute string.  Gdb doesn't know
	what to do with them (FIXME).
1992-07-17 17:16:26 +00:00
Stu Grossman
cb48d8069c * breakpoint.c (commands_command): Simplify code a bit, remove
unnecessary fflush().
1992-07-16 23:22:57 +00:00
Stu Grossman
cdaa27e9ae * Makefile.in (OTHERS): Add gcc.patch.
* partial-stab.h (N_SO):  Fix handling of redundant SOs (again...)
1992-07-16 20:40:36 +00:00
Fred Fish
345e9ab8dc Change LCC_PRODUCER string to match current NCR lcc AT_producer. Update
energize-patches to work when configured with -srcdir=.
1992-07-16 19:12:49 +00:00
Stu Grossman
3ddcdc596c * WHATS.NEW renamed to NEWS. 1992-07-16 18:41:46 +00:00
Fred Fish
d23639b2ec * dbxread.c, dwarfread.c: Re-enable experimental code to
automatically select demangling style.
	* demangle.c (DEFAULT_DEMANGLING_STYLE):  Rename from simply
	DEMANGLING_STYLE, to make more descriptive.  Revert back to
	"auto" as default.  Comment use.
	* Makefile.in (DEMANGLING_STYLE, DEMANGLE_OPTS):  Remove.
	* Makefile.in (${DEMANGLER}.o) Remove target and special
	compilation rule.
1992-07-15 19:33:21 +00:00
Fred Fish
5e85287ea2 To avoid confusion, start off post release development versions at 4.6.1,
so the only 4.6 gdb executables are those built from the actual 4.6 release.
1992-07-15 06:11:24 +00:00
Stu Grossman
d1fbc20dc3 * Makefile.in, demangle.c: Change default demangling style to
gnu.
* Makefile.in:  Update version to 4.6 !!!
* README, WHATS.NEW:  Update for 4.6.
1992-07-15 02:30:30 +00:00
Ken Raeburn
7b8ca0a03f Use frame address if arg pointer isn't available. 1992-07-14 22:07:47 +00:00
Ken Raeburn
7e94a17bcd Don't crash on TYPE_CODE_UNDEF nodes as base classes (generated by
compiler bug?).
1992-07-14 21:22:05 +00:00
Stu Grossman
930acbe575 * xcoffread.c: Add decl for section_offset to keep prototype happy. 1992-07-14 21:11:54 +00:00
Stu Grossman
67ba524fe0 * Makefile.in (VERSION): 4.5.9. 1992-07-14 07:37:03 +00:00
Stu Grossman
efcc6e0653 * xm-hp300bsd.h: Add decl for strdup().
* mips-tdep.c (heuristic_proc_desc):  Fill in proc start addr in
PDR.  Cleanup a few things, fix compilation warnings.
1992-07-14 07:35:48 +00:00
Fred Fish
2dbde378c4 * Makefile.in (DEMANGLING_STYLE): New define to set default
demangling style for C++.  Defaults to "auto".
	* Makefile.in (DEMANGLE_OPTS):  Use DEMANGLING_STYLE.
	* Makefile.in (SFILES_MAINDIR):  Add demangle.c
	* Makefile.in (OBS):  Add demangle.o
	* cplus-dem.c (GNU_DEMANGLING, ARM_DEMANGLING, LUCID_DEMANGLING):
	Remove compile time decisions about demangling style and replace
	with runtime decisions using current_demangling_style.
	* cplus-dem.c (main):  Expand code included during building of
	standalone demangler to recognize demangling style options.
	* dbxread.c (demangle.h):  Include.
	* dbxread.c (read_ofile_symtab, process_one_symbol):  Set GNU C++
	demangling style if processing g++ code and current demangling style
	is auto (Note: this feature currently disabled.)
	* demangle.c:  New file, generic demangling control.
	* demangle.h (demangling_styles):  New enumeration to select one
	of several demangling styles.  Also define string names for each
	style.
	* demangle.h (set_demangling_style):  Add prototype.
	* dwarfread.c (demangle.h):  Include.
	* dwarfread.c (GPLUS_PRODUCER, LCC_PRODUCER, CFRONT_PRODUCER):
	New producer string prefixes to recognize.
	* dwarfread.c (handle_producer):  Consolidate actions for specific
	producers.  Set demangling style based on producer string if
	current style is auto.  (Note: this feature currently disabled.)
	* config/ncr3000.mt (DEMANGLE_OPTS):  Remove.
1992-07-14 02:13:12 +00:00
John Gilmore
49f3be18e1 * config/sun4sol2.mh: Remove -xs flag, default INSTALL to cp. 1992-07-13 10:36:39 +00:00
Per Bothner
a252e71520 * gdbtypes.c, gdbtypes.h: New function lookup_signed_typename.
* c-exp.y:  Call lookup_signed_typename() after seeing
	"signed".  This handles "signed char" correctly.
	* c-exp.y:  Recognize (but ignore) 'const' and 'volatile'
	keywords before a type specifier.
1992-07-10 23:30:40 +00:00
Fred Fish
311592ff50 * command.c (lookup_cmd_1): Clarify descriptive comments.
* gdbcmd.h (maintenanceprintlist):  Add declaration.
	* main.c (maintenanceprintlist):  Add definition.
	* main.c (gdb_completer_command_word_break_characters):  Add.
	* main.c (symbol_completion_function):  Switch completer word
	break character sets dynamically, based on whether completion is
	being done on commands or on something else.
	* main.c (initialize_cmd_lists):  Init maintenanceprintlist.
	* maint.c:  Include demangle.h.
	* maint.c (maintenance_demangle):  New function.
	* maint.c (maintenance_print_command):  New function.
	* maint.c (_initialize_maint_cmds):  Reorganize some commands
	under new maintenance print subcommand.
1992-07-10 17:22:35 +00:00
Per Bothner
5c5b5d4b0e Various fixes to improve C++ debugging. See ChangeLog. 1992-07-10 03:56:17 +00:00
Ken Raeburn
7eec00ed56 print symbolic version of addresses as well as hex 1992-07-10 00:33:05 +00:00
Ken Raeburn
c5f5b482da Fixed some bugs in handling vxworks960 -- not reading registers right,
trying to use FP regs (not supported by target), botching IP.
1992-07-09 23:48:29 +00:00
Fred Fish
8050a57b2c * dwarfread.c (alloc_utype, decode_subscr_data): Call alloc_type
to create new blank types, instead of handcrafting them.
	* defs.h (printfi_filtered):  Add prototype.
	* utils.c (printfi_filtered):  New function.
	* gdbtypes.c (recursive_dump_type):  Use printfi_filtered to
	to simplify the code.  Other cleanups.
	* gdbtypes.c (check_stub_method):  Demangle using DMGL_ANSI.
	* gdbtypes.h (struct cplus_struct_type):  Add comments describing
	use of various fields.
	* gdbtypes.c (print_bit_vector, print_cplus_stuff):  New functions.
	* c-exp.y (%token):  Add CLASS as a token for C++, add grammar
	production that currently treats it exactly the same as STRUCT.
	* c-exp.y (yylex):  Recognize "class" as token CLASS.
	* symtab.c (gdb_mangle_name):  Rewrite to match current g++ stabs.
	* symtab.c (decode_line_1):  Fix to pass quoted args on down to
	general symbol handling code.  Call cplus_mangle_opname with
	DMGL_ANSI.
	* symtab.c (decode_line_2):  Print demangled function names in
	breakpoint menus, instead of just file and line number.
	* symtab.c (name_match):  Call cplus_demangle with DMGL_ANSI.
	* valprint.c (type_print_base):  Print "class" for C++ classes,
	rather than "struct".  Print section labels for public, protected
	and private members of C++ classes.
	* values.c:  Include demangle.h.
	* values.c (value_headof):  Call cplus_demangle with DMGL_ANSI.
1992-07-09 04:40:39 +00:00
Stu Grossman
e17e8e0e03 * Makefile.in (VERSION): Update to 4.5.8. 1992-07-09 00:24:24 +00:00
Stu Grossman
784fd92b3d * dbxread.c (dbx_symfile_init): Init stab_section_info to NULL to
prevent crashes when examining cross-targets.
* dbxread.c (process_one_symbol):  Include directory name when
calling start_subfile for SOL & BINCL symbols.  This allows gdb to
find include files, and yacc/lex sources when the cwd doesn't match
that in which the object was compiled.
* objfiles.h (ALL_MSYMBOLS):  Don't seg fault when there are no
msymbols.
* symtab.c (lookup_symtab_1):  Rewrite.  It now handles include
files.
1992-07-08 08:00:30 +00:00
Fred Fish
2e9309df58 * maint.c (maintenance_command, maintenance_info_command):
Install with allow_unknown as 0 and call help_list to show
	list of possibilities when no subcommand is specified.
1992-07-07 16:00:30 +00:00
Fred Fish
498f1df044 * configure.in: Add m68k-ericsson-*.
* remote-es1800.c, tm-es1800.h, config/es1800.mt:  New files.
1992-07-07 07:22:56 +00:00
Fred Fish
0239d9b328 * maint.c: New file.
* Makefile.in (SFILES_MAINDIR):  Add new file maint.c.
	* Makefile.in (OBS):  Add new file maint.o.
	* defs.h (command_class):  Add class_maintenance.
	* defs.h (MAINTENANCE_CMDS):  Default to including maintenance
	commands.  Allow for them (and other nonessential parts of gdb)
	to be selectively left out under special circumstances.
	* gdbtypes.c (recursive_dump_type):  New function; supports
	maintenance print-type command.
	* gdbtypes.h (recursive_dump_type, maintenance_print_type):
	Add prototypes.
	* main.c (maintenancelist, maintenanceinfolist):  Add maintenance
	command lists.
	* main.c (initialize_cmd_lists):  Eliminate unnecessary casts on
	initializers.  Add initializations for setprintlist, showprintlist,
	setchecklist, showchecklist, maintenancelist, and maintenanceinfolist.
	* printcmd.c (maintenance_print_type):  New maintenance cmd.
	* valprint.c (setprintlist, showprintlist):  Move to main.c, as
	implied by comment that all cmd lists are owned by main.c.
	* infcmd.c (unsetlist):  Move to main.c, as implied by comment
	that all cmd lists are owned by main.c.
	* language.c (setchecklist, showchecklist):  Move to main.c, as
	implied by comment that all cmd lists are owned by main.c
	* breakpoint.c (enablelist, enablebreaklist, disablelist, cmdlist,
	deletelist):  Remove redundant declarations (also in gdbcmd.h).
	* symmisc.c (printsyms_command):  Now maintenance_print_symbols.
	* symmisc.c (printmsyms_command):  Now maintenance_print_msymbols.
	* symmisc.c (printpsyms_command):  Now maintenance_print_psymbols.
	* symmisc.c (printobjfiles_command):  Now maintenance_print_objfiles.
	* symtab.h (maintenance_print_symbols, maintenance_print_psymbols,
	maintenance_print_msymbols, maintenance_print_objfiles):
	Add prototypes.
	* symmisc.c (printsyms_command, printpsyms_command,
	printmsyms_command, printobjfiles_command):  Removed from
	_initialize_symmisc.
	* main.c (dump_me_command):  Moved to maint.c and renamed to
	maintenance_dump_me.
	* breakpoint.c (all_breakpoints_info):  Rename to
	maintenance_info_breakpoints.
	* breakpoint.c (_initialize_breakpoint):  Convert add_info of
	all_breakpoints_info to add maintenance_info_breakpoints to the
	maintenanceinfolist instead.
	main.c (initialize_main):  Set up maintenance class commands.
1992-07-06 00:22:57 +00:00
Stu Grossman
6a701ae205 * energize-patches: Fix minor problems with building energize lib.
(Also all energize.h to .Sanitize).
1992-07-05 19:09:38 +00:00
Stu Grossman
2bfe2c53db * energize-patches: Change names of all cadillac procedure calls
to be energize procedure calls.  Simplify many hooks by moving
tests energize.c.  Configure energize, and build it automatically now.
1992-07-05 18:07:52 +00:00
Fred Fish
91fef76b2a * Makefile.in (VERSION): Bump to 4.5.7.
* cplus-dem.c (demangle_args):  Validate index for previously
	seen type to guard against bogus values from malformed manglings.
	* valops.c (value_struct_elt_for_reference):  Guard against
	blindly using NULL return value from lookup_symbol.
1992-07-05 17:21:13 +00:00
Stu Grossman
264ad0728b * cadillac.c, cadillac-patches: Rename to energize.c and
energize-patches.  Change all routines and variables named
'cadillac*' to 'energize*'.  Create new file called energize.h to
hold all interface declarations.

* deblib/connection/*:  Move all of this stuff into energize/, but
delete unneeded files.
1992-07-05 17:07:54 +00:00
John Gilmore
23053b80b1 SVR4 names don't have underscores, according to the ABI. 1992-07-05 11:29:16 +00:00
John Gilmore
ec8ceca3f3 * buildsym.c (finish_block): Fix thinko `inner block' complaints.
* dbxread.c (process_one_symbol):  Parse N_OPT "gcc2_compiled.".
* procfs.c (proc_set_exec_trap): Set run-on-last-close flag on
child processes, to avoid dead ones "hanging around" after GDB exits.
(attach): Always stop the process if it needs it.  Set RLC flag
when attaching running processes, so it will continue if we detach
it, quit, or are killed.
(detach):  Clear faults and set RLC flag to make process run
when we close it.
(open_proc_file):  New `mode' argument for O_RDONLY or O_RDWR.
Callers changed.
(info_proc):  Open process O_RDONLY, so we can see any process,
even those controlled by debuggers.
* tm-sun4sol2.h (SUN_FIXED_LBRAC_BUG):  They did (in Sol 2).
1992-07-05 10:26:53 +00:00
David D. Zuhn
37e2f5cb8d > * xm-rs6000.h: define MEM_FNS_DECLARED 1992-07-04 14:17:13 +00:00
John Gilmore
2670f34d21 Relocate symbols using an array of section_offsets, rather than a
single `addr' or `offset'.  This makes Solaris-2 support work, and
permits better VxWorks (and maybe xcoff) support later.  See ChangeLog.
1992-07-04 13:59:03 +00:00
Fred Fish
4ed3a9ea66 * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,
core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c,
	eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c,
	i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c,
	infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c,
	putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c,
	sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c,
	tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c,
	values.c, xcoffread.c:
	Remove "(void)" casts from function calls where the return value
	is ignored, in accordance with GNU coding standards.
1992-07-04 03:22:08 +00:00
John Gilmore
4c7c6bab1f * dbxread.c (process_one_symbol): Ignore N_MAIN, N_ENDM for Solaris.
* partial-stab.h:  Ignore N_ENDM.
* elfread.c (elf_symtab_read):  Ignore symbols that don't have a
CODE or DATA section attachment.  This eliminates a lot of random
values from shared libraries, which screw up the ordinary symbols
in the address ranges they happen to overlap.
* buildsym.c (define_symbol):  Eliminate special tests
for function types; move into "function" cases in switch statement.
(define_symbol: 'f', 'F', 'P'):  Process all parameter types
in case they define new type numbers.  But ignore them (FIXME).
('k', 'B'):  Ignore const and volatile if we see them (FIXME).
(read_sun_builtin_type):  Add commentary.
1992-07-03 07:08:31 +00:00
John Gilmore
43a16f2688 Make cross compilation work better.
* tm-mips.h (GDB_TARGET_IS_MIPS):  Define for mips-xdep.c.
(READ_MIPS_FORMAT, COFF_FORMAT):  Remove, unused now.
* mips-xdep.c:  Remove most include files (unused, caused errs).
(fetch_core_registers):  Use right parameters in dummy fn.
1992-06-30 09:27:41 +00:00
John Gilmore
0f552c5fc6 * buildsym.c (scan_file_globals): Beware the null file.
Fix from Jim Williams.

* stack.c (return_command):  Evaluate expression *before* popping
off the stack frames!  Fix inspired by Jim Williams.
(up_silently_command, down_silently_command):  No sel frame is error.

* defs.h (memcpy, memset):  Conditionalize decls on
#ifndef MEM_FNS_DECLARED, since DECstation differs.
(alloca):  Break out the STDC and non-STDC alloca cases, to make
it work on old preprocessors as well as "picky ANSI" ones.
* xm-mips.h (memcpy, memset):  Declare, and set MEM_FNS_DECLARED.

* mips-tdep.c (heuristic_proc_start):  Zero arg produces zero.
* utils.c (fputs_demangled):  Rename SLOP since DECstation system
header files define it!
1992-06-30 08:53:28 +00:00
John Gilmore
c47793da96 Allow BREAKPOINT to be overridden by -D (for Adobe). 1992-06-30 01:34:18 +00:00
Fred Fish
51b57ded88 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
symtab.h, tm-i386v4.h, valprint.c, values.c:  Lint.
	* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
	findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
	putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
	utils.c, valarith.c, valops.c, valprint.c, values.c:
	Replace bcopy() use with memcpy(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
	ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
	target.c, values.c:
	Replace bzero() use with memset(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* i386-tdep.c, main.c, valprint.c:
	Replace bcmp() use with memcmp(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
1992-06-29 23:34:38 +00:00
Fred Fish
22fd4704bc * remote.c (remote_wait): Fix cast on signal() call.
* defs.h (alloca):  More diddling with alloca.  Have to ensure
	that it has a prototype, so that if alloca is defined as a macro
	that takes an arg, the definition is seen as a use of a macro
	that takes an arg, to satisfy picky ANSI preprocessors.
1992-06-28 20:31:11 +00:00
Fred Fish
74fb91be98 * sparc-pinsn.c: Use <string.h> rather than "string.h", for
consistency with all other gdb files.
	* cadillac.c:  Use <string.h> rather than <strings.h>.
	* cadillac.c (kernel_dispatch):  Convert rindex usage to strrchr.
	* Makefile.in (MAKE):  Remove definition for consistency with
	other Makefile.in files and to fix problem with recursive makes.
1992-06-27 19:16:47 +00:00
John Gilmore
3a1e7a62b5 Avoid PT_WDUSER because it crashes H-PUX. 1992-06-27 02:28:05 +00:00
Steve Chamberlain
b951b38d00 * source.c (print_source_lines): for DOS interoperability; don't
print CR (013) as ^M.
1992-06-26 18:12:17 +00:00
Stu Grossman
bf18ac8007 * dbxread.c (dbx_symfile_init): Move more code under hp9000s800
conditional.
* hppabsd-core.c:  Don't include "param.h", include <sys/param.h>
instead.
* remote.c (remote_wait):  Cast signal to void * to avoid warning
from busted HP compiler.
1992-06-25 23:02:57 +00:00
Stu Grossman
cf79373a10 * partial-stab.h (N_SO): Rearrange code a little so that all SO
stabs cause end_psymtab to be called.
1992-06-25 22:46:04 +00:00
Stu Grossman
50a11e4933 * buildsym.c (read_sun_builtin_type): Handle new FCS Sun CC
compiler feature of putting 'c' into basic type descriptors for
all forms of char.
1992-06-25 22:35:09 +00:00
Stu Grossman
99fd9e3ee6 * procfs.c (child_resume): Work around Solaris (on Sparc) lossage
where there is no place for nPC in prrun struct.
1992-06-25 22:22:40 +00:00
Fred Fish
50e0dc4198 * mipsread.c: Pass NULL name pointer to init_type, not 0.
* gdbtypes.c (init_type):  Use copy of typename on type_obstack.
	* dwarfread.c (enum_type):  Save enum names on type_obstack.
	* dwarfread.c (struct_type):  Save member name on type_obstack.
	* symtab.c (_initialize_symtab):  Fix misspelling.
	* regex.c (store_jump, insert_jump):  Return void.
1992-06-25 19:10:49 +00:00
John Gilmore
debd34438d * defs.h (PARAMS): Move to ../include/ansidecl.h.
(alloca):  Declare return type on SPARC, since Sun doesn't.
(*_BYTE_ORDER):  Improve comment:  *must* be defined.
1992-06-25 11:50:31 +00:00
John Gilmore
5140562f37 * tm-hppa.h: New file, architectural definition of HP PA.
* tm-hppabsd.h, tm-hppahpux.h:  Shrink to deltas from tm-hppa.h.

* am29k-pinsn.c, am29k-tdep.c, copying.awk, copying.c,
hppa-coredep.c, hppa-pinsn.c, hppabsd-core.c, hppabsd-tdep.c,
hppabsd-xdep.c, hppahpux-tdep.c, hppahpux-xdep.c, remote-udi.c,
ser-go32.c, xcoffsolib.c:  Remove <stdio.h> which is already in
"defs.h".

* hppa-coredep.c, hppa-pinsn.c, hppabsd-core.c, hppabsd-tdep.c,
hppabsd-xdep.c, hppahpux-tdep.c, hppahpux-xdep.c, xcoffsolib.c,
xcoffsolib.h, xm-go32.h, xm-hppabsd.h, xm-hppahpux.h:  Copyrights.
1992-06-25 11:15:47 +00:00
John Gilmore
4d38b5a85a * printcmd.c (output_command): Thinko.
(x_command):  Only set remembered size/format if cmd succeeds.
1992-06-25 10:58:53 +00:00
John Gilmore
fef9f55c2b * dbxread.c (read_ofile_symtab): Remove N_CATCH special case,
since it is no longer used and burns time for every symbol read.
(process_one_symbol):  Treat N_CATCH like default (complain).
1992-06-24 19:58:57 +00:00
Stu Grossman
369172bbb3 * partial-stab.h (case N_TEXT): Fix fencepost error when
detecting start of new symbol info after reading symtab for a
module with a zero length TEXT segment.
(Note that this fixes the BNR problem with printing vxWorksVersion.  That ought
to make Ken happy).
1992-06-24 07:31:55 +00:00
Fred Fish
b4cc55b533 * valprint.c (val_print_fields): Call fprint_symbol to get
automatic C++ demangling for mangled field names.
1992-06-24 06:24:51 +00:00
Fred Fish
f54e9fd84f * cadillac.c (kernel_dispatch): Make return type void.
* cadillac.c (iosig):  Signal handlers take one int arg.
1992-06-24 05:52:01 +00:00
Fred Fish
e676a15f0b * Makefile.in (VERSION): Bump to 4.5.6.
* coffread.c (coff_end_symtab):  Cast 2nd arg of complain() to
	correct type.
	* defs.h (NORETURN):  Define away for Lucid compiler.
	* remote.c (remote_timer, remote_interrupt):  Signal handlers
	take one int arg.
	* ser-termios.c (serial_write, serial_close):  Return whatever
	value the write/close call returns, rather than falling off end.
	* inferior.h (PTRACE_ARG3_TYPE):  Third arg to ptrace is int on
	more systems than it is "char *".  Define PTRACE_ARG3_TYPE to
	default to int.
	* infptrace.c, hppabsd-xdep.c, hppahpux-xdep.c, i386-xdep.c,
	inferior.h (call_ptrace):  Use PTRACE_ARG3_TYPE to declare type
	of third arg.
	* a68v-xdep.c, arm-xdep.c, convex-xdep.c, hp300ux-xdep.c, infrun.c,
	m88k-xdep.c, mach386-xdep.c, mips-xdep.c, os68k-xdep.c, pyr-tdep.c,
	pyr-xdep.c, rs6000-xdep.c, sparc-xdep.c, sun3-xdep.c, sun386-xdep.c,
	symm-xdep.c, ultra3-xdep.c:  Use PTRACE_ARG3_TYPE to cast ptrace
	argument 3.
	* sparc-xdep.c, a68v-xdep.c (fetch_inferior_registers,
	store_inferior_registers): Supply missing fourth argument to
	ptrace().
1992-06-24 04:49:48 +00:00
Fred Fish
0efe20a642 * command.c (add_abbrev_prefix_cmd): Fix misspelling in comment.
* dwarfread.c (enum_type):  Fix misspelling in comment.
	* valprint.c (val_print_fields, cplus_val_print):  Minor
	adjustment to printing of C++ class structures to more closely
	match format for printing C structures, with and without setting
	pretty print.
1992-06-23 03:33:47 +00:00
Per Bothner
e37a6e9c8a * infrun.c (wait_for_inferior): Don't test for SIGEMT
(which is not a Posix signal) if it isn't defined.
	* tm-linux.h, xm-linux.h, config/linux.m[ht], configure.in:
	New port to Linux (a free Unix clone for 386 machines).
1992-06-23 00:25:11 +00:00
John Gilmore
28df0c3e2d (find_source_lines): Handle large st_size fields. 1992-06-21 03:09:18 +00:00
John Gilmore
f70be3e45a COFF changes for dealing better with EPI 29K C compiler output.
* coffread.c (record_minimal_symbol):  Pass the minsym type to it.
Callers changed.
(coff_end_symtab):  Sort blocks if needed.  Complain if misordered.
(read_coff_symtab):  Move patch_opaque_types call from
coff_symfile_read.  Restrict it to symtabs from this objfile.
(process_coff_symbol: C_TPDEF):  Don't put ordinary foward
references on opaque type chain; just let coff_lookup_type handle 'em.
(decode_type):  Complain about tagndx values on
non-struct/union/enum types, which the EPI compiler tends to produce.

* symtab.c (list_symbols):  Make minimal symbol variable-finding work.

* tm-68k.h (FIX_CALL_DUMMY): Avoid alignment and byte order
dependency.

* elfread.c (elf_symfile_read):  Update bfd_elf_find_section
usage to match new prototype.  Include libbfd.h to get prototype.
1992-06-21 02:20:30 +00:00
Fred Fish
b4fde6fa65 * infcmd.c (jump_command): Use cleanups to avoid memory leaks.
* stack.c (return_command):  Use cleanups to avoid memory leaks.
1992-06-20 23:30:33 +00:00
John Gilmore
e95bfbf19c * remote-adapt.c, remote-eb.c, remote-mm.c: Lint. Fix
INT_REGNUM to INTE_REGNUM.
* tm-29k.h (SDB_REG_TO_REGNUM):  Add for EPI 29K C compiler.
1992-06-20 03:42:14 +00:00
Stu Grossman
7da1e27dd4 * configure.in, dbxread.c, hppa-coredep.c, hppa-pinsn.c,
hppabsd-core.c, hppabsd-tdep.c, hppabsd-xdep.c, hppahpux-tdep.c,
hppahpux-xdep.c, munch, partial-stab.h, tm-hppabsd.h,
tm-hppahpux.h, xm-hppabsd.h, xm-hppahpux.h:  HPPA merge.
1992-06-19 22:43:49 +00:00
Stu Grossman
9aa448333d * Makefile.in (c-exp.tab.c, m2-exp.tab.c): Filter out bogus extern
declarations of malloc/realloc/free that are inserted by some
versions of yacc.
* m2-exp.y:  Prevent conflicts with TRUE and FALSE tokens by
#undeffing them.
* xm-rs6000.h:  Declare malloc/realloc/free appropriately.  Yet
another decl of strdup (this really ought to come from libiberty.h!).
1992-06-19 22:39:44 +00:00
John Gilmore
8f86a4e465 * remote.c (getpkt): Error if input exceeds buffer size.
(_initialize_remote):  `set remotedebug' enables packet trace.

* dbxread.c (process_one_symbol:N_FUN):  GCC now produces relative
N_SLINE's, etc, just like Sun cc on Solaris2.

* am29k-tdep.c (read_register_stack, write_register_stack):
Change RSTACK_HIGH_ADDR to rstack_high_address, a user-settable
variable.  Add `set' and `show' commands for it.
* doc/gdb.texinfo:  Document it.

* eval.c:  Avoid residue-by-zero when evaluating without side effects.
(Bug and fix found by Pierre Willard.)

* sparc-tdep.c:  Clean up slightly for Solaris2.
1992-06-19 21:09:54 +00:00
Fred Fish
4341615d92 * valprint.c (type_print_1): Plug memory leak. Print all
C++ syms as demangled, not just functions.
 	* buildsym.c (read_range_type):  When we find a signed char
 	type, do a lookup of signed char, not plain char.  Plain char's
 	still get looked up as plain char's elsewhere.
1992-06-19 02:43:22 +00:00
Stu Grossman
7634ebc804 * xm-rs6000.h: Fix decls for malloc, realloc, and free. 1992-06-18 00:10:11 +00:00
Stu Grossman
826f73d0cf * xm-rs6000.h: Add decl for strdup(). 1992-06-17 23:56:30 +00:00
Stu Grossman
65c36045d3 * xm-rs6000.h: Remove #include of inferior.h. Fixes many
compilation errors.
1992-06-17 23:44:37 +00:00
Stu Grossman
423e96646b * breakpoint.c (enable_command, disable_command): Without args,
should only affect normal breakpoints and watchpoints.
1992-06-17 21:53:28 +00:00
Stu Grossman
427d778c2c * xcoffexec.c: Remove ' from comment.
* xm-sun3os4.h:  Define MALLOC_INCOMPATIBLE to avoid conflicts
with decls of malloc in c-exp.tab.c (as produced by yacc).
There's got to be a better way to do this...
1992-06-17 20:15:03 +00:00
Fred Fish
323227fefa * partial-stab.h: Convert single rindex use to strrchr.
* mipsread.c, dbxread.c:  Remove troublesome inclusion of non-
	standard <strings.h> file, now that the only single use of
	rindex in the gdb source files is gone.
1992-06-17 18:14:22 +00:00
Fred Fish
fa0bcaa3a5 * mipsread.c: Undo ill effects from including <strings.h>,
which #defines index to be strchr.  Unfortunately, index is
	a member of a symbol table structure that can't be changed.
	* mipsread.c:  tm-mips.h includes coff/symconst.h and coff/sym.h,
	remove redundant #include's.
1992-06-17 05:23:00 +00:00
Stu Grossman
b303297ad8 * mipsread.c: #include <strings.h> for rindex(). 1992-06-16 21:17:43 +00:00
Fred Fish
d1140eb5e3 * xcoffexec.c (map_vmap): Turn comment into a real C comment. 1992-06-16 16:03:54 +00:00
Stu Grossman
c72af08913 * dbxread.c (process_one_symbol), partial-stab.h: Ignore
extraneous SO stabs from busted C++ compilers.
1992-06-16 01:43:35 +00:00
Fred Fish
4c07f28d77 * Makefile.in (VERSION): Bump to 4.5.5.
* symtab.c (decode_line_1):  Until C++ support stabilizes, when
	C++ lookups fail, print possibly helpful hint about completion.
	* cplus-dem.c (demangle_signature):  Fix ARM style demangling
	for static data members.
	* dbxread.c (dbx_psymtab_to_symtab_1):  Fix prototype.
	* config/ncr3000.mh (INSTALL):  Don't use /usr/ucb/install,
	it's broken on ncr3000's.
1992-06-15 19:25:13 +00:00
Fred Fish
1c92ca6f3b * dwarfread.c (decode_modified_type): Change type of first arg.
Change 'modifier' to char from unsigned char.  Cast single use
that needs to be unsigned char.
* symtab.h (SYMBOL_BASEREG_VALID):  Explain disabling.
* utils.c (strdup_demangled):  Add function.
* defs.h (strdup_demangled):  Add prototype.
* stack.c (return_command):  Demangle C++ function names for query.
* infcmd.c (jump_command):  Demangle C++ function names for query.
* cplus-dem.c (consume_count):  New function and prototype.
* cplus-dem.c (demangle_class, gnu_special, demangle_func_type,
do_type):  Replace conversion code with consume_count().
* cplus-dem.c (gnu_special):  Fix demangled of static members.
* source.c (list_command):  Print demangled function names
when appropriate.  Fix supplied by Peter Schauer.
1992-06-15 14:26:57 +00:00
John Gilmore
d69bba12b8 * infcmd.c: Fix typo (reported by Rob Savoye).
* xm-sun4sol2.h (gregset_t):  Thinko in register set definition.
* symtab.h:  Disable SYMBOL_BASEREG_VALID until it works.
* dbxread.c (dbx_psymtab_to_symtab_1):  Renamed from
psymtab_to_symtab_1.  Use current psymtab's sym_offset and symbol_size,
rather than the one for the first file in the dependency chain.
1992-06-15 08:42:09 +00:00
John Gilmore
bcbf95597c * dbxread.c (end_psymtab): Only reset texthigh if it's not already
set.  Don't reset our own texthigh, or dependency-only pst's, in
scanning all the rest of the psymtabs.
(process_one_symbol):  Fix comments around N_OBJ, N_OPT, N_UNDF.

* buildsym.h (N_UNDF):  Improve comments.
(N_LSYM, etc):  Skip types without names (":T(0,3)=sfoob...").
1992-06-14 18:10:10 +00:00
Fred Fish
252f6c65f2 * symtab.h (struct symbol): Add aux_value union for preserving
an additional per-symbol value.
* symtab.h (SYMBOL_BASEREG, SYMBOL_BASEREG_VALID):  Add defines.
* frame.h (FRAME_GET_BASEREG_VALUE):  Provide default definition.
* findvar.c (read_var_value):  Use SYMBOL_BASEREG if valid.
* printcmd.c (address_info):  Use SYMBOL_BASEREG if valid.
* symmisc.c (print_symbol):  Use SYMBOL_BASEREG if valid.
1992-06-13 18:20:44 +00:00
Michael Tiemann
a6b46ad4de Make `clear_symtab_users_once' non-static so objfiles can be linked. 1992-06-13 16:20:04 +00:00
John Gilmore
346168a2c6 * elfread.c (record_minimal_symbol_and_info): Kludged to put
extra info in the minimal symbol.
(elf_symtab_read):  The extra info is the size of an ELF object,
which was kludged to us in the `udata' field of the BFD symbol.
Gag me with a crowbar...
(elf_symfile_read):  Keep track of both the absolute load address,
and the offset between load addr and symbols.  Handle STABS as
well as DWARF sections, passing the absolute load address to
elfstab_build_psymtabs.

* objfiles.c (free_objfile):  Eliminate storage leaks.  Contributed
by <Peter.Schauer@regent.e-technik.tu-muenchen.dbp.de>.
* symfile.c (symfile_bfd_open):  Comment where name is freed.
* symmisc.c (extend_psymbol_list):  Comment where list is freed.
1992-06-13 07:24:30 +00:00
John Gilmore
93297ea028 * buildsym.h: Add processing_acc_compilation flag.
* buildsym.c (read_sun_builtin_type, read_sun_floating_type):  New.
(define_symbol):  Skip arg types in function entries.  Resolve
overloaded 'P' which acc uses for prototypes of functions called
by this file.
(read_type: 'b', 'r'):  Handle Solaris2 builtin types.

* minsyms.c (prim_record_minimal_symbol_and_info):  Hack to
save size of ELF symbols.  FIXME.
* tm-sun4os5.h:  Rename to tm-sun4sol2.h.  Update defines for Sol2.
* xm-sun4os5.h:  Rename to xm-sun4sol2.h.  Hack more defines.

* config/sun4os5.m[ht]:  Rename to config/sun4sol2.m[ht]; new xm, tm.
1992-06-13 02:18:44 +00:00
John Gilmore
bf2e5f6b82 * configure.in: Solaris config is sparc-sun-solaris2.
* config/sun4os5.m[ht]:  Rename to config/sun4sol2.m[ht].
1992-06-13 01:56:41 +00:00
Fred Fish
6b53bf346d * expprint.c (print_subexp): Add missing ']'.
* defs.h (reg_names):  Fix declaration to match that in infcmd.c
	* stack.c (reg_names):  Delete redundant (and inconsistent) decl.
	* WHATS.NEW:  Point out improved C++ function name handling.
	* gdbtypes.c (lookup_fundamental_type):  For now, use the same
	type names for both implicitly and explicitly signed integral
	types.  See comment in the source code.
1992-06-12 20:51:42 +00:00
John Gilmore
28de880c48 Two `long long' fixes from Robert R. Henry (rrh@dino.tera.com):
* defs.h (longest_to_int):  Avoid void arm of ?: in error case.
* expprint.c (print_subexp):  Fix printing of register names.
1992-06-11 19:34:56 +00:00
John Gilmore
1304f099bc Small changes from Solaris port. The big stuff is not all working yet.
* inferior.h (register_valid):  Declare.
* remote-udi.c, rs6000-xdep.c, sparc-xdep.c, tm-rs6000.h:  Remove decl.
* objfiles.h (ALL_OBJFILE_{SYMTABS,PSYMTABS,MSYMBOLS}):  Add
macros for traversing the data structures in a single objfile.
* tm-m88k.h, tm-sparc.h (REGISTER_NAMES):  Remove extra semicolon.
* tm-i960.h (REGISTER_NAMES):  Cosmetic change.
* infcmd.c:  Lint.
1992-06-11 08:43:29 +00:00
Fred Fish
36ce1b6469 * c-exp.y, m2-exp.y: Move remapping defines for malloc and
realloc.  Add remapping defines for {yyss, yyssp, yyvs, yyvsp}.
	* config/{amix.mh, i386v4.mh, ncr3000.mh, stratus.mh,
	sun4os5.mh}:  Add definition for INSTALL using /usr/ucb/install.
1992-06-10 02:05:20 +00:00
Stu Grossman
55488e9ea6 * depend: rebuild to account for remote-st2000.c.
* remote-st2000.c:  Almost works now.
* tm-st2000.h:  Need to turn on HAVE_68881, else things won't compile.
1992-06-09 23:31:53 +00:00
Fred Fish
d630b6150e * c-exp.y (yylex): Recognize single-quoted strings that specify
tokens with embedded whitespace, such as C++ demangled names.
	* defs.h (demangle_and_match, strcmp_iw, skip_quoted):  Prototypes.
	* main.c (gdb_completer_quote_characters):  Add global variable.
	* main.c (symbol_completion_function):  Total rewrite for C++
	demangled name handling.
	* main.c (skip_quoted):  New function.
	* main.c (main):  Set rl_completer_quote_characters.
	* symmisc.c (dump_symtab):  Print source language for symtab.
	* symtab.c (expensive_mangler):  Add prototype and function.
	* symtab.c (completion_list_add_symbol):  Total rewrite for new
	C++ demangled name handling.
	* symtab.c (lookup_symbol): Check for demangled C++ symbol first,
	other changes for demangled C++ symbol handling.
	* symtab.c (lookup_demangled_block_symbol):  Use demangle_and_match.
	* symtab.c (lookup_demangled_partial_symbol):  Use demangle_and_match.
	* symtab.c (decode_line_1):  Recognize C++ demangled names on input.
	* symtab.c (completion_list_add_symbol):  Total rewrite for new
	C++ demangled name handling.
	* symtab.c (expensive_mangler):  New function.
	* utils.c (strcmp_iw, demangle_and_match):  New functions.
	* xcoffread.c (aixcoff_symfile_read):  Fix prototype.
1992-06-09 06:09:33 +00:00
John Gilmore
d9915ebc47 * Makefile.in: Roll VERSION to 4.5.4.
* Makefile.in, config/*.mh, config/*.mt:  Rename TM_CFLAGS
to MT_CFLAGS, XM_CFLAGS to MH_CFLAGS to match file names.
* config/sun4os5.mh:  Add MH_CFLAGS=-xs to save debug info.
1992-06-09 05:10:15 +00:00
Stu Grossman
88cc9a3621 * configure.in: Tandem debug monitor (st2000) support.
* remote-st2000.c, config/st2000.mt:  ditto.
1992-06-08 21:21:59 +00:00
John Gilmore
6f8db23aef * blockframe.c (inside_entry_file, inside_main_func,
inside_entry_func):  Return 0 if no symbols; avoid crashing.
1992-06-05 18:52:27 +00:00
John Gilmore
2795260c9e * xcoffread.c (read_xcoff_symtab): Set c_sclass from n_sclass
without masking, since it is signed and will later be compared
against signed quantities.  The right fix is probably to make
it all unsigned, but this is a small, safe fix for this release.
FIXME -- make the real change sometime soon.

(Imported from progressive.)
1992-06-04 05:23:08 +00:00
Michael Tiemann
fb44a8f557 Pass the correct number of parameters to `symbol_file_add'. 1992-06-01 23:19:09 +00:00
Michael Tiemann
a748555bbb Define MALLOC_INCOMPATIBLE so we can compile files which include <malloc.h> 1992-06-01 23:17:21 +00:00
Michael Tiemann
48079d66da Fix lint found by GCC. 1992-05-30 05:19:54 +00:00