diff options
author | Stan Shebs <shebs@codesourcery.com> | 1994-11-04 01:19:29 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1994-11-04 01:19:29 +0000 |
commit | 669caa9c191f9bfeaed53d65b4f1d4967b22a380 (patch) | |
tree | fb2a02c6e673aee73f93455ed14e561a4adb8e02 /gdb/m88k-tdep.c | |
parent | 0128cbae50e269c59d85affb5c104329fd8d2ffd (diff) | |
download | binutils-gdb-669caa9c191f9bfeaed53d65b4f1d4967b22a380.tar.gz |
Replace useless FRAME, FRAME_ADDR types with struct frame_info *
and CORE_ADDR, respectively.
* frame.h (FRAME, FRAME_INFO_ID, FRAME_ADDR): Remove.
* blockframe.c (get_frame_info): Remove.
* a29k-tdep.c, alpha-tdep.c, blockframe.c, breakpoint.c,
breakpoint.h, energize.c, findvar.c, gdbtk.c, gould-pinsn.c,
h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, i386-tdep.c, i960-tdep.c,
infcmd.c, inferior.h, infrun.c, m68k-tdep.c, m88k-tdep.c,
mips-tdep.c, nindy-tdep.c, printcmd.c, pyr-tdep.c, rs6000-tdep.c,
sh-tdep.c, sparc-tdep.c, stack.c, valops.c, z8k-tdep.c,
config/a29k/tm-a29k.h, config/alpha/tm-alpha.h,
config/gould/tm-pn.h, config/h8300/tm-h8300.h,
config/h8500/tm-h8500.h, config/mips/tm-mips.h,
config/ns32k/tm-merlin.h, config/ns32k/tm-umax.h,
config/pyr/tm-pyr.h, config/sparc/tm-sparc.h): Replace FRAME with
struct frame_info * everywhere, replace FRAME_ADDR with CORE_ADDR,
rename variables consistently (using `frame' or `fi'), remove
calls to get_frame_info and FRAME_INFO_ID, remove comments about
FRAME and FRAME_ADDR cruftiness.
Diffstat (limited to 'gdb/m88k-tdep.c')
-rw-r--r-- | gdb/m88k-tdep.c | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c index 747db1bc2d5..3c8e0e39e75 100644 --- a/gdb/m88k-tdep.c +++ b/gdb/m88k-tdep.c @@ -1,5 +1,5 @@ /* Target-machine dependent code for Motorola 88000 series, for GDB. - Copyright (C) 1988, 1990, 1991 Free Software Foundation, Inc. + Copyright (C) 1988, 1990, 1991, 1994 Free Software Foundation, Inc. This file is part of GDB. @@ -22,7 +22,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "inferior.h" #include "value.h" #include "gdbcore.h" - #include "symtab.h" #include "setjmp.h" #include "value.h" @@ -32,8 +31,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ void frame_find_saved_regs (); -/* is this target an m88110? Otherwise assume m88100. This has - relevance for the ways in which we screw with instruction pointers. */ +/* Is this target an m88110? Otherwise assume m88100. This has + relevance for the ways in which we screw with instruction pointers. */ + int target_is_m88110 = 0; /* Given a GDB frame, determine the address of the calling function's frame. @@ -43,9 +43,9 @@ int target_is_m88110 = 0; For us, the frame address is its stack pointer value, so we look up the function prologue to determine the caller's sp value, and return it. */ -FRAME_ADDR +CORE_ADDR frame_chain (thisframe) - FRAME thisframe; + struct frame_info *thisframe; { frame_find_saved_regs (thisframe, (struct frame_saved_regs *) 0); @@ -60,7 +60,7 @@ frame_chain (thisframe) int frameless_function_invocation (frame) - FRAME frame; + struct frame_info *frame; { frame_find_saved_regs (frame, (struct frame_saved_regs *) 0); @@ -74,13 +74,13 @@ frameless_function_invocation (frame) } void -init_extra_frame_info (fromleaf, fi) +init_extra_frame_info (fromleaf, frame) int fromleaf; - struct frame_info *fi; + struct frame_info *frame; { - fi->fsr = 0; /* Not yet allocated */ - fi->args_pointer = 0; /* Unknown */ - fi->locals_pointer = 0; /* Unknown */ + frame->fsr = 0; /* Not yet allocated */ + frame->args_pointer = 0; /* Unknown */ + frame->locals_pointer = 0; /* Unknown */ } /* Examine an m88k function prologue, recording the addresses at which @@ -204,14 +204,15 @@ next_insn (memaddr, pword1) /* Read a register from frames called by us (or from the hardware regs). */ static int -read_next_frame_reg(fi, regno) - FRAME fi; +read_next_frame_reg(frame, regno) + struct frame_info *frame; int regno; { - for (; fi; fi = fi->next) { - if (regno == SP_REGNUM) return fi->frame; - else if (fi->fsr->regs[regno]) - return read_memory_integer(fi->fsr->regs[regno], 4); + for (; frame; frame = frame->next) { + if (regno == SP_REGNUM) + return FRAME_FP (frame); + else if (frame->fsr->regs[regno]) + return read_memory_integer(frame->fsr->regs[regno], 4); } return read_register(regno); } @@ -229,7 +230,7 @@ static CORE_ADDR examine_prologue (ip, limit, frame_sp, fsr, fi) register CORE_ADDR ip; register CORE_ADDR limit; - FRAME_ADDR frame_sp; + CORE_ADDR frame_sp; struct frame_saved_regs *fsr; struct frame_info *fi; { @@ -395,7 +396,7 @@ skip_prologue (ip) sal = find_pc_line (ip, 0); limit = (sal.end) ? sal.end : 0xffffffff; - return (examine_prologue (ip, limit, (FRAME_ADDR) 0, &saved_regs_dummy, + return (examine_prologue (ip, limit, (CORE_ADDR) 0, &saved_regs_dummy, (struct frame_info *)0 )); } @@ -502,7 +503,7 @@ frame_args_address (fi) CORE_ADDR frame_saved_pc (frame) - FRAME frame; + struct frame_info *frame; { return read_next_frame_reg(frame, SRP_REGNUM); } @@ -559,17 +560,15 @@ m88k_push_dummy_frame() void pop_frame () { - register FRAME frame = get_current_frame (); + register struct frame_info *frame = get_current_frame (); register CORE_ADDR fp; register int regnum; struct frame_saved_regs fsr; - struct frame_info *fi; - fi = get_frame_info (frame); - fp = fi -> frame; - get_frame_saved_regs (fi, &fsr); + fp = FRAME_FP (frame); + get_frame_saved_regs (frame, &fsr); - if (PC_IN_CALL_DUMMY (read_pc(), read_register(SP_REGNUM), FRAME_FP(fi))) + if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), FRAME_FP (fi))) { /* FIXME: I think get_frame_saved_regs should be handling this so that we can deal with the saved registers properly (e.g. frame @@ -605,7 +604,7 @@ pop_frame () if (fsr.regs[regnum]) write_register (regnum, read_memory_integer (fsr.regs[regnum], 4)); - write_pc(frame_saved_pc(frame)); + write_pc (frame_saved_pc (frame)); } reinit_frame_cache (); } |