Commit graph

1835 commits

Author SHA1 Message Date
Jim Kingdon
87cd094b7c * main.c: Add variables source_line_number, source_file_name,
source_error, source_error_allocated, and source_pre_error.
	(command_line_input): If source_file_name set, increment
	source_line_number and set error_pre_print with them.
	(source_command): Set source_* and make a cleanup so they get
	set back.
1993-11-03 16:20:02 +00:00
Jim Kingdon
4f9834005e * stack.c (down_silently_command): Add comment about PR 1913. 1993-11-03 02:23:10 +00:00
Jim Kingdon
4142aab89d * breakpoint.c (insert_breakpoints, delete_breakpoint): Call
target_terminal_ours_for_output before attempting output.

	* fork-child.c (fork_inferior): Fix comment so that it suggests
	"set shell" rather than having "set env SHELL" affect GDB's
	operation.
1993-11-02 23:55:19 +00:00
Peter Schauer
ad09cb2bd3 * findvar.c (value_of_register, value_from_register),
hppa-tdep.c (pa_print_fp_reg), infcmd.c (do_registers_info),
	valops.c (value_assign):   Use REGISTER_CONVERT_TO_* only if
	REGISTER_CONVERTIBLE is defined, otherwise just copy the content.
	Pass desired type to REGISTER_CONVERT_TO_*.

	* config/m68k/tm-m68k.h, config/i960/tm-i960.h (REGISTER_CONVERT_*):
	Pass length of desired type to store/extract_floating.
	* config/i386/tm-arm.h, config/i386/tm-i386aix.h,
	config/i386/tm-sun386.h, config/i386/tm-symmetry.h,
	config/m88k/tm-m88k.h config/rs6000/tm-rs6000.h (REGISTER_CONVERT_*):
	Use extract_floating and store_floating with length of desired type.
	* config/m68k/tm-news.h (STORE,EXTRACT_RETURN_VALUE):  Add type
	parameter to REGISTER_CONVERT_*.

	* config/a29k/tm-a29k.h, config/convex/tm-convex.h,
	config/gould/tm-np1.h, config/gould/tm-pn.h, config/h8300/tm-h8300.h,
	config/h8500/tm-h8500.h, config/i386/tm-i386v.h,
	config/mips/tm-mips.h, config/ns32k/tm-merlin.h,
	config/ns32k/tm-umax.h, config/pa/tm-hppa.h, config/pyr/tm-pyr.h,
	config/sh/tm-sh.h, config/sparc/tm-sparc.h, config/tahoe/tm-tahoe.h,
	config/vax/tm-vax.h, config/z8k/tm-z8k.h (REGISTER_CONVERTIBLE,
	REGISTER_CONVERT_TO_RAW, REGISTER_CONVERT_TO_VIRTUAL):  Remove
	versions for which REGISTER_CONVERTIBLE is always false.
	* z8k-tdep.c (register_convert_to_virtual, register_convert_to_raw):
	Remove, no longer used.

	* alpha-tdep.c (alpha_register_convert_to_raw,
	alpha_register_convert_to_virtual):  New routines to handle
	the different raw formats in alpha floating point registers.
	* config/alpha/tm-alpha.h (REGISTER_CONVERTIBLE,
	REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW):  Use them.
1993-11-02 21:51:10 +00:00
Jim Kingdon
b86a1b3baa * symtab.c, symtab.h, source.c: Change find_line_pc_range to take
a struct symtab_and_line argument, rather than a symtab and a line.
	Re-write it to be based on the address rather than bogusly adding
	one to the line number and hoping that has something to do with the
	end of the line.
1993-11-02 00:05:34 +00:00
Thomas Lord
199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +00:00
Jim Kingdon
d566fd91cf * config/m88k/m88k.mh (NATDEPFILES): Remove exec.o. 1993-11-01 21:11:12 +00:00
Jim Kingdon
3fd4045fdb * paread.c (pa_symtab_read): Change comments to say ignoring
labels really should be handled by the assembler/compiler.

	* Makefile.in: Add -O to CXXFLAGS.

	* TODO: Expand comments on fast watchpoints.
1993-11-01 20:41:35 +00:00
Jeff Law
5c08b47f03 * paread.c (pa_symtab_read): Also filter out local symbols starting
with "L$".
1993-11-01 03:46:30 +00:00
Jim Kingdon
0eed42deee * symfile.h (sym_fns), symfile.c (find_sym_fns), xcoffread.c,
coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c:
	Change from using bfd target name to using the flavour.
1993-10-31 18:54:28 +00:00
Jim Kingdon
f6c4bf1a82 * objfiles.h, infcmd.c, symfile.c: Add comments about how various
objfiles get created and when we should blow them away.
1993-10-31 15:46:34 +00:00
Jim Kingdon
4d57c5995e * symfile.c (reread_symbols): When re-reading symbols, do all the
right operations ourself, rather than calling symbol_file_command.
	If we re-read something, call clear_symtab_users not just
	breakpoint_re_set.
	* objfiles.h, objfiles.c (build_objfile_section_table): No longer
	static.
	* symfile.c (clear_symtab_users): Call clear_pc_function_cache.
	* coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c
	(*_symfile_offsets): Set objfile->num_sections.
	* remote.c (remote_wait), symfile.c (syms_from_objfile):
	Don't muck with objfile->num_sections now that all the symbol
	readers set it.
	* elfread.c: Clean up obsolete comment about handling only DWARF.
	* paread.c: Remove comment about how we should use an "ordinary"
	file format with an hppa suffix.  There is nothing ordinary about SOM.
1993-10-30 20:21:19 +00:00
Stan Shebs
9bebe50081 More LynxOS support 1993-10-30 00:16:25 +00:00
Jim Kingdon
bf5c0d6448 * defs.h, findvar.c (extract_floating, store_floating): New functions.
* Move SWAP_TARGET_AND_HOST from defs.h to findvar.c because it is
	now used only by extract_floating and store_floating.
	* valprint.c (print_floating): Use unsigned arithmetic.  Use
	extract_unsigned_integer instead of SWAP_TARGET_AND_HOST.
	Change sizeof (float) to 4 and sizeof (double) to 8 (those are always
	the relevant sizes for this code, which is in #ifdef IEEE_FLOAT).
	* values.c (unpack_long, unpack_double, value_from_double),
	valarith.c (value_binop), stabsread.c (define_symbol):
	Use extract_floating and store_floating instead of
	SWAP_TARGET_AND_HOST.
	* config/m68k/tm-m68k.h, config/i960/tm-i960.h (REGISTER_CONVERT_*):
	Use extract_floating and store_floating.
	* config/m88k/tm-m88k.h: Add comments (it should be doing the same).
	* i386-tdep.c (i386_extract_return_value),
	* remote-nindy.c (nindy_store_registers): Use store_floating.
1993-10-29 18:16:33 +00:00
Steve Chamberlain
3beff94ec2 * remote-sim.c (gdbsim_store_register): Change var name so
it compiles with non-ANSI compilers.
1993-10-29 16:35:22 +00:00
Jim Kingdon
ce31a796fd * TODO: Add idea for "disassemble" with source. 1993-10-29 13:16:56 +00:00
Fred Fish
34ec93be19 * Makefile.in (VERSION): Bump to 4.11.1 after release and cvs
tagging.
1993-10-29 07:42:30 +00:00
Jim Kingdon
4a44dc1ac2 * TODO: Add section on Mach. Stop calling it a "bug list".
Remove John's name and email address.  Remove item on "always"
	("hook-stop" takes care of this).  Remove item on executables with
	no symbols (this works on some machines, at least).  Remove item
	about calling error() during symbol reading (I think all the important
	ones have been cleaned up).  Revise items about signals and remote
	systems.  Remove section on ^Z requiring several continues to make
	it go (this now works.  Perhaps the item is based on confusion over
	programs (like GDB itself) which catch SIGTSTP and then re-send
	themselves the signal.  PR 2575 might contain relevant info).
1993-10-29 01:29:21 +00:00
Fred Fish
617b4ae8c7 * NEWS: Note improvements in C++ support, preliminary thread
implementation, and LynxOS native and target support for 386.
1993-10-29 00:52:25 +00:00
Fred Fish
4904384232 * README: Add note from Peter Schauer about OSF/1 shared
libraries.  Add note from Pace Willisson about configuring on BSDI
	BSD/386 release 1.0.  Update gdb references to gdb 4.11.
1993-10-29 00:24:56 +00:00
Jim Kingdon
803f7af5d2 * NEWS: Add notes about Alpha and "set remotedebug" for UDI. 1993-10-28 21:25:31 +00:00
Jim Kingdon
4d52ec8623 * valops.c (value_assign): Change bitfield code to use a buffer of
the correct size, rather than an int.
1993-10-28 14:27:39 +00:00
Jim Kingdon
cfe5ad2d03 * config/i386/{i386m3.mt,i386m3.mh}: Use correct names for TM_FILE
and XM_FILE.  Replace host file i386mach3-xdep.o with native file
	i386m3-nat.o.
1993-10-27 22:06:52 +00:00
Jim Kingdon
b10f4dd977 * remote-udi.c: Remove LOG_FILE stuff; superceded by "set remotedebug".
* remote-mon.c: Remove commented out "set remotedebug" command.
	* remote-nindy.c: Clean up comment about wanting alternative to
	options specified on the GDB command line.
1993-10-27 20:35:25 +00:00
Jim Kingdon
bc28a06cc1 * fork-child.c (fork_inferior): Set inferior_pid before calling
init_trace_fun.  Move the code which gets us through the shell
	to new function startup_inferior.
	* inferior.h: Declare startup_inferior.
	* procfs.c (procfs_init_inferior), inftarg.c (ptrace_him):
	Call startup_inferior.
	* m3-nat.c (m3_trace_him): Call intercept_exec_calls.
	* config/nm-m3.h: Don't define STARTUP_INFERIOR.
	* config/i386/tm-i386m3.h, config/ns32k/tm-ns32k.h,
	config/mips/tm-mipsm3.h: Don't define START_INFERIOR_TRAPS_EXPECTED.
1993-10-27 19:30:27 +00:00
Jim Kingdon
73e7e44744 * m68k-stub.c: Change vector 13 from SIGFPE to SIGBUS. 1993-10-27 18:48:50 +00:00
Jim Kingdon
981ef35e01 * mips-tdep.c (mips_pop_frame): If proc_desc is NULL, don't dump core. 1993-10-27 05:21:01 +00:00
Jim Kingdon
6a6fe3dbde gcc -Wall lint:
* nlmread.c: Include stabsread.h.
	* Makefile.in: Update dependencies.
1993-10-26 22:16:07 +00:00
Jim Kingdon
f3d86961e4 * remote.c: Change PBUFSIZ back to 400. John's 28 Feb 1992 change
to increase it broke the ability to write large chunks of memory
	with m68k-stub and i386-stub.  Now we only use more than 400 on
	machines where we need that much to write the registers.
	* remote.c (remote_write_bytes): Eliminate possible abort().  The
	check for when to abort was off by a few bytes and besides which,
	it is handled by MAXBUFBYTES, which the caller uses.
	* m68k-stub.c: Add comments about trap #1 and trap #8 instructions.
1993-10-26 20:41:35 +00:00
David Edelsohn
c7efaa16dc * remote-sim.h (SIM_ADDR): New type (same as CORE_ADDR).
(sim_set_pc): Update prototype.
(sim_read, sim_write): Ditto, and use unsigned char *buf.
(sim_fetch_register, sim_store_register): Use unsigned char *buf.
(sim_info): Pass printf function as argument, add verbose argument.
(sim_stop_reason): Renamed from sim_stop_signal, fix prototype.
* remote-sim.c (gdbsim_wait): Update call to sim_stop_reason.
(gdbsim_files_info): Update call to sim_info.
1993-10-26 16:34:01 +00:00
Jim Kingdon
79971d11cc * valops.c (value_assign): Call reinit_frame_cache when assigning
to a register.
1993-10-26 15:49:39 +00:00
Stu Grossman
2cdce841c4 * infrun.c (wait_for_inferior): Fix PC out of objfile bounds
check to just use stop_func_name == 0.
1993-10-26 01:13:28 +00:00
Stu Grossman
b58a197344 * infrun.c (wait_for_inferior): Fix PC out of subroutine bounds
check to use prev_func_start/end instead of stop_func_start/end.
	* remote-udi.c (store_register):  Invalidate NPC/PC_REGNUM after
	changing PC.
1993-10-25 22:24:02 +00:00
Jim Kingdon
a6e0dae9c3 * gdbserver/{low-lynx.c,low-sparc.c,low-sun3.c}, standalone.c,
m3-nat.c, i386m3-nat.c, mipsm3-nat.c, ns32km3-nat.c: bcopy -> memcpy.
1993-10-25 21:15:53 +00:00
Jim Kingdon
dfbb7762a5 gcc -Wall lint:
* breakpoint.c: Include thread.h.
	* coffread.c: Include stabsread.h.
	* Makefile.in: Update dependencies.
	* breakpoint.c (mention): Add bp_call_dummy to switch.
	* symmisc.c (dump_symtab): Use %d not %ld for line number.
1993-10-25 20:20:15 +00:00
Fred Fish
60d7eacecb Remove incorrect comment about SEC_HAS_CONTENTS not getting set. 1993-10-25 14:38:38 +00:00
Jim Kingdon
abe28b9214 Sun Oct 24 20:16:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* parse.c, parser-defs.h (write_exp_msymbol):  New function to write
	the appropriate expression for a minimal symbol.
	* c-exp.y, m2-exp.y:  Use it.
1993-10-24 23:42:02 +00:00
Jim Kingdon
94c74a0c22 * remote-vx.c (vx_wait): Rename pid parameter to pid_to_wait_for.
Some compilers (legitimately) don't like variables in the
	function's outermost block whose name is the name as a parameter.
1993-10-24 18:05:39 +00:00
Fred Fish
90141f9c4e * elfread.c (elf_symtab_read): Use bfd convention that both
initialized and uninitialized data sections have the SEC_ALLOC
	flag bit set, but only initialized sections have SEC_LOAD set.
	SEC_DATA is ignored since it only gets set for initialized
	data.  Likewise, SEC_HAS_CONTENTS is ignored now because it
	never gets set.
1993-10-24 16:41:11 +00:00
David Edelsohn
592f517aa3 * remote-sim.h (sim_stop): New enum.
(sim_stop_signal): Change prototype, result is enum sim_stop.
* remote-sim.c (gdbsim_wait): Update call to sim_stop_signal.
1993-10-23 21:56:47 +00:00
Jim Kingdon
dcb389736b * stabsread.c (define_symbol): Skip the whole thing about "pcc
promotion" on little-endian machines.
1993-10-23 01:56:18 +00:00
Jim Kingdon
c3cabecb47 * remote-vx.c: Rename pid parameter to pid_to_wait_for. Some
compilers (legitimately) don't like variables in the function's
	outermost block whose name is the name as a parameter.
1993-10-23 01:14:47 +00:00
Jim Kingdon
835fe6e630 Merge Apollo patches from Troy Rollo (troy@cbme.unsw.edu.au):
* dst.h, dstread.c, config/m68k/{apollo68b.mt,tm-apollo68b.h}:
	New files.
	* config/m68k/nm-apollo68b.h: Add more defines.
	* configure.in: Recognize apollo target, not just host.
1993-10-22 16:03:08 +00:00
Jim Kingdon
3b891e0b5c * configure.in: Add * to end of all OS names. 1993-10-22 13:49:08 +00:00
Fred Fish
c8bd627f9f * Makefile.in (ALLPARAM): Add config/m88k/xm-delta88v4.h 1993-10-22 13:24:55 +00:00
Jim Kingdon
976bb0be03 * Makefile.in (init.c): Generate using the source, not munch. This
cleans up all kinds of hassles (which nm to use in munch, etc).  The
	new formatting conventions (mostly already followed) are that
	the name of the _initialize_* routines must start in column zero,
	and must not be inside #if.
	* munch: Removed.
	* Makefile.in: Remove references to munch.
	* serial.c, remote.c, infptrace.c, maint.c, convex-tdep.c,
	alpha-tdep.c, hp300ux-nat.c, hppab-nat.c, osfsolib.c, remote-es.c,
	procfs.c, remote-udi.c, ser-go32.c, ultra3-xdep.c, sh-tdep.c,
	i960-tdep.c, hppa-tdep.c, h8500-tdep.c, dpx2-nat.c, delta68-nat.c,
	z8k-tdep.c: Make sure the above conventions are followed.  Make
	sure they are all declared as returning void.  Clean up
	miscellaneous comments and such.
1993-10-22 05:55:58 +00:00
Jim Kingdon
c853c90d12 * sh-tdep.c (sim_load): Add function. 1993-10-22 00:53:32 +00:00
David D. Zuhn
f7fa951fd0 add pid argument to mips_wait 1993-10-21 23:02:40 +00:00
Jim Kingdon
100f92e2de * Makefile.in (c-exp.tab.o): Remove notice about shift/reduce conflicts
which no longer occur.

	gcc -Wall lint:
	* findvar.c (symbol_read_needs_frame), corelow.c (ignore),
	inflow.c (gdb_has_a_terminal): Make sure to return a value.
	* regex.h: Declare re_set_syntax.
	* printcmd.c: Include valprint.h.
	* infcmd.c, exec.c, maint.c, core.c: Include language.h.
	* maint.c: Include expression.h.
	* infrun.c, fork-child.c, corelow.c, inflow.c: Include thread.h.
	* inftarg.c: Include command.h.
	* coredep.c: Include value.h.
	* c-exp.y, m2-exp.y, ch-exp.y: Include bfd.h, symfile.h and objfiles.h.
	* ch-typeprint.c: Include typeprint.h.
	* ch-valprint.c: Include c-lang.h.
	* nlmread.c: Include buildsym.h.
	* environ.c: Include gdbcore.h.  Only include defs.h once.
	(set_in_environ): Cast const char * to char * when passing to
	set_gnutarget.
	Remove unused variables:
	* printcmd.c (printf_command): args_to_vprintf.
	* coffread.c (coff_symfile_init): strsection.
	Move variables to within the #ifdefs where they are used:
	* symtab.c (gdb_mangle_name): opname.
	* inftarg.c (child_attach): pid and exec_file.
	* inftarg.c (child_detach): siggnal.
	* objfiles.c (allocate_objfile): mapto, md, and fd.
	* objfiles.c (free_objfile): mmfd.
	* infrun.c (wait_for_inferior): Include BPSTAT_WHAT_LAST in switch.
	* infrun.c (wait_for_inferior): Remove unused same_pid label.
	* inferior.h: Declare set_sigint_trap and clear_sigint_trap.
	* parser-defs.h: Declare write_exp_elt_block.
	* stabsread.h: Declare elfstab_offset_sections and
	coffstab_build_psymtabs.
1993-10-21 20:41:50 +00:00
Ken Raeburn
003ccb904d Patch from Jeff Law:
* paread.c: Fix references to "hppa" that should now be "som".
1993-10-21 19:28:54 +00:00