Stu Grossman [Wed, 23 Sep 1992 18:19:19 +0000 (18:19 +0000)]
* 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.
* obj-coffbfd.c (do_relocs_for,fill_section): now allocate all
sections starting from zero, rather than making them consecutive.
This makes subsequent reloc calculations easier, esp if the
object format doesn't understand addends. (obj_coff_lcomm): (maybe
temporarily) allocate lcomm in .data rather than in .bss. It
seems that some tools can't cope with a non-zero sized bss
before linkage.
John Gilmore [Tue, 22 Sep 1992 07:23:35 +0000 (07:23 +0000)]
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.
* 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.
Fred Fish [Sun, 20 Sep 1992 15:45:52 +0000 (15:45 +0000)]
* 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.
Fred Fish [Sat, 19 Sep 1992 16:55:34 +0000 (16:55 +0000)]
* 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.
John Gilmore [Sat, 19 Sep 1992 12:08:23 +0000 (12:08 +0000)]
* 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.
John Gilmore [Sat, 19 Sep 1992 11:25:52 +0000 (11:25 +0000)]
* Makefile.in: Fix bug I introduced in merging Rich's change.
* infrun.c (child_create_inferior): Use proceed() rather than
doing all the same stuff by hand.
John Gilmore [Fri, 18 Sep 1992 09:21:44 +0000 (09:21 +0000)]
* 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!
John Gilmore [Fri, 18 Sep 1992 09:20:15 +0000 (09:20 +0000)]
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.
John Gilmore [Fri, 18 Sep 1992 08:09:25 +0000 (08:09 +0000)]
* 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.
John Gilmore [Fri, 18 Sep 1992 07:40:15 +0000 (07:40 +0000)]
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.
John Gilmore [Fri, 18 Sep 1992 07:06:38 +0000 (07:06 +0000)]
* 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
John Gilmore [Fri, 18 Sep 1992 06:59:58 +0000 (06:59 +0000)]
Changes to make the gdb.tar.Z rule work better.
* Makefile.in (GDB_SUPPORT_DIRS): Add opcodes.
(DEVO_SUPPORT): Add configure.texi.
(bfd-ilrt.tar.Z): Remove ancient rule.
Mark Eichin [Fri, 18 Sep 1992 06:16:37 +0000 (06:16 +0000)]
from p3. Some shells leave PWD in the environment (old tcsh, ksh at least)
screws nested configures. "unset PWD" is the right answer, except that
Decstation sh doesn't *have* unset.
Note also that the send-pr build will fail if you have PWD in your
environment, because emacs also (foolishly) trusts it.
* configure: just set PWD=`pwd` at the top, since Ultrix sh
doesn't have unset and all success paths (and most error paths)
out set it anyway. (Note: should change all uses of ${PWD=`pwd`}
to just ${PWD} to avoid confusion.)
John Gilmore [Thu, 17 Sep 1992 11:02:44 +0000 (11:02 +0000)]
* copying.awk, copying.c (show_copying_command,
show_warranty_command): Rename from copying_info, warranty_info,
to match command function conventions.
John Gilmore [Thu, 17 Sep 1992 10:58:53 +0000 (10:58 +0000)]
* 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.
Stu Grossman [Thu, 17 Sep 1992 05:01:51 +0000 (05:01 +0000)]
* 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...
Jim Wilson [Tue, 15 Sep 1992 19:55:26 +0000 (19:55 +0000)]
In brx macro, check for XCC bit set in xcc insns, and not set in icc insns.
In cond macro, do brx before br, to avoid getting extra symbol table entries
due to failed pattern matches.
Stu Grossman [Tue, 15 Sep 1992 07:12:52 +0000 (07:12 +0000)]
* 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.
Stu Grossman [Tue, 15 Sep 1992 06:27:18 +0000 (06:27 +0000)]
* 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.
Stu Grossman [Tue, 15 Sep 1992 04:50:46 +0000 (04:50 +0000)]
* 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.
* Added WARN_SIGNED_OVERFLOW_WORD define to give an error if any
.word is < -32768 or > 32767. The -J flag causes the error to be
ignored. This is to catch over-sized switches generated by gcc on
systems which don't support the broken .word hack.
as.c (main): permit -J if WARN_SIGNED_OVERFLOW_WORD.
write.c (fixup_segment): check for signed .word overflow if
WARN_SIGNED_OVERFLOW_WORD.
Roland Pesch [Sat, 12 Sep 1992 05:27:40 +0000 (05:27 +0000)]
* doc/gdb.texinfo, doc/gdbinv-m.m4.in, doc/gdbinv-s.m4.in: first
pass at doc for two new remote targets---29K using UDI, and Tandem
ST2000 using STDBUG.
* doc/all.m4, doc/none.m4: new m4 switch, _ST2000__
* doc/all.m4: turn on H8/300 stuff for generic manual
* coffcode.h (coff_renumber_symbols): set the last renumbered
symbol pointer to NULL, as expected by coff_write_linenumbers.
(coff_write_relocs): apparently a non-zero addend is OK for reloc
type R_IHCONST used on the 29k.
John Gilmore [Fri, 11 Sep 1992 09:11:11 +0000 (09:11 +0000)]
* 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.
John Gilmore [Fri, 11 Sep 1992 09:08:28 +0000 (09:08 +0000)]
* mips-xdep.c (REGISTER_PTRACE_ADDR, fetch_inferior_registers,
store_inferior_registers): Replace unexplained numbers
with manifest constants from a DECstation header file.
* 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.
John Gilmore [Thu, 10 Sep 1992 20:31:10 +0000 (20:31 +0000)]
* opncls.c (bfd_fdopenr): Determine whether to fdopen for
update, based on how the underlying file was opened. Obsoletes
FASCIST_FDOPEN.
* hosts/rs6000.h, hosts/tahoe.h, hosts/vaxbsd.h: Remove
all FASCIST_FDOPEN config defines.