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/z8k-tdep.c | |
parent | 0128cbae50e269c59d85affb5c104329fd8d2ffd (diff) | |
download | gdb-669caa9c191f9bfeaed53d65b4f1d4967b22a380.zip gdb-669caa9c191f9bfeaed53d65b4f1d4967b22a380.tar.gz gdb-669caa9c191f9bfeaed53d65b4f1d4967b22a380.tar.bz2 |
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/z8k-tdep.c')
-rw-r--r-- | gdb/z8k-tdep.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c index dba58cf..60a07be 100644 --- a/gdb/z8k-tdep.c +++ b/gdb/z8k-tdep.c @@ -1,5 +1,5 @@ /* Target-machine dependent code for Zilog Z8000, for GDB. - Copyright (C) 1992,1993 Free Software Foundation, Inc. + Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GDB. @@ -29,6 +29,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "gdbcmd.h" #include "gdbtypes.h" #include "dis-asm.h" + /* Return the saved PC from this frame. If the frame has a memory copy of SRP_REGNUM, use that. If not, @@ -36,9 +37,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ CORE_ADDR frame_saved_pc (frame) - FRAME frame; + struct frame_info *frame; { - return (read_memory_pointer (frame->frame + (BIG ? 4 : 2))); + return read_memory_pointer (frame->frame + (BIG ? 4 : 2)); } #define IS_PUSHL(x) (BIG ? ((x & 0xfff0) == 0x91e0):((x & 0xfff0) == 0x91F0)) @@ -147,24 +148,24 @@ addr_bits_remove (x) return x & PTR_MASK; } +int read_memory_pointer (x) CORE_ADDR x; { - return read_memory_integer (ADDR_BITS_REMOVE (x), BIG ? 4 : 2); } -FRAME_ADDR +CORE_ADDR frame_chain (thisframe) - FRAME thisframe; + struct frame_info *thisframe; { if (thisframe->prev == 0) { /* This is the top of the stack, let's get the sp for real */ } - if (!inside_entry_file ((thisframe)->pc)) + if (!inside_entry_file (thisframe->pc)) { - return read_memory_pointer ((thisframe)->frame); + return read_memory_pointer (thisframe->frame); } return 0; } @@ -210,7 +211,7 @@ print_insn (memaddr, stream) { disassemble_info info; - GDB_INIT_DISASSEMBLE_INFO(info, stream); + GDB_INIT_DISASSEMBLE_INFO (info, stream); if (BIG) { @@ -268,7 +269,7 @@ frame_find_saved_regs (fip, fsrp) pc = skip_adjust (get_pc_function_start (fip->pc), &locals); { - adr = fip->frame - locals; + adr = FRAME_FP (fip) - locals; for (i = 0; i < 8; i++) { int word = read_memory_short (pc); @@ -304,41 +305,42 @@ saved_pc_after_call () } -extract_return_value(type, regbuf, valbuf) -struct type *type; -char *regbuf; -char *valbuf; +extract_return_value (type, regbuf, valbuf) + struct type *type; + char *regbuf; + char *valbuf; { int b; - int len = TYPE_LENGTH(type); + int len = TYPE_LENGTH (type); - for (b = 0; b < len; b += 2) { - int todo = len - b; - if (todo > 2) - todo = 2; - memcpy(valbuf + b, regbuf + b, todo); - } + for (b = 0; b < len; b += 2) + { + int todo = len - b; + + if (todo > 2) + todo = 2; + memcpy (valbuf + b, regbuf + b, todo); + } } void -write_return_value(type, valbuf) -struct type *type; -char *valbuf; +write_return_value (type, valbuf) + struct type *type; + char *valbuf; { int reg; int len; - for (len = 0; len < TYPE_LENGTH(type); len += 2) - { - write_register_bytes(REGISTER_BYTE(len /2 + 2), valbuf + len, 2); - } + + for (len = 0; len < TYPE_LENGTH (type); len += 2) + write_register_bytes (REGISTER_BYTE (len / 2 + 2), valbuf + len, 2); } void -store_struct_return(addr, sp) -CORE_ADDR addr; -CORE_ADDR sp; +store_struct_return (addr, sp) + CORE_ADDR addr; + CORE_ADDR sp; { - write_register(2, addr); + write_register (2, addr); } @@ -427,10 +429,8 @@ unsegmented_command (args, from_tty) int from_tty; { z8k_set_pointer_size (16); - } - static void set_memory (args, from_tty) char *args; |