Commit Graph

867 Commits

Author SHA1 Message Date
K. Richard Pixley a113beac21 i386mach host/target/native separation 1992-10-16 22:57:36 +00:00
K. Richard Pixley d9548d448c go32 host/target/native separation 1992-10-16 22:49:35 +00:00
K. Richard Pixley e367cb3b50 added nm-m88k.h to HFILES 1992-10-16 20:56:05 +00:00
K. Richard Pixley 173a4f1bda m88k native support 1992-10-16 20:53:46 +00:00
John Gilmore f4cc0e9b3c * i386b-nat.c: Comment changes.
* nm-i386bsd.h, xm-i386bsd.h:  Split native dependent pieces out
into new nm-file.
* config/i386bsd.mh (NAT_FILE):  Point to new nm-file.
1992-10-16 11:37:58 +00:00
John Gilmore 2268d61946 Avoid longjmp()-catching compilation errors in cross-ports.
* doc/gdbint.texinfo:  Update GET_LONGJMP_TARGET, L_SET doc.
* irix4-nat.c, mips-nat.c (JB_ELEMENT_SIZE, get_longjmp_target):
Move from mips-tdep.c and tm-{irix3,mips}.h.
* mips-nat.c:  Remove a bunch of code that was ifdef'd out of
native MIPS ports.
* nm-irix3.h, nm-mips.h (GET_LONGJMP_TARGET):  Move from tm-irix3.h
and tm-mips.h.

* ultra3-nat.c (register_addr):  Move from ultra3-xdep.c.
(fetch_core_registers):  Fix bfd_seek arguments.
1992-10-16 10:47:34 +00:00
John Gilmore d5a66a8d05 Make core files work again on most hosts. 1992-10-16 10:14:47 +00:00
John Gilmore 62aa17e322 * config/decstation.mh, news.mh (NATDEPFILES): Add corelow.o.
* config/delta88.mt, m88k.mt (TDEPFILES):  Remove coredep.o, it's
native dependent.
1992-10-16 10:04:46 +00:00
K. Richard Pixley 6bf98ac01d ultra3 split 1992-10-16 06:05:36 +00:00
K. Richard Pixley b396595a9c add MEM_FNS_DECLARED 1992-10-16 04:55:14 +00:00
John Gilmore 327f7197b0 * Makefile.in (VERSION): Roll to 4.6.8.
(OBS):  Put version.o first, so Makefile rebuild happens early.

* command.h:  Publicize prototype for not_just_help_class_command.
* command.c:  Remove proto.
* maint.c:  Mark "mt" as an abbrev, to avoid duplicated help
output.  Move "maint info" from class info to class maintenance,
and improve text.
* infrun.c:  Move "stop" to class_obscure, and give it a
function so it will not be seen as a global help topic.  FIXME,
it should be possible to set these attributes independently.

* core.c (core_command):  Make nicer error message for no core support.
1992-10-15 13:42:10 +00:00
John Gilmore d5931d797d Lint around file_ptr's (bfd's off_t's) and bfd_seek.
* dbxread.c (read_dbx_symtab):  Use L_SET as bfd_seek arg.
(elfstab_build_psymtabs):  staboffset and stabstroffset args are
file_ptr's.
* dwarfread.c (struct dwfinfo):  Convert dbfoff, lnfoff to file_ptr.
(scan_compilation_units):  Punt unused filename arg.  dbfoff,
lnoffset, and curlnoffset are file_ptr's now.
(dwarf_build_psymtabs):  Drop desc and filename args; use
objfile.  dbfoff and lnoffset are file_ptr's now.
(read_ofile_symtab):  foffset is now file_ptr.  Use L_SET in bfd_seek.
* elfread.c (struct elfinfo):  dboffset and lnoffset are file_ptr's.
(elf_symfile_read):  Skip desc and filename args to
dwarf_build_psymtabs.  Pass file_ptr's to elfstab_build_psymtabs.
* gdb-stabs.h:  Use file_ptr rather than off_t.
* mipsread.c (fixup_symtab): f_ptr is a file_ptr.  Re-enable
compile-time debug check that someone turned off as "unused".
(read_the_mips_symtab):  st_filptr is a file_ptr.  Fix bfd_seek call.
* symfile.h:  Update dwarf_build_psymtabs and
elfstab_build_psymtabs prototypes.
* xcoffread.c (init_stringtab, init_lineno, xcoff_symfile_read):
Use file_ptr offsets.  bfd_seeks use L_SET.
1992-10-15 13:40:40 +00:00
Stu Grossman dac4929a6d * mips-tdep.c, mipsread.c, tm-mips.h: Get rid of ".gdbinfo."
symbol.  #define MIPS_EFI_SYMBOL_NAME instead.  Use different
value so that demangler won't be invoked.  This greatly speeds up
stepping.
* mips-tdep.c (mips_pop_frame):  Rewrite handling of
linked_proc_info so that it properly deallocates the appropriate
item after it is done with it instead of before.
* Don't pass bogus frame pointer to create_new_frame().  Just
leave it as zero so that lower level code will figure out the
correct value.
1992-10-15 08:36:30 +00:00
K. Richard Pixley 7536558918 sony news native support 1992-10-15 06:47:31 +00:00
K. Richard Pixley 170d4f55ba remove redundant include of sys/time.h. 1992-10-15 06:38:03 +00:00
K. Richard Pixley a6b98cb90a include ctype.h 1992-10-15 01:57:45 +00:00
John Gilmore 849d81e59f * config/news1000.mt: No longer needed, same as news.mt. 1992-10-13 08:30:26 +00:00
John Gilmore 358ca35ea4 Convert m68k entries to m68* entries to handle
all the various m68xxx hosts and targets.
1992-10-13 08:28:45 +00:00
K. Richard Pixley 601f15702e remove duplicate inftarg.o 1992-10-10 01:58:10 +00:00
Stu Grossman 47b7176b22 * Makefile.in (HFILES): Add all nm-irix3.h, nm-irix4.h,
nm-sun2.h, nm-mips.h.
1992-10-10 00:32:07 +00:00
Stu Grossman 3032863605 * config/irix3.mh (NATDEPFILES): nat-mips.o => mips-nat.o. 1992-10-09 23:11:25 +00:00
Stu Grossman a109657412 * Makefile.in (alldeps.mak): Add = sign after NATDEPFILES. 1992-10-09 23:01:11 +00:00
Stu Grossman 89f1a7df70 * config/bigmips.mh config/littlemips.mh: Remove mips-xdep.o.
Also add nm-irix3.h to .Sanitize, and remove references to .Sanitize from
ChangeLog.
1992-10-09 21:23:43 +00:00
Ian Lance Taylor b5ddc1014c Fri Oct 9 08:41:11 1992 Ian Lance Taylor (ian@cygnus.com)
* xm-hppah.h: if __STDC__ is not defined, define
	HPPA_COMPILER_BUG.
	symtab.c (decode_line_1): avoid a bug in the HP9000/700 native
	compiler; see the comment in the file.

Here's the comment from the file:
  /* FIXME: The native HP 9000/700 compiler has a bug which appears
     when optimizing this file with target i960-vxworks.  I haven't
     been able to construct a simple test case.  The problem is that
     in the second call to SKIP_PROLOGUE below, the compiler somehow
     does not realize that the statement val = find_pc_line (...) will
     change the values of the fields of val.  It extracts the elements
     into registers at the top of the block, and does not update the
     registers after the call to find_pc_line.  You can check this by
     inserting a printf at the end of find_pc_line to show what values
     it is returning for val.pc and val.end and another printf after
     the call to see what values the function actually got (remember,
     this is compiling with cc -O, with this patch removed).  You can
     also examine the assembly listing: search for the second call to
     skip_prologue; the LDO statement before the next call to
     find_pc_line loads the address of the structure which
     find_pc_line will return; if there is a LDW just before the LDO,
     which fetches an element of the structure, then the compiler
     still has the bug.  */
1992-10-09 15:49:16 +00:00
John Gilmore 0e35d2f37e First cut at support for all BSD variants on 386. 1992-10-09 11:55:05 +00:00
K. Richard Pixley 56e8942230 Sun2 native support (untested).
* xm-sun2.h (ATTACH_DETACH, FETCH_INFERIOR_REGISTERS,
  REGISTER_U_ADDR): removed to nm-sun2.h.
* nm-sun2.h: new file.
* config/sun2os[34].mh (XDEPFILES): infptrace.o inftarg.o
  fork-child.o sun3-xdep.o removed.
  (NAT_FILE, NATDEPFILES): new macros.
1992-10-09 08:20:47 +00:00
K. Richard Pixley a70dc8981b Mips native support. Decstation and iris4 have been tested.
Iris3 has not.

* mips-tdep.c (supply_gregset, fill_gregset, supply_fpregset,
  fill_fpregset): removed to irix4-nat.c
* mips-xdep.c: removed.
* irix4-nat.c, mips-nat.c, nm-irix3.h, nm-irix4.h, nm-mips.h: new
  files.
* procfs.c: include nm.h.
* xm-irix3.h (U_REGS_OFFSET, FETCH_INFERIOR_REGISTERS): removed.
* xm-irix4.h: bump copyright.
(U_REGS_OFFSET, FETCH_INFERIOR_REGISTERS, USE_PROC_FS,
PROC_NAME_FMT): removed.
* xm-mips.h (FETCH_INFERIOR_REGISTERS): removed.
* config/irix4.mh (XDEPFILES): removed procfs.o fork-child.o.
(NAT_FILE, NATDEPFILES): new macros for native support.
(CC): supply default compiler switches.
* config/irix3.mh (XDEPFILES): removed infptrace.o inftarg.o fork-child.o coredep.o.
(NAT_FILE, NATDEPFILES): new macros for native support.  Note that
irix3 is untested.
* config/decstation.mh (XDEPFILES): removed infptrace.o inftarg.o
  fork-child.o mips-xdep.o coredep.o.
  (NAT_FILE, NATDEPFILES): new macros for native support.
1992-10-09 07:59:37 +00:00
K. Richard Pixley 55ec69fb42 * config/rs6000.mh (XDEPFILES): removed fork-child.o.
(NATDEPFILES): added fork-child.o
* config/sun3os3.mh (XDEPFILES): removed fork-child.o.
(NATDEPFILES): added fork-child.o
* config/sun3os4.mh (XDEPFILES): removed fork-child.o.
(NATDEPFILES): added fork-child.o
1992-10-09 07:22:15 +00:00
John Gilmore 01ae50eb0e * infcmd.c (path_info): Avoid 250-char limit on printf_filtered,
by using puts_filtered instead.
1992-10-09 06:20:26 +00:00
Ken Raeburn 0256270d64 * remote-nindy.c (nindy_load): Replacement version from Steve
Chamberlain, doesn't require forking to run "strip" or "sx".
1992-10-09 04:51:32 +00:00
Stu Grossman e6c6137281 * Makefile.in (HFILES): Add nm-*.h files. 1992-10-09 01:29:17 +00:00
K. Richard Pixley dd6f869584 * config/sun4os4.mh (XDEPFILES): fork-child.o removed.
(NATDEPFILES): added fork-child.o.
1992-10-09 00:06:15 +00:00
K. Richard Pixley 968720bf25 * doc/gdbint.texinfo: document a few more macros, create new
section for native macros.
1992-10-08 23:29:35 +00:00
Stu Grossman 5413338bff * Makefile.in alldeps.mak depend: Rip out 29k/udi pending
resolution of copyright issues.
1992-10-08 20:54:37 +00:00
Stu Grossman 0da7012441 * Makefile.in (setup-to-dist): Remove -norecursion so that doc
subdir gets configured.

Bad John, bad...
1992-10-08 03:11:46 +00:00
Ken Raeburn 6a1f93f6a2 * Makefile.in (nindy.o): Define "STRIP" as pathname of strip program.
* nindy-share/nindy.c (coffstrip): Use that pathname, instead of searching for
a "bfd_strip" program.  Also, fixed up arguments passed to that program.

* tm-nindy960.h (ADDITIONAL_OPTIONS): Use "-ser" rather than "-r", which is now
used for something else.  Rewrite description of associated parameters to match
how gdb does it now.
(ADDITIONAL_OPTION_HELP): Fix message accordingly.

* m68k-pinsn.c (print_insn_arg): Handle new "`" operand type.
1992-10-08 02:09:28 +00:00
K. Richard Pixley 3950a34e45 NOTICE_SIGNAL_HANDLING_CHANGE macro added to the target vector as
to_notice_signals.

* inferior.h (proc_signal_handling_change): prototype removed.
* infrun.c (NOTICE_SIGNAL_HANDLING_CHANGE): default removed.
(handle_command): now calls target_notice_signals.
* procfs.c (proc_signal_handling_change): renamed to
  procfs_notice_signals.  Now static.  Add prototype.  All callers
  changed.
* target.h (struct target_ops): new field, to_notice_signals.
(target_notice_signals): new macro to cover new field.
* target.c (cleanup_target): default to_notice_signals to ignore.
* corelow.c (core_ops),
exec.c (exec_ops),
inftarg.c (child_ops),
procfs.c (procfs_ops),
remote-adapt.c (adapt-ops),
remote-eb.c (eb_ops),
remote-es1800.c (es1800_ops, es1800_child_ops),
remote-hms.c (hms_ops),
remote-mm.c (mm_ops),
remote-nindy.c (nindy_ops),
remote-st2000.c (st2000_ops),
remote-udi.c (udi_ops),
remote-vx.c (vx_ops, vx_run_ops),
remote.c (remote_ops),
target.c (dummy_target),
xcoffexec.c (exec_ops): added static initializer for
to_notice_signals.
* xm-irix4.h, xm-sysv4.h (NOTICE_SIGNAL_HANDLING_CHANGE): removed.
1992-10-06 22:54:57 +00:00
John Gilmore 06e4d12d79 * main.c (define_command): Add forgotten initializer. 1992-10-06 19:14:18 +00:00
John Gilmore b5af69c336 * language.c, language.h: Move saved_language out to global
expected_language.  Set expected_language when user expectation
changes.
* language.c (language_info):  Don't print type/range checking gub.
* main.c (main):  Set expected language.
(execute_command):  Check against expected language.
* symfile.c (set_initial_language):  Set expected language.
1992-10-06 09:33:15 +00:00
John Gilmore 48ab6c0e1d Solaris-x86 early trial 1992-10-06 09:29:24 +00:00
John Gilmore 94603999f9 A bunch of changes mostly to improve debugging of C++ programs.
Specifically, the calling of inferiors methods is improved.

	* value.h:  New macros METHOD_PTR_IS_VIRTUAL,
	METHOD_PTR_FROM_VOFFSET, METHOD_PTR_TO_VOFFSET to partially
	hide the implementation details of pointer-to-method objects.
	How to tell if the pointer points to a virtual method is
	still very dependent on the particular compiler, but this
	should make it easier to find the places to change.
	* eval.c (evaluate_subexp [case OP_FUNCALL]), valprint.c
	(val_print [case TYPE_CODE_PTR]):  Use the new METHOD_PTR_*
	macros, instead of a hard-wired-in code that incorrectly
	assumed a no-longerused representation of pointer-to-method
	values.  And otherwise fix the relevant bit-rotted code.

	* valprint.c (type_print_base [case TYPE_CODE_STRUCT]):
	If there are both fields and methods, put a space between.

	* stabsread.c (read_struct_type):  Fix bug in handling of
	GNU C++ anonymous type (indicated by CPLUS_MARKER followed
	by '_').  (It used to prematurely exit the loop reading in
	the fields, so it would think it should start reading
	methods while still in the fields.  This could crash gdb
	given a gcc that can emit nested type information.)

	* valops.c (search_struct_method):  Pass 'this' value by
	reference instead of by value.  This provides a more
	consistent interface through a recursive search where the
	"bottom" functions may need to adjust offsets (due to multiple
	inheritance).
	* valops.c, value.h, values.c:  Pass extra parameters to
	value_fn_field and value_virtual_fn_field so we can
	correctly adjust offset for multiple inheritance.
	* eval.c (evaluate_subexp [case OP_FUNCALL]):  Simplify
	virtual function calls by using value_virtual_fn_field().
	* values.c: New function baseclass_offset, derived from
	baseclass_addr (which perhaps can be made obsolete?).
	It returns an offset rather than an address.  This is a
	cleaner interface since it doesn't mess around allocating
	new values.
	* valops.c (search_struct_method):  Use baseclass_offset
	rather than baseclass_addr.
1992-10-06 09:22:43 +00:00
Stu Grossman aa1dea489b * Makefile.in: Re-install 29K/UDI stuff.
* remote-udi.c (udi_resume):  Clean up.
* (udi_wait):  Rewrite, leave out bugs.
* Add debugging code to print out all register fetches and stores.
* Straighten out target_ops.
* tm-29k.h (DUMMY_FRAME_RSIZE):  Pad out to doubleword.
1992-10-05 23:19:59 +00:00
Ian Lance Taylor 5d5a9c3ccb Mon Oct 5 09:46:44 1992 Ian Lance Taylor (ian@cygnus.com)
* remote-udi.c (udi_create_inferior): run with no arguments should
	not pass the program name as an argument, since the UDI code
	already handles that.
	(udi_load): get the symbols from prog_name, not arg_string (the
	load command should really use arg_string as the program name, not
	prog_name, but at least the run command works now).
1992-10-05 21:03:18 +00:00
Ian Lance Taylor 9191286471 Mon Oct 5 09:46:44 1992 Ian Lance Taylor (ian@cygnus.com)
* munch: HP9000/300 nm puts an etra space between T and symbol
	name.
1992-10-05 20:57:33 +00:00
Ian Lance Taylor e661aaae1d Mon Oct 5 09:46:44 1992 Ian Lance Taylor (ian@cygnus.com)
* config/irix4.mh: added -lsun to XM_CLIBS to get RPC functions
	needed for vxworks targets.
1992-10-05 16:49:13 +00:00
John Gilmore 34517ebc85 Changes to make 29k function calls work better at Adobe.
* am29k-tdep.c (_initialize_29k):  Make it possible for the
user to set and query the address where function calls into the
inferior write a small scratch routine.  `set call_scratch_address'
* inferior.h (PC_IN_CALL_DUMMY):  Fix fencepost error.
* remote.c (remote_prepare_to_store): Only fetch regs if they are
not already cached validly.
1992-10-03 05:28:42 +00:00
K. Richard Pixley ef6f3a8b1f Rs6000 native support.
* infptrace.c: remove #ifdef USG from around include ptrace.h.
  machines without this header should not be compiling this file.
* nm-rs6000.h, rs6000-nat.c: new files for native support.
* rs6000-tdep.c: do not include sys/ptrace.h or sys/reg.h.
* rs6000-xdep.c: removed.  all code now in rs6000-nat.c.
* xm-rs6000.h: do not include ptrace.h.
  (ATTACH_DETACH, FETCH_INFERIOR_REGISTERS): moved to nm-rs6000.h.
* config/rs6000.mh (XDEPFILES): removed rs6000-xdep.o.
  infptrace.o and inftarg.o move to NATDEPFIES.
  (NAT_FILE, NATDEPFILES): new macro for native support.
1992-10-02 05:50:17 +00:00
K. Richard Pixley 93282e6139 Sun3 native support.
* config/sun3os3.mh, config/sun3os4.mh (NAT_FILE, NATDEPFILES):
  new macros for native support.
  (XDEPFILES): moved infptrace.o and inftarg.o to NATDEPFILES,
  removed sun3-xdep.o.
* xm-sun3.h (ATTACH_DETACH, FETCH_INFERIOR_REGISTERS): moved to
  nm-sun3.h.
* sun3-xdep.c: removed.  All code is now in sun3-nat.c.
* sun3-nat.c, nm-sun3.h: new files for native support.
1992-10-01 22:44:25 +00:00
John Gilmore a65841d768 Add `command hooks' and a hook for inferior program stopping.
* command.h (struct cmd_list_element):  Remove unused `aux'
field.  Add new `hook', `hookee', and `cmd_pointer' fields.
* command.c (add_cmd):  Initialize new fields, elim old.
(add_alias_cmd):  Clone new fields.
(delete_cmd):  Un-hook hookee if we're deleting hook.
(help_cmd):  Tell user the command is hooked, if it is.
(lookup_cmd_1):  Abbreviations return the original command
instead of themselves, so that hooks on the original cmd will be
run.
* defs.h (enum command_class):  Add class_pseudo and comments.
* gdbcmd.h (execute_user_command):  Add prototype.
* infrun.c (normal_stop):  If the stop command is hooked,
run the hook whenever we stop.
(hook_stop_stub):  Stub for catch_errors.
(_initialize_infrun):  Set up pseudo "stop" command.
* main.c (execute_user_command):  Code extracted from execute_command.
(execute_command):  If hooked, run the hook before the command.
(define_command):  If defining a new hook, check the command it
is hooking, and warn if none.  Install the hook.
* source.c (_initialize_source):  "l" is an abbrev for "list".
* doc/gdb.texinfo:  Document command hooks.

* Makefile.in (VERSION):  Roll to 4.6.7.
* config/sun4os4.mh:  Remove dup inftarg.o from NATDEPFILES.
* infrun.c (breakpoints_inserted):  Make it static again.
* tm-symmetry.h (FLOAT_INFO):  #if 0 it for cross-ptrace abuse.
1992-10-01 09:57:36 +00:00
K. Richard Pixley 9c14e78d73 missed a ChangeLog entry 1992-09-30 22:40:17 +00:00
K. Richard Pixley dfc8261766 Native file renaming.
* nat-sparc.c -> sparc-nat.c
* nat-sun4os4.h -> nm-sun4os4.h
* nat-trash.h -> nm-trash.h
* configure.in: link to nm.h rather than nat.h.
* infptrace.c: include nm.h rather than nat.h.
1992-09-30 22:39:02 +00:00
K. Richard Pixley c9c2341230 Host/target/native split for sun4.
* Makefile.in (TSOBS): removed corelow.o.
* infptrace.c: included nat.h.
* nat-trash.h: temporary header file.  This should be removed once
  all hosts have the native/host/target split.
* configure.in: add a symlink from nat-trash.h to nat.h if no
  other nat file exists for this configuration.
* sparc-tdep.c: no longer include sys/ptrace.h.
* sparc-xdep.c: removed.  contents have been moved to nat-sparc.c.
* xm-sparc.h (ATTACH_DETACH, FETCH_INFERIOR_REGISTERS): moved to
  nat-sun4os4.h.
* nat-sparc.c, nat-sun4os4.h: new files for sun4 native support.
* config/sun4os4.mh (XDEPFILES): moved infptrace.o and inftarg.o
  to NATDEPFILES.  removed sparc-xdep.o.
  (NATDEPFILES, NAT_FILE): new macros for native support.
1992-09-30 02:03:24 +00:00
K. Richard Pixley df9b3bfc4c Break the direct connection from core_file_command to any
particular type of core file support.

* target.h (find_core_target): new prototype.
* target.c (find_core_target): new function.  Walks the target
  list looking for the core target.
* core.c (core_file_command): replace calls to core_detach and
  core_open with find_core_target and direct calls.
1992-09-29 21:51:16 +00:00
Ian Lance Taylor be891e75a3 Tue Sep 29 10:19:00 1992 Ian Lance Taylor (ian@cygnus.com)
* xm-hp300hpux.h: define MEM_FNS_DECLARED; include <sys/ptrace.h>
	for infptrace.c.
	config/hp300hpux.mh: ALLOCA1 was not defined.
1992-09-29 17:43:35 +00:00
Stu Grossman 597dc86b1b * breakpoint.c, exec.c, language.c, main.c, printcmd.c, symfile.c,
target.c, valprint.c:  Use unfiltered forms of f/printf, et. al.
until we can figure out a better way to do paging.
1992-09-29 05:07:30 +00:00
John Gilmore e0ba1d1427 * findvar.c (supply_register): Add CLEAN_UP_REGISTER_VALUE hook.
* tm-hppa.h (CLEAN_UP_REGISTER_VALUE):  Use it.
* hppa-coredep.c:  Remove, now that we use the hook.
* config/hppab.mh, config/hppah.mh:  Use standard coredep.o.
* hppab-xdep.c, hppah-xdep.c:  Remove custom code, use hook.

* dbxread.c, partial-stab.h:  Replace all #ifdef hp9000s800's with
GDB_TARGET_IS_HPPA's.  This is a SERIOUS KLUDGE.  The code needs to all
be ripped out and reimplemented right (see elfread.c).
* tm-hppa.h (GDB_TARGET_IS_HPPA):  Define.
1992-09-26 10:24:26 +00:00
John Gilmore 3fbdd5366e Make the /proc support a target-struct in its own right.
* inferior.h (proc_wait, inferior_proc_init, proc_set_exec_trap):
No longer global functions.
(fork_inferior):  New global function from fork-child.c.
* inftarg.c (child_wait):  Remove USE_PROC_FS conditional.
(ptrace_me, ptrace_him):  New stub functions for fork_inferior().
(child_create_inferior):  Moved to fork-child.c as fork_inferior.
(child_create_inferior):  New tiny function that calls fork_inferior.
* fork-child.c:  New file, containing fork_inferior, which is
built from slight mods to inftarg.c's child_create_inferior.

* procfs.c (procfs_ops):  Add target vector.
(attach):  Rename as static do_attach.
(procfs_create_inferior):  New tiny function that calls fork_inferior.
(child_xfer_memory):  Rename to static procfs_xfer_memory.
(store_inferior_registers):  Rename to static procfs_store_registers.
(inferior_proc_init):  Rename to static procfs_init_inferior.
(procfs_attach, procfs_detach, procfs_prepare_to_store,
procfs_files_info, procfs_open, procfs_mourn_inferior,
procfs_can_run):  Slightly mangled copies of the corresponding
child_XXX routines from inftarg.c.
(proc_wait):  Renamed to static procfs_wait.
(child_resume):  Rename to static procfs_resume.
(fetch_inferior_registers):  Rename to static procfs_fetch_registers.
(initialize_proc_fs):  Rename to initialize_procfs.  Set up
procfs_ops, too.
* xm-irix4.h, xm-sysv4.h (CREATE_INFERIOR_HOOK):  No longer needed.
1992-09-26 09:06:30 +00:00
John Gilmore b3d4dd73c3 * Makefile.in: Remove inftarg.[co], since it is now included via
config/*.mh files.
* config/*.mh:  Add inftarg.o and fork-child.o to all *.mh that
reference infptrace.o.  Add fork-child.o to all *.mh that
reference procfs.o.
1992-09-26 08:06:45 +00:00
John Gilmore a5a7c719fc Lint 1992-09-26 05:34:14 +00:00
John Gilmore 836e343b01 Split non-target-dependent code out of target_attach routines.
* target.h:  Comments on target_attach args and results.
* infcmd.c (attach_command): Check for existing execution, call
target_attach, set up terminal status and wait_for_inferior, wait
for the attach status, and do normal_stop.
* inftarg.c (child_attach):  Remove target independent stuff.
* remote-adapt.c (adapt_attach):  Ditto.
* remote-mm.c (mm_attach):  Ditto.
* remote-udi.c (udi_attach):  Ditto.
* remote-vx.c (vx_attach):  Ditto.

Cleanup.

* remote-hms.c (hms_attach):  Remove completely, it was useless.
* remote-mm.c, remote-hms.c, remote-udi.c, remote-adapt.c:  Remove
commented-out start_remote calls.
* remote-hms.c, remote-adapt.c, remote-mm.c, remote-udi.c: Remove
DENTER and DEXIT macros and their calls.  Use a real debugger --
like gdb -- to see what functions are being called when.
1992-09-26 05:20:24 +00:00
John Gilmore 3aa6856ae8 * infrun.c, inftarg.c, inferior.h: Comment and lint cleanups. 1992-09-26 01:49:18 +00:00
Stu Grossman 1aed676612 * tm-sparc.h, dbxread.c (read_ofile_symtab): Install Jim Wilson's
fix to differentiate between gcc1 & gcc2 compiled files so that we
can debug calls that pass structs as args correctly.
* symmisc.c (dump_symtab):  If block was compiled with gcc, say
so, and what version.
1992-09-25 22:59:27 +00:00
Stu Grossman b869d3f47f * remote.c (remote_wait): Make regs be char to avoid picayune
ANSI compiler warnings.

* energize.h:  Move all external struct decls to inside of
__STDC__, add prototype for energize_shell_wait().
* energize.c (getpty):  Clean up, make us really get a controlling
terminal.
* (energize_initialize):  Disable SIGIO prior to setting up for
I/O interrupts.  Move setsid(), et. al. to getpty().
* (energize_shell_wait):  New routine to wait for things started
via the shell command, uses wait() instead of /dev/proc.
* Also, add prototype for execute_command_1().
1992-09-25 22:23:54 +00:00
K. Richard Pixley 310cc57043 * inftarg.c (child_create_inferior, child_attach,
child_mourn_inferior): collect unix child process stratum
	  functions which live below the target vector into this file to
	  facilitate host/target/native split.  Also, make them static.
	* inflow.c (child_mourn_inferior): removed.
	* infrun.c (child_create_inferior, child_attach): removed.
	  (resume): becomes global so that functions below the
	  target vector can find it.
	* inferior.h (resume): add prototype.
	  (child_mourn_inferior, child_create_inferior, child_attach):
	  remove prototypes.
1992-09-25 19:19:08 +00:00
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