Commit Graph

10 Commits

Author SHA1 Message Date
Stu Grossman
66a1aa071e * Merge in HPPA/BSD patches from Utah:
* defs.h:  Add const to 2nd arg of psignal prototype.
	* hppah-tdep.c:  Renamed to hppa-tdep.c 'cuz it's common code with
	BSD now.
	* hppab-core.c:  Deleted.  No longer useful.
	* hppab-nat.c:  #include more files.  Use PT_WUREGS, not
	PT_WRITE_U.
	* hppab-tdep.c:  Deleted.  Supplanted by hppa-tdep.c.
	* config/pa/hppabsd.mh (NATDEPFILES):  Remove hppab-core.o.
	* config/pa/hppabsd.mt (TDEPFILES):  hppab-tdep.o => hppa-tdep.o
	* config/pa/hppahpux.mt (TDEPFILES):  hppab-tdep.o => hppa-tdep.o
	* config/pa/xm-hppab.h:  #define SET_STACK_LIMIT_HUGE.
1993-04-23 23:43:18 +00:00
Stu Grossman
b5728692b4 * Fix two bugs found by deja-gnu. One is the incorrect reporting
of the PC being in a stack dummy when looking at a core file
	without symbols.  The other is the incorrect passing of char
	arguments during expression evaluation (ie: p foo('a','b') would
	mess up the passing of it's args because it wasn't coercing the
	char's to ints).
	* hppah-tdep.c:  Rename global functions to have consistent hppa_
	prefix.  Make more functions static.  Drop hp_ prefix from static
	functions.  (hppa_push_arguments):  Call value_arg_coerce to cast
	char to int args if necessary.  (hppa_fix_call_dummy):  Create
	this routine from FIX_CALL_DUMMY macro in tm-hppa.h.
	* inferior.h (PC_IN_CALL_DUMMY):  Check for frame_address being
	valid (ie: != 0) before doing comparison against PC.
	* valops.c (call_function_by_hand):  Adjust call to FIX_CALL_DUMMY
	to reflect new arguments.
	* config/pa/tm-hppa.h (POP_FRAME, PUSH_ARGUMENTS):  Use new hppa_
	prefix for func	name.  (FIX_CALL_DUMMY):  Move code into
	hppah-tdep.c.

	* testsuite/gdb.t16/gdbme.c, testsuite/gdb.t17/gdbme.c:  Add calls
	to malloc() so that we can test GDB eval of dynamically created
	arrays (like char strings in `print "foo"').
1993-04-23 18:01:02 +00:00
Stu Grossman
fa9265e55d * hppa-pinsn.c (print_insn): Use read_memory_integer, instead of
read_memory to get byte order right.
	* hppah-tdep.c (find_unwind_info):  Don't read in unwind info
	anymore.  This is done in paread.c now.  We expect unwind info
	to hang off of objfiles, and search all of the objfiles when until
	we find a match.
	* (skip_trampoline_code):  Cast arg to target_read_memory.
	* objfiles.h (struct objfile):  Add new field obj_private to hold
	per object file private data (unwind info in this case).
	* paread.c (read_unwind_info):  New routine to read unwind info
	for the objfile.  This data is hung off of obj_private.
	* tm-hppa.h:  Define struct obj_unwind_info, to hold pointers to
	the unwind info for this objfile.  Also define OBJ_UNWIND_INFO to
	make this easier to access.
1993-01-15 00:06:50 +00:00
Stu Grossman
0213d96f60 * blockframe.c (frameless_look_for_prologue): Correct the
comment.
	* gdbtypes.h, gdbtypes.c:  Use const in decl of
	cplus_struct_default, now that pa-gas assembler has been fixed.
	* hppah-nat.c:  Formatting.
	* hppah-tdep.c:  Remove lots of useless externs for variables we
	don't use.
	* (find_unwind_entry):  Speed up by using binary search, and a one
	entry cache.
	* (rp_saved):  New routine to see what unwind info says about RP
	being saved on the stack frame.
	* (frame_saved_pc):  Look for prologue to see if we need to
	examine the stack for the saved RP or not.
	* (init_extra_frame_info):  Check for prologue, instead of
	framesize to determine if we are frameless or not.
	* (frame_chain_valid):  Stop backtraces when we run into _start.
	* (push_dummy_frame):  Reformat to make more readable.
	* (find_dummy_frame_regs):  ditto.
	* (hp_pop_frame):  ditto.
	* (hp_restore_pc_queue):  small cleanup.
	* (hp_push_arguments):  ditto.
	* (pa_do_registers_info):  ditto.
	* (skip_prologue):  New routine created from SKIP_PROLOGUE macro.
	* tm-hppa.h:  Move contents of SKIP_PROLOGUE into hppah-tdep.c.
	* Define FRAME_CHAIN_VALID.
	* Turn on BELIEVE_PCC_PROMOTION so that we can access char args
	passed to functions.

	* paread.c (pa_symtab_read):  Use new bfd conventions for
	accessing linker symbol table.
	* (pa_symfile_init):  Access embedded STAB info via BFD section
	mechanism and related macros.
1993-01-10 04:23:06 +00:00
Stu Grossman
b8ef816335 * hppah-tdep.c (skip_trampoline_code): Use new macros for
accessing minimal symbol data.
	* infcmd.c (read_pc):  Use #ifdef, not #if.
	* symfile.c (syms_from_objfile):  Add CONST to decl for targets.
	* tm-hppa.h (FIX_CALL_DUMMY):  Use new macros for accessing
	minimal symbol data.
1992-12-29 00:27:18 +00:00
Stu Grossman
b5c10493e9 * hppah-tdep.c (frame_saved_pc): Use better test for outermost
frame.  Use find_return_regnum to find the caller.
	* (find_unwind_entry):  New routine to locate stack frame info
	associated with a procedure.  This looks in the $UNWIND_START$
	section in the SOM file.
	* (find_return_regnum):  New routine.  Uses find_unwind_entry() to
	figure out where the caller's return address is stored.
	* (find_proc_framesize):  New routine.  Uses find_unwind_entry()
	to figure out the frame size for a procedure.
	* (saved_pc_after_call):  New routine, moved from tm-hppa.h.
	* (init_extra_frame_info):  New routine.  Corrects PC and FP for
	outermost frame if necessary.
	* (frame_chain):  New routine, moved from tm-hppa.h.
	* (skip_trampoline_code):  Handle computed function calls (ie:
	calls from $$dyncall).
	* (unwind_command):  Temporary support function to allow user
	to control/observe aspects of the unwind (stack frame) info.
	* infcmd.c (read_pc):  (Temporary), put a hack in to see if the PC
	was in a system call, if so, then read the PC from r31.
	* tm-hppah.h (SKIP_TRAMPOLINE_CODE, IN_SOLIB_TRAMPOLINE):  Deal
	with extra arg for skip_trampoline_code().
	* (INIT_EXTRA_FRAME_INFO):  Define to point at subr (see above).
	* (FRAME_CHAIN, FRAME_CHAIN_VALID):  Turn into real subroutines.
	* tm-hppa.h (SAVED_PC_AFTER_CALL):  Turn into real subroutine.
1992-12-28 23:19:51 +00:00
Stu Grossman
9f739abdac * hppa-pinsn.c (print_insn): Improve handling of be and ble
branch targets to compute target address using const from previous
	instruction if necessary.
	* Add `Q' operator to print out bit position field various
	instructions.
	* hppah-nat.c:  #include sys/param.h, and sys/user.h.  General
	cleanups, use new code from Utah.
	* (store_inferior_registers):  Update to new code from Utah.
	* (initialize_kernel_u_addr):  Re-enable decl of struct user u.
	* (fetch_register):  Clear out priv level when reading PCs.
	* hppah-tdep.c:  Get rid of gobs of KERNELDEBUG stuff.
	* Remove decl of errno, #include wait.h and target.h.
	* (frame_saved_pc):  Check `flags' pseudo-register to see if we
	were inside of a kernel call.  If so, then PC is in a different
	register.  Also, mask out bottom two bits of all PCs so as not to
	confuse higher level code.
	* (push_dummy_frame):  Create from #define in tm-hppa.h.
	* (find_dummy_frame_regs):  Update from Utah.
	* (hp_pop_frame):  Create from #define in tm-hppa.h.
	* (hp_restore_pc_queue):  New, from Utah.
	* (hp_push_arguments):  Big fixes from Utah.
	* (pa_do_registers_info, pa_print_registers):  Only print out fp
	regs upon request.
	* (skip_trampoline_code):  New routine to deal with stubs that
	live in nowhereland between callers and callees.
	* i860-tdep.c:  Remove decl of attach_flag.
	* infrun.c (wait_for_inferior):  Add new macro
	INSTRUCTION_NULLIFIED, which can tell if the instruction pointed
	at by PC will be nullified.  If so, then step the target once more
	so as to avoid confusing the user.
	* (just before step_over_function:):  Use stop_func_start, not
	stop_pc when checking for the existance of line number info.
	stop_func_start will reflect the proper address of the target
	routine, not of the stub that we may be traversing to get there.
	* tm-hppa.h:  define SKIP_TRAMPOLINE_CODE and IN_SOLIB_TRAMPOLINE
	to deal with the stubs that PA compilers sometimes stick between
	callers and callees.  Also, define FLAGS_REGNUM for access to the
	`flags' pseudo-reg.
	* (REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW):  Use
	memcpy, not bcopy.
	* (CANNOT_STORE_REGISTER):  New from Utah.  Says that we can't
	write gr0, PC regs, and PSW!
	* (FRAME_FIND_SAVED_REGS):  Bug fixes from Utah.
	* (PUSH_DUMMY_FRAME, POP_FRAME):  Make into real routines in
	hppah-nat.c.
	* (CALL_DUMMY, FIX_CALL_DUMMY):  Fixes from Utah.
	* Define struct unwind_table_entry.
	* valops.c (call_function_by_hand):  Add another arg to
	FIX_CALL_DUMMY (under #ifdef GDB_TARGET_IS_HPPA).  Why is this
	necessary?
1992-12-22 03:18:46 +00:00
Stu Grossman
01d1590bab * convex-xdep.c, hppab-nat.c, i860-tdep.c, infptrace.c: Remove
decl for attach_flag, it now lives in inferior.h.
* hppa-pinsn.c:  Reformat opcode tables.  Add function prototypes.
Make most functions static.
* hppah-nat.c:  General cleanups, remove BSD specific code (since
that all lives in hppab-nat.c).
* hppah-tdep.c (frame_chain_valid), tm-hppa.h (FRAME_CHAIN):
Change sense of test against inside_entry_file().  This fix is
from U. of Utah.
* tm-hppa.h (PUSH_DUMMY_FRAME, POP_FRAME):  Use char * for 2nd arg
to read/write_register_bytes().
1992-12-15 01:45:15 +00:00
K. Richard Pixley
ca0487229b hppa native support 1992-10-21 04:57:35 +00:00
John Gilmore
fb1415aebe Rename all HPPA files to fit into unique DOS filenames:
*hppabsd*  => *hppab*       *hppahpux* => *hppah*
1992-09-26 10:27:10 +00:00