Commit graph

1068 commits

Author SHA1 Message Date
Jim Kingdon
a80c7bf67c * solib.c (struct so_list): Add bfd field.
(solib_map_sections): Leave bfd open and scratch_pathname allocated.
	Put the bfd in bfd field of the so_list.
	(clear_solib): Free bfd name and close_bfd on the bfd.
1993-04-09 17:43:59 +00:00
Per Bothner
47f366bc62 * valarith.c (value_subscript): Add COERCE_REF.
* ch-exp.y (operand_5):  We can generalize the 2nd operand
	of a string repetition ot 'literal' without ambiguity.
1993-04-09 07:52:50 +00:00
Jim Kingdon
cabd4da684 * breakpoint.h (struct bpstat): Remove momentary field.
Remove bpstat_momentary_breakpoint.  This was always kludgy
	and is no longer used.

	* breakpoint.h: Add enum bpstat_what.
	breakpoint.h (struct bpstat), breakpoint.c (bpstat_stop_status):
	stop and print fields of bpstat now per-breakpoint, not just
	one for the whole chain.
	breakpoint.{c,h} (bpstat_what): New function.
	breakpoint.h: Remove bpstat_stop and bpstat_should_print.
	infrun.c: Replace switch (stop_bpstat->breakpoint_at->type)
	with call to bpstat_what.
	README: Remove watchpoint/breakpoint bug from known bugs.

	* breakpoint.h: Prototype bpstat_find_breakpoint.
1993-04-09 03:17:45 +00:00
Fred Fish
dfbfbd9632 * symtab.c (find_methods, gdb_mangle_name): Note that functions
are g++ specific.
	* symtab.h (VTBL_FNADDR_OFFSET, OPNAME_PREFIX_P, VTBL_PREFIX_P,
	DESTRUCTOR_PREFIX_P):  Note that macros are g++ specific.
1993-04-08 23:05:16 +00:00
Peter Schauer
ca6a826d84 * symtab.h (DESTRUCTOR_PREFIX_P): New macro to check if physname
is a C++ destructor.
        * symtab.c (gdb_mangle_name): Use it.
        * symtab.c (find_methods): Do not add destructors to choice list
        for constructors.
        * symtab.c (decode_line_1): Make breakpoints on destructors work
        for gcc-2.x again.
1993-04-08 17:37:24 +00:00
Stu Grossman
b83bf6b370 * ser-go32.c: Make it use serial port name.
* go32-xdep.c:  Put in def for strlwr, needed by dir.o in go32 libc.
1993-04-08 04:12:56 +00:00
Stu Grossman
40b56283bc * infcmd.c (read_pc): Make sure that we read PC_REGNUM when not
in a system call!
1993-04-08 01:45:35 +00:00
Stu Grossman
41faa7759d * configure.in: Only configure sparclite subdir when target_cpu
is sparclite.
1993-04-07 22:53:49 +00:00
Jim Kingdon
ef5b809c7c * xcoffread.c (struct coff_symbol): Change c_sclass to unsigned char.
Remove FIXME comment regarding this.
1993-04-07 22:45:34 +00:00
Per Bothner
8a177da658 * ch-exp.y: Remove ambiguities. Fix or add support for
UNOP_IND, UNOP_CAST, UNOP_ADDR, STRUCOP_STRUCT, OP_TYPE.
	* ch-typeprint.c (chill_print_type):  Move support
	for TYPE_CODE_ARRAY and TYPE_CODE_STRING from here ...
	* ch-typeprint.c (chill_type_print_base): ... here.
	* ch-typeprint.c (chill_type_print_base):  Improve
	support for PTR, REF, and FUNC types.
	* ch-valprint.c:  Prefer H'%x format to 0x%s.
	* ch-valprint.c (chill_val_print):  Add support for printing
	TYPE_CODE_REF (return for LOC parameters and variables).
	Use c_val_print to print random types (including ENUM).
	* ch-valprint,c (chill_print_value_fields):  Make
	output look more like Chill tuples.
	* stabsread.c (read_struct_type):  Factor common code.
1993-04-07 22:15:48 +00:00
Fred Fish
8cb3cab94f * sparclite/Makefile.in: Add dummy mostlyclean, clean,
distclean, and realclean targets.
1993-04-07 18:27:16 +00:00
Jim Kingdon
47045b3617 Change NULL->'\0' in comment (that wasn't a typo). 1993-04-07 17:46:19 +00:00
Jim Kingdon
f635bd474c use E_SYMNMLEN 1993-04-07 17:40:55 +00:00
K. Richard Pixley
73d0fc7820 Add section table to objfile struct. Use it for find_pc_section.
* objfiles.c (add_to_objfile_sections,
  build_objfile_section_table, find_pc_section): new functions.
  (allocate_objfile): build section table.
* objfiles.h (struct obj_section): new structure.
  (struct objfile): add section table.
  (find_pc_section): new prototype.
* solib.[ch] (find_pc_section_from_so_list): removed.
* sparc-tdep.c: include objfiles.h for find_pc_section.  include
  symfile.h for objfiles.h.
  (in_solib_trampoline): adjusted for new find_pc_section
  prototype.  Removed BAD_RICH_HACK ifdefs.
* symfile.c (syms_from_objfile): offset objfile sections.
  (find_pc_section): removed.  Also removed BAD_RICH_HACK ifdefs.
* symfile.h (find_pc_section): prototype removed.  Also fixed
  comment typo NUL -> NULL.
* target.[ch] (find_pc_section_from_targets): removed.
* config/sparc/tm-sun4sol2.h (BAD_RICHH_HACK): removed.
1993-04-07 07:04:26 +00:00
Stu Grossman
07861607f5 * ser-go32.c: Format. (go32_open): Use proper return value.
* configure.in:  Undo conditional configdirs hack for sparclite.
1993-04-07 04:43:48 +00:00
Jim Wilson
118ec55a7b Fix for PR 124: make 'rb' correctly handle case where we have multiple
functions with the same name in different files.
1993-04-07 00:09:11 +00:00
Jim Kingdon
9925b92861 * values.c (USE_STRUCT_RETURN): Only use gcc wierdness for gcc1. 1993-04-06 21:20:30 +00:00
Jim Kingdon
786757a9a4 * xcoffread.c (read_xcoff_symtab): Deal correctly with symbols of
exactly 8 characters.
1993-04-06 20:08:50 +00:00
Stu Grossman
0c101d4920 * configure.in: Sparclite uses sparc config dir. Also has it's
own tm- & .mt files now.  Also add sparclite to configdirs.
	* go32-xdep.c:  Dummy routines for sigsetmask & strlwr.
	* config/i386/go32.mh:  Nullify def of TERMCAP.
	* config/i386/xm-go32.h:  Get rid of redef of EIO.
	* config/sparc/{sparclite.mh tm-sparclite.h}:  New sparclite
	specific configs.  Very similar to sun4os4, but without solib.
	* sparclite/{Makefile.in configure.in}:  First cut at making this
	dir configgable.
1993-04-06 17:40:55 +00:00
Stu Grossman
5d2b030a03 * ser-go32.c: First cut at adapting to new serial interface. 1993-04-06 10:13:03 +00:00
Stu Grossman
4e772f4426 * Makefile.in (SFILES OBS): Add serial.[co] & ser-hardwire.[co].
These implement a new serial line interface for talking to remote
	targets.
	* configure.in:  Link ser-hardwire.c to ser-unix.c for all hosts,
	EXCEPT go32, which gets ser-go32.c.
	* remote.c:  Use new serial interface.  More remote-xxx's to be
	converted later.
	* ser-bsd.c, ser-termios.c:  Removed.
	* serial.c:  New.  Implements common operations for all serial
	types.
	* ser-unix.c:  New.  Unix specific serial operations for various
	flavors of Unix (Posix, SysV, BSD).
	* serial.h:  Generic serial interface defs.
	* config/i386/go32.mh, config/i386/i386bsd.h,
	config/m68k/apollo68b.mh, config/sparc/sun4os4.mh:  Remove
	ser-bsd.o from XDEPFILES.  All the magic is now handled in
	configure.in.
1993-04-06 05:50:54 +00:00
Stu Grossman
9acdb2dc82 * config/h8500/tm-h8500.h: Clean up brain damage found by GCC. 1993-04-06 03:52:31 +00:00
Jim Kingdon
1d7e34e1ef * xcoffread.c (xcoff_symfile_offsets): Use 0 not addr for offsets. 1993-04-03 01:19:16 +00:00
Jim Kingdon
b0e932ad45 * rs6000-tdep.c (frameless_function_invocation): Don't even think
about framlessness except on the innermost frame.
1993-04-02 20:28:52 +00:00
Jim Kingdon
0848ad1c4d * stabsread.c (patch_block_stabs): If stab & no symbol, make
a LOC_OPTIMIZED_OUT symbol.
	symtab.h (enum address_class): Add LOC_OPTIMIZED_OUT.
	findvar.c (read_var_value), printcmd.c (address_info),
	symmisc.c (print_{,partial_}symbol), c-exp.y (variable),
	m2-exp.y (yylex): Deal with it.
1993-04-02 19:35:30 +00:00
K. Richard Pixley
0e18483336 * sparc-tdep.c (in_solib_trampoline), symfile.c (find_pc_section):
ifdef protect using BAD_RICH_HACK.  This should be removed soon.
	* config/sparc/tm-sun4sol2.h (BAD_RICH_HACK): define.
1993-04-02 00:50:30 +00:00
Jim Kingdon
720b3aed42 New print_address for disassemblers, merge a29k and i960 disassemblers 1993-04-02 00:18:47 +00:00
Jim Kingdon
a6cead71cd Fix prototype problems related to recent disassembler changes 1993-04-01 18:04:51 +00:00
Peter Schauer
494503c776 * breakpoint.c (bpstat_print, bpstat_stop_status): Change to walk the
entire breakpoint chain and print only the first entry that needs to
	be printed and needs to be stopped for. Fixes problems with printing
	of multiple breakpoints with different conditions.
	* breakpoint.c (print_it_done): Renamed from print_it_noop as it
	effectively stops printing of the breakpoint chain.
	* breakpoint.c (print_it_noop): New routine to print nothing
	for this breakpoint entry and dont stop printing.
	* breakpoint.c (breakpoint_re_set_one): mention the reevaluated
	watchpoint only if it is enabled.
	* mipsread.c (parse_procedure): Correct incorrect setjmp procedure
	descriptor from the library to make backtraces through setjmp work.
	* mipsread.c (fixup_sigtramp): Correct pcreg and fregoffset for
	sigtramp.
	* mips-tdep.c (read_next_frame_reg): Provide correct values for
	all registers saved within sigtramp, cleanup.
1993-04-01 17:43:42 +00:00
Jim Kingdon
f7ed13c7d5 merge binutils and gdb sparc disassemblers 1993-04-01 16:56:06 +00:00
K. Richard Pixley
bf097a0b40 * core.c (dis_asm_read_memory): drop fourth arg which conflicts with
prototype in ../include/dis-asm.h.
1993-04-01 05:27:06 +00:00
Jim Kingdon
5d0734a7d7 provide a new interface (using read_memory_func) to call the disassemblers
which copes with errors in a plausible way
1993-03-31 21:43:25 +00:00
K. Richard Pixley
2093fe6840 Teach sparc solaris to next over shared library functions.
* solib.[hc] (find_pc_section_from_so_list): new function and
  prototype.
* sparc-tdep.c (in_solib_trampoline): new function.
* symfile.[hc] (find_pc_section): new function and prototypes.
* target.[hc] (find_pc_section_from_targets): new function and
  prototypes.
* config/sparc/tm-sun4sol2.h (IN_SOLIB_TRAMPOLINE): redefine to
  in_solib_trampoline.
1993-03-31 00:29:22 +00:00
Jim Kingdon
deae7611a3 * infrun.c (wait_for_inferior): Revise comment. 1993-03-30 23:33:04 +00:00
Jim Kingdon
359a097f9f Tue Mar 30 08:06:24 1993 Jim Kingdon (kingdon@cygnus.com)
* command.c (do_setshow_command): Use %u with var_{u,z}integer.

	* command.{c,h}: New var_type var_integer.
	main.c: Use it for history_size.

	* rs6000-tdep.c, xcoffexec.c, config/rs6000/xm-rs6000.h, breakpoint.c:
	Lint and byte-order fixups.
1993-03-30 23:06:29 +00:00
Jim Kingdon
3f031adf9f (print_it_normal): return 0 after hitting watchpoint 1993-03-30 19:10:31 +00:00
Jim Kingdon
8af68e4efb * breakpoint.h (bpstat): New field print_it.
breakpoint.c (bpstat_print): Use it.
	(print_it_normal): New function (from old bpstat_print code).
	(bpstat_{alloc,stop_status}): Set print_it field.

	* breakpoint.c (bpstat_stop_status): Use catch_errors when
	evaluating watchpoint condition, via new function watchpoint_check.
	Also stop if watchpoint disabled due to leaving its block.
1993-03-30 18:55:20 +00:00
Jim Kingdon
b27be7926c *** empty log message *** 1993-03-30 16:07:17 +00:00
Peter Schauer
aa66fddd75 * mips-pinsn.c: Add missing include of dis-asm.h. 1993-03-30 08:16:25 +00:00
Fred Fish
239121e2b7 * Makefile.in (clean, distclean, realclean): Recursively apply
to subdirs first, rather than last.  This avoids, for example,
	Makefile being removed in a parent directory before the recursive
	make is run.
1993-03-30 01:49:04 +00:00
Fred Fish
141ccc0350 Update for just completed file renamings. 1993-03-30 01:14:35 +00:00
Fred Fish
2225eb851e * config/m68k/tm-m68k.h: Renamed from config/m68k/tm-68k.h.
* m68k/{tm-3b1.h, tm-altos.h, tm-amix.h, tm-es1800.h,
	tm-hp300bsd.h, tm-hp300hpux.h, tm-isi.h, tm-news.h, tm-os68k.h,
	tm-st2000.h, tm-sun2.h, tm-sun3.h, tm-vx68.h}:  Include tm-m68k.h
	instead of tm-68k.h.
	* Makefile.in (HFILES):  tm-68k.h renamed to tm-m68k.h.
	* README, a29k-pinsn.c, m68k-pinsn.c, m68k-stub.c, remote-vx.c,
	m68k/{altos.mh, altos.mt, apollo68b.mh, nm-apollo68b.h,
	nm-hp300bsd.h, config/m68k/xm-apollo68b.h}:  Map '68k' to 'm68k'.
	* a29k/tm-a29k.h, doc/gdbint.texinfo:  Account for renaming of
	tm-68k.h to tm-m68k.h.
	* m68k/m68k-fp.mt (TM_FILE):  tm-68k-fp.h renamed to tm-m68k-fp.h.
	* m68k/m68k-nofp.mt (TM_FILE):  tm-68k-nofp.h renamed to
	tm-m68k-nofp.h.
1993-03-30 00:33:44 +00:00
Jim Kingdon
0a97f6c4a1 Add comments regarding breakpoint_re_set 1993-03-29 23:46:12 +00:00
Fred Fish
d7d35f004c * config/a29k/tm-a29k.h: Renamed from config/a29k/tm-29k.h.
* a29k-pinsn.c:  Renamed from am29k-pinsn.c.
	* a29k-tdep.c:  Renamed from am29k-tdep.c.
	* remote-eb.c, config/a29k/tm-ultra3.h:  Include renamed tm-a29k.h.
	* remote-monitor.c, remote-st2000.c, config/a29k/{nm-ultra3.h,
	tm-a29k.h, xm-ultra3.h}, config/romp/rtbsd.mh, doc/gdbinv-s.texi,
	testsuite/gdb.t15/funcargs.exp, testsuite/gdb.t17/callfuncs.exp:
	Map '29k' to 'a29k'.
	* config/a29k/{a29k-kern.mt, a29k-udi.mt, a29k.mt, ultra3.mt}
	(TDEPFILES):  Use renamed a29k-pinsn.o and a29k-tdep.o.
	* config/a29k/{a29k-udi.mt, a29k.mt} (TM_FILE):  Use renamed
	tm-a29k.h.
	* config/a29k/a29k-udi.mt (MT_CFLAGS):  Remove TARGET_AM29K
	define that does not appear anywhere else in the gdb source tree.
	* doc/gdbinit.texinfo:  Document renaming of tm-29k.h to tm-a29k.h.
1993-03-29 23:38:30 +00:00
Jim Kingdon
e5c007603f * xcoffread.c (sort_syms, compare_symbols): Remove.
(xcoff_symfile_read): Use sort_all_symtab_syms from symfile.c
	not our own sort_syms (it is identical).
1993-03-29 22:25:59 +00:00
Jim Kingdon
ad3768932d * xcoffread.c: Nuke NAMES_HAVE_DOT define (not used). 1993-03-29 21:58:29 +00:00
Jim Kingdon
0eaaa46a44 * breakpoint.{c,h}: Add exp_string to struct breakpoint and use
it in breakpoint_re_set.
1993-03-29 21:49:39 +00:00
Peter Schauer
0b0d6c3fa7 * breakpoint.c (breakpoint_re_set_one): Fix storage leak.
* breakpoint.c (enable_breakpoint): Don't enable watchpoint if it
	went out of scope.
	* exec.c (exec_close): Fix storage leak.
	* exec.c (exec_file_command): Make sure that bfd doesn't realign the
	output sections when patching an executable.
	* mips-nat.c (store_inferior_registers): Use REGISTER_PTRACE_ADDR
	when writing all registers.
	* mips-tdep.c (mips_push_dummy_frame): Save floating point registers
	at the right offset in the dummy frame.
	* mipsread.c (psymtab_to_symtab_1): Do not complain for stProc,
	stStaticProc and stEnd symbols as they are generated by gcc-2.x.
	* mipsread.c (mipscoff_new_init): Initialize stabsread and buildsym.
1993-03-28 19:28:26 +00:00
Fred Fish
53f6119fc6 Reorder recent entries that we out of date sequence, and add an entry of
mine that got dropped somehow.
1993-03-28 00:58:39 +00:00
John Gilmore
0f0834c518 * Makefile.in (TARFILES): Avoid trailing backslash. 1993-03-26 23:26:05 +00:00