From J. Law:
* infcmd.c (read_pc): Remove PA specific code. * tm-hppa.h (TARGET_READ_PC): Define. * hppa-tdep.c (target_read_pc): New function.
This commit is contained in:
parent
775d4a4096
commit
d3862cae59
3 changed files with 34 additions and 14 deletions
|
@ -1,5 +1,10 @@
|
||||||
Fri Jul 30 08:58:01 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
Fri Jul 30 08:58:01 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
From J. Law:
|
||||||
|
* infcmd.c (read_pc): Remove PA specific code.
|
||||||
|
* tm-hppa.h (TARGET_READ_PC): Define.
|
||||||
|
* hppa-tdep.c (target_read_pc): New function.
|
||||||
|
|
||||||
* symtab.c (gdb_mangle_name): Deal with it if type lacks a name.
|
* symtab.c (gdb_mangle_name): Deal with it if type lacks a name.
|
||||||
|
|
||||||
Fri Jul 30 07:36:53 1993 Fred Fish (fnf@deneb.cygnus.com)
|
Fri Jul 30 07:36:53 1993 Fred Fish (fnf@deneb.cygnus.com)
|
||||||
|
|
|
@ -44,12 +44,16 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
/* When passing a structure to a function, GCC passes the address
|
/* When passing a structure to a function, GCC passes the address
|
||||||
in a register, not the structure itself. */
|
in a register, not the structure itself. */
|
||||||
|
|
||||||
|
/* FIXME: I believe this is wrong. I believe passing the address
|
||||||
|
depends only on the size of the argument being > 8, not on its type
|
||||||
|
(which is a much more sane way than the REG_STRUCT_HAS_ADDR way,
|
||||||
|
IMHO). Also, as far as I know it is not dependent on it being
|
||||||
|
passed in a register. This should be verified before changing
|
||||||
|
anything (in fact, printing structure arguments of
|
||||||
|
2,4,6,8,12,16,and 20 bytes should all be in the test suite). */
|
||||||
|
|
||||||
#define REG_STRUCT_HAS_ADDR(gcc_p) (1)
|
#define REG_STRUCT_HAS_ADDR(gcc_p) (1)
|
||||||
|
|
||||||
/* Groan */
|
|
||||||
|
|
||||||
#define ARGS_GROW_DOWN
|
|
||||||
|
|
||||||
/* Offset from address of function to start of its code.
|
/* Offset from address of function to start of its code.
|
||||||
Zero on most machines. */
|
Zero on most machines. */
|
||||||
|
|
||||||
|
@ -77,11 +81,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
the new frame is not set up until the new function executes
|
the new frame is not set up until the new function executes
|
||||||
some instructions. */
|
some instructions. */
|
||||||
|
|
||||||
#define SAVED_PC_AFTER_CALL(frame) (read_register (RP_REGNUM) & ~3)
|
#undef SAVED_PC_AFTER_CALL
|
||||||
|
#define SAVED_PC_AFTER_CALL(frame) saved_pc_after_call (frame)
|
||||||
/* Address of end of stack space. Who knows. */
|
|
||||||
|
|
||||||
#define STACK_END_ADDR 0x80000000
|
|
||||||
|
|
||||||
/* Stack grows upward */
|
/* Stack grows upward */
|
||||||
|
|
||||||
|
@ -139,10 +140,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
"sr3", "sr5", "sr6", "sr7", "cr0", "cr8", "cr9", "ccr", "cr12", "cr13", \
|
"sr3", "sr5", "sr6", "sr7", "cr0", "cr8", "cr9", "ccr", "cr12", "cr13", \
|
||||||
"cr24", "cr25", "cr26", "mpsfu_high", "mpsfu_low", "mpsfu_ovflo", "pad", \
|
"cr24", "cr25", "cr26", "mpsfu_high", "mpsfu_low", "mpsfu_ovflo", "pad", \
|
||||||
"fpsr", "fpe1", "fpe2", "fpe3", "fpe4", "fpe5", "fpe6", "fpe7", \
|
"fpsr", "fpe1", "fpe2", "fpe3", "fpe4", "fpe5", "fpe6", "fpe7", \
|
||||||
"fp4", "fp5", "fp6", "fp7", "fp8", \
|
"fr4", "fr5", "fr6", "fr7", "fr8", \
|
||||||
"fp9", "fp10", "fp11", "fp12", "fp13", "fp14", "fp15", \
|
"fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15", \
|
||||||
"fp16", "fp17", "fp18", "fp19", "fp20", "fp21", "fp22", "fp23", \
|
"fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23", \
|
||||||
"fp24", "fp25", "fp26", "fp27", "fp28", "fp29", "fp30", "fp31"}
|
"fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31"}
|
||||||
|
|
||||||
/* Register numbers of various important registers.
|
/* Register numbers of various important registers.
|
||||||
Note that some of these values are "real" register numbers,
|
Note that some of these values are "real" register numbers,
|
||||||
|
@ -313,7 +314,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
by FI does not have a frame on the stack associated with it. If it
|
by FI does not have a frame on the stack associated with it. If it
|
||||||
does not, FRAMELESS is set to 1, else 0. */
|
does not, FRAMELESS is set to 1, else 0. */
|
||||||
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
|
||||||
(FRAMELESS) = frameless_look_for_prologue(FI)
|
(FRAMELESS) = frameless_function_invocation(FI)
|
||||||
|
|
||||||
#define FRAME_SAVED_PC(FRAME) frame_saved_pc (FRAME)
|
#define FRAME_SAVED_PC(FRAME) frame_saved_pc (FRAME)
|
||||||
|
|
||||||
|
@ -563,3 +564,5 @@ struct obj_unwind_info {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define OBJ_UNWIND_INFO(obj) ((struct obj_unwind_info *)obj->obj_private)
|
#define OBJ_UNWIND_INFO(obj) ((struct obj_unwind_info *)obj->obj_private)
|
||||||
|
|
||||||
|
#define TARGET_READ_PC() target_read_pc ()
|
||||||
|
|
|
@ -840,6 +840,18 @@ hppa_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
|
||||||
return dyncall_addr;
|
return dyncall_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Get the PC from %r31 if currently in a syscall. Also mask out privilege
|
||||||
|
bits. */
|
||||||
|
CORE_ADDR
|
||||||
|
target_read_pc ()
|
||||||
|
{
|
||||||
|
int flags = read_register (FLAGS_REGNUM);
|
||||||
|
|
||||||
|
if (flags & 2)
|
||||||
|
return read_register (31) & ~0x3;
|
||||||
|
return read_register (PC_REGNUM) & ~0x3;
|
||||||
|
}
|
||||||
|
|
||||||
/* return the alignment of a type in bytes. Structures have the maximum
|
/* return the alignment of a type in bytes. Structures have the maximum
|
||||||
alignment required by their fields. */
|
alignment required by their fields. */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue