diff options
author | gdb-3.1 <gdb@fsf.org> | 1989-01-31 17:56:40 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-06-03 15:36:31 +0100 |
commit | e91b87a36830d061ef87d67be5f309e4d4ed918f (patch) | |
tree | 3408ea913a9cccd51c9b7d0b3bc7d7897cac8a5b /gdb/m-pn.h | |
parent | bb7592f01006b09c846831a9fb9c306307ba34f6 (diff) | |
download | gdb-e91b87a36830d061ef87d67be5f309e4d4ed918f.zip gdb-e91b87a36830d061ef87d67be5f309e4d4ed918f.tar.gz gdb-e91b87a36830d061ef87d67be5f309e4d4ed918f.tar.bz2 |
gdb-3.1
Diffstat (limited to 'gdb/m-pn.h')
-rw-r--r-- | gdb/m-pn.h | 56 |
1 files changed, 37 insertions, 19 deletions
@@ -17,8 +17,8 @@ notice and this notice must be preserved on all copies. In other words, go ahead and share GDB, but don't try to stop anyone else from sharing it farther. Help stamp out software hoarding! */ -/* Read file headers properly in core.c */ -#define gould +/* This code appears in libraries on Gould machines. Ignore it. */ +#define IGNORE_SYMBOL(type) (type == N_ENTRY) /* Macro for text-offset and data info (in PN a.out format). */ #define TEXTINFO \ @@ -195,6 +195,12 @@ anyone else from sharing it farther. Help stamp out software hoarding! */ /* Return 1 if P points to an invalid floating point value. */ #define INVALID_FLOAT(p, len) ((*(short *)p & 0xff80) == 0x8000) +/* Largest integer type */ +#define LONGEST long + +/* Name of the builtin type for the LONGEST type above. */ +#define BUILTIN_TYPE_LONGEST builtin_type_long + /* Say how long (ordinary) registers are. */ #define REGISTER_TYPE long @@ -280,6 +286,14 @@ anyone else from sharing it farther. Help stamp out software hoarding! */ of data in register N. */ #define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int) +/* Store the address of the place in which to copy the structure the + subroutine will return. This is called from call_function. + + On this machine this is a no-op, because gcc isn't used on it + yet. So this calling convention is not used. */ + +#define STORE_STRUCT_RETURN(ADDR, SP) + /* Extract from an arrary REGBUF containing the (raw) register state a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ @@ -319,21 +333,21 @@ anyone else from sharing it farther. Help stamp out software hoarding! */ #define FRAME_CHAIN(thisframe) (findframe(thisframe)) #define FRAME_CHAIN_VALID(chain, thisframe) \ - (chain != 0 && chain != thisframe) + (chain != 0 && chain != (thisframe)->frame) #define FRAME_CHAIN_COMBINE(chain, thisframe) \ (chain) /* Define other aspects of the stack frame on NPL. */ -#define FRAME_SAVED_PC(frame,ignore) \ - (read_memory_integer (frame + 8, 4)) +#define FRAME_SAVED_PC(frame) \ + (read_memory_integer ((frame)->frame + 8, 4)) #define FRAME_ARGS_ADDRESS(fi) \ - ((fi).next_frame ? \ - read_memory_integer ((fi).frame + 12, 4) : \ + ((fi)->next_frame ? \ + read_memory_integer ((fi)->frame + 12, 4) : \ read_register (AP_REGNUM)) -#define FRAME_LOCALS_ADDRESS(fi) ((fi).frame + 80) +#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame + 80) /* Set VAL to the number of args passed to frame described by FI. Can set VAL to -1, meaning no way to tell. */ @@ -354,11 +368,11 @@ anyone else from sharing it farther. Help stamp out software hoarding! */ #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ { \ bzero (&frame_saved_regs, sizeof frame_saved_regs); \ - (frame_saved_regs).regs[PC_REGNUM] = (frame_info).frame + 8; \ - (frame_saved_regs).regs[R4_REGNUM] = (frame_info).frame + 0x30; \ - (frame_saved_regs).regs[R5_REGNUM] = (frame_info).frame + 0x34; \ - (frame_saved_regs).regs[R6_REGNUM] = (frame_info).frame + 0x38; \ - (frame_saved_regs).regs[R7_REGNUM] = (frame_info).frame + 0x3C; \ + (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 8; \ + (frame_saved_regs).regs[R4_REGNUM] = (frame_info)->frame + 0x30; \ + (frame_saved_regs).regs[R5_REGNUM] = (frame_info)->frame + 0x34; \ + (frame_saved_regs).regs[R6_REGNUM] = (frame_info)->frame + 0x38; \ + (frame_saved_regs).regs[R7_REGNUM] = (frame_info)->frame + 0x3C; \ } /* Things needed for making the inferior call functions. */ @@ -380,12 +394,14 @@ anyone else from sharing it farther. Help stamp out software hoarding! */ restoring all saved registers. */ #define POP_FRAME \ -{ register CORE_ADDR fp = read_register (FP_REGNUM); \ +{ register FRAME frame = get_current_frame (); \ + register CORE_ADDR fp; \ register int regnum; \ struct frame_saved_regs fsr; \ - struct frame_info fi; \ - fi = get_frame_info (fp); \ - get_frame_saved_regs (&fi, &fsr); \ + struct frame_info *fi; \ + fi = get_frame_info (frame); \ + fp = fi->frame; \ + get_frame_saved_regs (fi, &fsr); \ for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--) \ if (fsr.regs[regnum]) \ write_register (regnum, read_memory_integer (fsr.regs[regnum], 4)); \ @@ -394,7 +410,9 @@ anyone else from sharing it farther. Help stamp out software hoarding! */ write_register (FP_REGNUM, read_memory_integer (fp, 4)); \ write_register (PC_REGNUM, read_memory_integer (fp + 4, 4)); \ write_register (SP_REGNUM, fp + 8); \ - set_current_frame (read_register (FP_REGNUM)); } + flush_cached_frames (); \ + set_current_frame ( create_new_frame (read_register (FP_REGNUM),\ + read_pc ())); } /* This sequence of words is the instructions: halt @@ -427,7 +445,7 @@ anyone else from sharing it farther. Help stamp out software hoarding! */ /* Insert the specified number of args and function address into a call sequence of the above form stored at DUMMYNAME. */ -#define FIX_CALL_DUMMY(dummyname, fun, nargs) \ +#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, type) \ { *(int *)((char *) dummyname + 20) = nargs * 4; \ *(int *)((char *) dummyname + 14) = fun; } |