Commit graph

534 commits

Author SHA1 Message Date
Stu Grossman
a4b4f52058 * nlmread.c (nlm_symtab_read): Clean up a bit.
* (nlm_symfile_read):  Record bounds of main() so that backtrace
	command will know where to stop.
	* objfiles.c (objfile_relocate):  Relocate entry point/func info
	for backtrace as well.
	* objfiles.h:  Define values for invalid PCs for entry point info.
	* symfile.c (init_entry_point_info):  Initialize invalid values
	with aforementioned macros.
	* config/alpha/tm-alphanw.h:  Turn on FRAME_CHAIN_VALID_ALTERNATE
	to cause backtrace to stop when it gets back to main().
	* config/i386/tm-i386nw.h:  Ditto.
1994-06-09 06:30:38 +00:00
Jim Kingdon
d8fc877318 * source.c (find_source_lines): Always use code that was #ifdef
BROKEN_LARGE_ALLOCA.  Do the cleanup before returning, rather than
	leaving it on the chain.  Reindent much of this function.
	* config/sparc/{xm-sun4sol2.h,xm-sun4os4.h},
	config/i386/{xm-sun386.h,xm-i386m3.h,xm-i386mach.h},
	config/m68k/{sun3os4.h,xm-news.h,xm-hp300hpux.h},
	config/ns32k/xm-ns32km3.h: Remove all references to
	BROKEN_LARGE_ALLOCA; with the above change it is no longer needed.
	* main.c, fork-child.c, many config files: Remove all
	SET_STACK_LIMIT_HUGE code; with the above changes it should no
	longer be needed.

	* symtab.c (lookup_partial_symbol): Use if and abort, not assert.
	This avoids __eprintf troubles.

	* main.c (main): Surround in #ifndef MAIN_OVERRIDE.  Move
	initialization code which needs to be called even if we bypass the
	command line stuff into gdb_init.
	* utils.c (fputs_unfiltered): Surround in #ifndef
	FPUTS_UNFILTERED_OVERRIDE.
	* Makefile.in (libgdb.a): New target.

	* utils.c: Rearrange I/O stuff a bit so that all output goes
	through fputs_unfiltered.  Use vasprintf; removes arbitrary limit
	which made %s not work with arbitrarily large strings.
	* printcmd.c (printf_command): Use printf_filtered, not
	printf_unfiltered and printf, now that arbitrary limit is gone.
1994-05-14 19:37:57 +00:00
Stan Shebs
a6b26c4431 Changes for MacGDB:
Thu May 12 17:04:58 1994  Stan Shebs  (shebs@andros.cygnus.com)

	* mpw-make.in (INCLUDE_CFLAGS): Add readline source dir.
	(READLINE_CFLAGS, READLINE_SRC, READLINE_DIR): Uncomment.
	(TSOBS): Don't compile inflow.c.
	(all, install): Add MacGDB.
	* main.c (main): Do Mac-specific init and command loop if a
	standalone app, skip full option help message if compiling
	with MPW C.
	(gdb_readline): If MPW, add a newline after the (gdb) prompt.
	* utils.c (_initialize_utils): If MPW, don't try to use termcap to
	compute the window size.
	* config/m68k/xm-mpw.h (printf, fprintf, fputs, fputc, putc,
	fflush): Define as macros that expand into hacked_... versions.
	(StandAlone, mac_app): Declare.
	* macgdb.r (SIZE): Set the default partition to 4000K.
	* mac-xdep.c (readline.h, history.h): Include.
	(terminal.h): Don't include.
	(mac_app): Define.
	(gdb_has_a_terminal): Define Mac-specific version.
	(do_keyboard_command): Simplify search for command string.
	(readline): Define as gdb_readline.
	Add other history/readline stubs to make main gdb link.
	(hacked_fprintf, hacked_printf, hacked_vfprintf, hacked_fputs,
	hacked_fputc, hacked_fflush): New functions, intercept output to
	stdout and stderr, send to console window.
1994-05-13 00:31:31 +00:00
Jim Kingdon
3f5e2fb58f * procfs.c (procfs_wait): Reinstate code which deduces the signal
from the fault, #ifndef FAULTED_USE_SIGINFO.
	* config/sparc/tm-sun4sol2.h: Define FAULTED_USE_SIGINFO.
1994-05-03 15:13:26 +00:00
Stan Shebs
939baabee2 Tue Apr 26 17:44:27 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-make.in (MacGDB): New target, standalone Mac-hosted gdb.
	(XDEPFILES): Define.
	(main.c.o): Compile with gC instead of C.
	* mac-defs.h: New file, menu etc definitions shared between
	C and Rez files.
	* macgdb.r: New file, Rez (resource compiler) resource
	definitions.
	* mac-xdep.c: New file, Mac host interface code.
	* config/m68k/xm-mpw.h (PATHNAME_SEPARATOR): Rename to
	DIRNAME_SEPARATOR.
	(PATHNAME_SEPARATOR_STRING): Remove.
	(SIGQUIT, SIGHUP): Define.
	(fileno, R_OK): Define.
1994-04-27 00:55:59 +00:00
Jeff Law
fe15373a50 * nm-hppab.h (KERNEL_U_ADDR): Define.
(FIVE_ARG_PTRACE): Likewise.
        (CANNOT_STORE_REGISTER): Likewise.
        * nm-hppah.h (KERNEL_U_ADDR): Define.
        (FIVE_ARG_PTRACE): Likewise.
        (CANNOT_STORE_REGISTER): Likewise.
        (NEED_TEXT_START_END): Likewise.

        * tm-hppah.h (NEED_TEXT_START_END): Delete definition.
        * xm-hppah.h (KERNEL_U_ADDR): Delete definition.
        (FIVE_ARG_PTRACE): Likewise.
        * xm-hppab.h (KERNEL_U_ADDR): Delete definition.
        (FIVE_ARG_PTRACE): Likewise.

        * hppa-tdep.c (read_unwind_info): Make static.
        (restore_pc_queue): Indirect through the target vector to
        reload the register state.
1994-04-18 17:18:12 +00:00
Steve Chamberlain
723a8cc532 * config/tm/tm-h8500.h (BEFORE_MAIN_LOOP_HOOK): Deleted. 1994-04-15 18:41:27 +00:00
Steve Chamberlain
2e2b27790c * config/sh/tm-sh.h (BREAKPOINT): Is now sleep opcode. 1994-04-15 18:41:05 +00:00
Jeff Law
9ec767849e * config/mips/nm-irix4.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT): Define.
(STOPPED_BY_WATCHPOINT, HAVE_NONSTEPPABLE_WATCHPOINT): Likewise.
	(target_{insert,remove}_watchpoint): Likewise.
1994-04-14 03:13:52 +00:00
Jeff Law
ccd7a7db10 * config/pa/nm-hppab.h (STOPPED_BY_WATCHPOINT): Define.
(HAVE_STEPPABLE_WATCHPOINT): Define.
	(TARGET_CAN_USE_HARDWARE_WATCHPOINT): Define.
	(target_{insert,delete}_watchpoint): Define.
1994-04-13 22:02:52 +00:00
Jim Kingdon
7b2b07585e Fri Apr 8 17:14:37 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
* config/m68k/es1800.mt: Change comments.

Fri Apr  8 17:14:37 1994  Rob Savoye  (rob@darkstar.cygnus.com)

	* config/m68k/monitor.mt (TDEPFILES): Don't include remote-es.o.
1994-04-09 00:18:21 +00:00
Peter Schauer
376f8f6844 * config/mips/mipsv4.mh, config/mips/mipsv4.mt,
config/mips/tm-mipsv4.h, config/mips/xm-mipsv4.h, mipsv4-nat.c:
	New files for MIPS SVR4 support.
1994-04-08 00:37:48 +00:00
Peter Schauer
77af4652a7 * config/alpha/nm-alpha.h (GDB_TARGET_HAS_SHARED_LIBS): Define,
OSF/1 has shared libraries.
1994-04-08 00:36:54 +00:00
Peter Schauer
a9617bd573 * config/tm-sunos.h (IN_SOLIB_TRAMPOLINE, SKIP_TRAMPOLINE_CODE):
Define to handle stepping into  -g compiled shared libraries.
	* config/tm-sysv4.h (SKIP_TRAMPOLINE_CODE):  Define to handle
	stepping into  -g compiled shared libraries.
1994-04-08 00:36:08 +00:00
Jeff Law
853feb50c0 Fix typo in last change. 1994-04-06 01:11:08 +00:00
Jeff Law
4f91591410 * hppa-tdep.c (hppa_fix_call_dummy): If FUN is a procedure label,
then gets its real address into FUN and its GOT/DP value into %r19.

        * tm-hppa.h (CALL_DUMMY): Use %r20, not %r19 as a temporary.
1994-04-06 00:56:36 +00:00
Jeff Law
4556842434 * xm-hppab.h: Never define USG.
* xm-hppah.h: Always define USG.
1994-04-05 22:31:21 +00:00
Peter Schauer
5051b6f290 * config/sparc/tm-sun4sol2.h (IN_SOLIB_TRAMPOLINE): Removed,
the new generic definition from tm-sysv4.h works for Solaris.
1994-04-01 08:51:31 +00:00
Peter Schauer
94a5ac73e1 * config/tm-sysv4.h (IN_SOLIB_TRAMPOLINE): Use new in_plt_section. 1994-04-01 08:50:42 +00:00
Jim Kingdon
c2216bfd1b * config/m68k/tm-dpx2.h: Include tm-m68k.h not nonexistent tm-68k.h. 1994-03-30 16:25:08 +00:00
Peter Schauer
8a19fe2188 * config/i386/tm-symmetry.h: Clean up, it is now only used for Dynix.
Remove all conditionals and definitions for ptx.
	I386_REGNO_TO_SYMMETRY moved to here from symm-tdep.c.
	Fix addresses of floating point registers in REGISTER_U_ADDR.
	STORE_STRUCT_RETURN now handles cc and gcc conventions.
	FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC,
	IN_SIGTRAMP, SIGCONTEXT_PC_OFFSET defined to make backtracing through
	signal trampoline code work.
	* config/i386/xm-symmetry.h:  Clean up, it is now only used for Dynix.
	Remove all conditionals and definitions for ptx.
	Remove KDB definitions.
1994-03-30 10:00:00 +00:00
Jeff Law
a87c93b716 Put back include to tm-hppa.h mistakenly taken out during a recent checkin. 1994-03-29 18:36:48 +00:00
Jim Kingdon
649694ea87 * config/sparc/tm-sparc.h: Define USE_REGISTER_NOT_ARG.
* stabsread (define_symbol): If USE_REGISTER_NOT_ARG, go back to
	combining all 'p' and 'r' pairs into a LOC_REGPARM.
1994-03-26 16:00:02 +00:00
Jim Kingdon
493424b108 * m3-nat.c, i386m3-nat.c, config/i386/i386m3.mh: Many minor
changes to make it compile (it doesn't link yet).
1994-03-26 04:20:44 +00:00
Jeff Law
503554725f Forgot this in recent commit. 1994-03-26 01:04:06 +00:00
Sean Eric Fagan
c929326f2a Stu apparantly forgot to update the .Sanitize file when he added
tm-alphanw.h.
1994-03-26 00:41:36 +00:00
Jim Kingdon
59144a8124 * config/i386/ptx.mh (XDEPFILES): Add coredep.o. Delete infptrace.o.
* symm-nat.c (child_wait, _initialize_symm_nat, kill_inferior):
	Supply alternate version if ATTACH_DETACH is not defined.
	* ptx4-nat.c, config/i386/{nm-ptx4.h, ptx4.mh, ptx.mt, ptx4.mt,
	tm-ptx.h, tm-ptx4.h, xm-ptx.h, xm-ptx4.h}: New files.
	* configure.in: Recognize i[34]86-sequent-sysv4* host.
1994-03-26 00:19:35 +00:00
Jim Kingdon
32001cc5da new for ptx 1994-03-26 00:11:49 +00:00
Jim Kingdon
8ed0509162 new for ptx 1994-03-26 00:03:08 +00:00
Jim Kingdon
10bfdb4836 new for ptx4 1994-03-25 23:53:34 +00:00
Jim Kingdon
3dd669876e new for ptx4 1994-03-25 23:39:19 +00:00
Jim Kingdon
4df6dcd10d * config/mips/tm-mips.h (SETUP_ARBITRARY_FRAME): Revise comment
regarding using the PC--using the PC is necessary and all the
	FIXME comments in the world won't make it go away.
1994-03-25 01:38:24 +00:00
Stan Shebs
ea936fd77b MPW config stuff for GDB. 1994-03-23 22:25:00 +00:00
Jeff Law
0a64709eb4 * config/pa/tm-hppao.h (NO_PC_SPACE_QUEUE_RESTORE): Define.
* hppa-tdep.c (hppa_pop_frame): Do not restore the PC space
        queue if NO_PC_SPACE_QUEUE_RESTORE is defined.
1994-03-23 04:16:32 +00:00
Jeff Law
84ad95c118 * stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument
for the structure's type.  All callers changed.

        * valops.c (call_function_by_hand): Check REG_STRUCT_HAS_ADDR
        for each structure argument rather than assuming it's either
        true or false for all structure arguments.

        * config/pa/tm-hppa.h (REG_STRUCT_HAS_ADDR): Depend only
        on the length structure passed, not the compiler used.

        * config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Accept additional
        argument for the structure's type.
1994-03-23 04:14:34 +00:00
Peter Schauer
388f491940 * config/i386/tm-i386aix.h, config/i386/tm-sun386.h,
config/i386/tm-symmetry.h (REGISTER_CONVERT_TO_RAW):  Fix typo.
	* config/i386/tm-symmetry.h:  Make comment inside #if 0 a real
	comment.
	* config/i386/tm-symmetry.h (STORE_STRUCT_RETURN):  Cast argument
	to write_memory to avoid warnings from gcc.
	* config/i386/xm-symmetry.h:  Add missing #endif.
	* config/i386/nm-symmetry.h (NO_PTRACE_H):  Add for Dynix.
	* config/i386/symmetry.mt (TDEPFILES):  Add i386-tdep.o.
	* config/i386/symmetry.mh (NAT_FILE, NATDEPFILES):  Add.
1994-03-21 21:16:16 +00:00
Stu Grossman
30f5dbc0d8 * alpha-tdep.c: Gobs of changes (many imported from mips-tdep) to
improve remote debugging efficiency.  Also fixed problems with
	doing function calls for programs with no entry points.
	* infcmd.c (run_stack_dummy):  Use CALL_DUMMY_ADDRESS instead of
	entry_point_address.
	* inferior.h (PC_IN_CALL_DUMMY):  ditto.
	* mdebugread.c (parse_symbol, parse_procedure, parse_external,
	parse_lines):  Pass section_offsets info to these routines so that
	we can relocate symbol table entries upon readin.
	* (psymtab_to_symtab_1):  Set symtab->primary to tell
	objfile_relocate to do relocations for our symbols.
	* (ecoff_relocate_efi):  New routine to relocate adr field of PDRs
	(which hang off of the symbol table).
	* Use prim_record_minimal_symbols_and_info instead of
	prim_record_minimal_symbols to supply section info to make minimal
	symbol relocations work.
	* minsyms.c (prim_record_minimal_symbols_and_info):  If section is
	-1, try to deduce it from ms_type.
	* objfiles.c (objfile_relocate):  Use ALL_OBJFILE_SYMTABS where
	appropriate.  Handle relocation of MIPS_EFI symbols special. Also,
	add code to relocate objfile->sections data structure.
	* remote.c (get_offsets):  Use new protocol message to acquire
	section offsets from the target.
	* (remote_wait):  Get rid of relocation stuff.  That's all handled
	by objfile_relocate now.
	* config/alpha/alpha-nw.mt (TM_FILE):  Use tm-alphanw.h.
	* config/alpha/tm-alpha.h:  Define CALL_DUMMY_ADDRESS, and
	VM_MIN_ADDRESS.
	* config/alpha/tm-alphanw.h:  DECR_PC_AFTER_BREAK=0, VM_MIN_ADDRESS=0.
1994-03-21 19:52:50 +00:00
David Edelsohn
5029b1148d (FPS_REGNUM, CPS_REGNUM): Define (so sparc-tdep.c compiles).
(TARGET_PTR_BIT): Must be a constant now, fix at 64.
1994-03-20 23:36:50 +00:00
David Edelsohn
9b4bebb232 (SIMFILES): Use remote-sim.o instead of remote-sp64sim.o.
(TM_CLIBS): Define to -lm, the simulator uses the sqrt() function.
1994-03-20 23:31:15 +00:00
Jim Kingdon
d34979a72d * config/m68k/{cisco.mt,tm-cisco.h}: New files. 1994-03-19 20:02:54 +00:00
Jim Kingdon
d0bff94e42 * config/m68k/{cisco.mt,tm-cisco.h}: New files.
* Makefile.in (ALLPARAM, ALLCONFIG): Add them.
	* configure.in: Recognize m68*-cisco*-*.
1994-03-19 19:53:31 +00:00
Jim Kingdon
419e8b6b41 New for cisco 1994-03-19 19:32:51 +00:00
Kung Hsu
f09d749f4c Modified Files:
.Sanitize

	* i386os9k.mt: add to things to keep.
	* tm-i386os9k.h: add to things to keep.
1994-03-17 17:42:23 +00:00
Peter Schauer
5bfc8dd536 * config/i386/tm-i386bsd.h: Give just macro name, not args, to #undef. 1994-03-15 21:47:34 +00:00
Jim Kingdon
f261371068 * stabsread.c (define_symbol): If REG_STRUCT_HAS_ADDR, also
convert a LOC_ARG to a LOC_REF_ARG.  Update code which combines
	'p' and 'r' symbol descriptors into a single symbol to look for a
	LOC_REF_ARG.
	* README, config/sparc/tm-sparc.h: Update comments.
1994-03-10 18:21:02 +00:00
Kung Hsu
0906de694f CVS:
Modified Files:
	tm-i386os9k.h

         * config/i386/tm-i386os9k.h : add #define DECR_PC_AFTER_BREAK 0.
1994-03-10 03:11:19 +00:00
Jim Kingdon
352c21dd9b * config/i386/tm-i386v4.h: Give just macro name, not args, to #undef. 1994-03-08 19:45:32 +00:00
Jeff Law
70e43abe7c * hppa-tdep.c (pc_in_linker_stub): Move decl to beginning of file.
(pc_in_interrupt_handler): New function.  Also add PARAM decl.
        (find_proc_framesize): Deal with HPUX setting SAVE_SP bit for
        signal trampoline and interrupt routines.
        (frame_saved_pc): Handle signal trampolines and interrupt routines.
        (frame_chain, frame_chain_valid): Likewise.
        (hppa_frame_find_saved_regs): Likewise.  Also deal with special
        saved regs convention for SP.

        * tm-hppa[bho].h: FRAME_FIND_SAVED_PC_IN_SIGTRAMP): Define.
        (FRAME_BASE_BEFORE_SIGTRAMP): Define.
        (FRAME_FIND_SAVED_REGS_IN_SIGTRAMP): Define.

        * tm-hppah.h (IN_SIGTRAMP): Define.
1994-03-04 17:54:41 +00:00
Jim Kingdon
82a2edfbcf * breakpoint.c, breakpoint.h, c-valprint.c, ch-valprint.c,
cp-valprint.c, eval.c, expprint.c, findvar.c, language.c,
	objfiles.h, infcmd.c, printcmd.c, stack.c, typeprint.c,
	valarith.c, valops.c, valprint.c, value.h, values.c: Replace
	value with value_ptr.  This is for the ptx compiler.
	* objfiles.h, target.h: Don't declare a "sec_ptr" field using a
	"sec_ptr" typedef.
	* symm-nat.c: Add a bunch of stuff for symmetry's ptrace stuff.
	#if 0 i386_float_info.
	* symm-tdep.c (round): Remove.  Also remove sgttyb.
	* symm-tdep.c: Remove lots of stuff which duplicates stuff from
	i386-tdep.c.  Remove register_addr and ptx_coff_regno_to_gdb.
	* i386-tdep.c (i386_frame_find_saved_regs): Put in
	I386_REGNO_TO_SYMMETRY check in case it is needed for Dynix
	someday.
	* config/i386/nm-symmetry.h: Change KERNEL_U_ADDR.  Move
	stuff from PTRACE_READ_REGS, PTRACE_WRITE_REGS macros to
	symm-nat.c.  Define CHILD_WAIT and declare child_wait().
	* config/i386/tm-symmetry.h: Remove call function stuff; stuff in
	tm-i386v.h is apparently OK.
	* config/i386/xm-symmetry.h [_SEQUENT_]: Define HAVE_TERMIOS not
	HAVE_TERMIO.  Define MEM_FNS_DECLARED, NEED_POSIX_SETPGID, and
	USE_O_NOCTTY.
1994-03-03 01:00:57 +00:00
Jim Kingdon
25200748a2 * os9kread.c (os9k_process_one_symbol): Rename
VARIABLES_INSIDE_BLOCK to OS9K_VARIABLES_INSIDE_BLOCK.
	* symfile.c (symbol_file_command): Check for (CORE_ADDR)-1, not
	(CORE_ADDR)0, from target_link, since that is what it uses.
	Process name at end, not during parsing (like we did before Kung's
	change), so that -readnow and -mapped can appear anywhere.
	Make text_relocation a local variable.
	* config/i386/i386os9k.mt: Fix comment.
	* Makefile.in (ALLDEPFILES): Add remote-os9k.c.
	* os9kread.c: Put "comments" after #endif inside /* */.
	* stabsread.h: Add os9k_stabs variable.
	* stabsread.c (start_stabs), os9kread.c (os9k_process_one_symbol):
	Set it.
	* stabsread.c (define_symbol): If os9k_stabs, put a 'V' symbol
	descriptor in global_symbols not local_symbols.
	(read_type): If os9k_stabs, accept 'c', 'i', and 'b' type
	descriptors.
	(read_type): If os9k_stabs, accept function parameters after 'f'
	type descriptor.
	(read_array_type): If os9k_stabs, don't expect index type and
	expect lower and upper to be separated by ',' not ';'.
	(read_enum_type): If os9k_stabs, read a number before the first
	enumeration constant.
	(os9k_init_type_vector): New function.
	(dbx_lookup_type): Call it when starting new type vector.
	* config/i386/tm-i386os9k.h: Define BELIEVE_PCC_PROMOTION.
	* (os9k_process_one_symbol): Call define_symbol not os9k_define_symbol.
	* os9kstab.c: Removed.
	* Makefile.in: Update accordingly.
	* objfiles.c (objfile_relocate_data): Removed.
	* remote-os9k.c (rombug_wait): Call objfile_relocate
	not objfile_relocate_data.
	* objfiles.h, objfiles.c: Remove find_pc_objfile.
	* remote-os9k.c (rombug_wait): Call find_pc_section not
	find_pc_objfile.
	* main.c (quit_command): Check inferior_pid; revert Kung change.
	* remote-os9k.c (rombug_create_inferior): Set inferior_pid.
1994-03-02 03:01:34 +00:00