aboutsummaryrefslogtreecommitdiff
path: root/gdb/sh-tdep.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-11-04 01:19:29 +0000
committerStan Shebs <shebs@codesourcery.com>1994-11-04 01:19:29 +0000
commit669caa9c191f9bfeaed53d65b4f1d4967b22a380 (patch)
treefb2a02c6e673aee73f93455ed14e561a4adb8e02 /gdb/sh-tdep.c
parent0128cbae50e269c59d85affb5c104329fd8d2ffd (diff)
downloadgdb-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/sh-tdep.c')
-rw-r--r--gdb/sh-tdep.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 9fcb8c0..476246e 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -32,9 +32,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "dis-asm.h"
#include "../opcodes/sh-opc.h"
-
-
-
/* Prologue looks like
[mov.l <regs>,@-r15]...
[sts.l pr,@-r15]
@@ -56,7 +53,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
CORE_ADDR
sh_skip_prologue (start_pc)
CORE_ADDR start_pc;
-
{
int w;
@@ -84,7 +80,9 @@ print_insn (memaddr, stream)
GDB_FILE *stream;
{
disassemble_info info;
+
GDB_INIT_DISASSEMBLE_INFO (info, stream);
+
return print_insn_sh (memaddr, &info);
}
@@ -95,12 +93,12 @@ print_insn (memaddr, stream)
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
-sh_frame_chain (thisframe)
- FRAME thisframe;
+CORE_ADDR
+sh_frame_chain (frame)
+ struct frame_info *frame;
{
- if (!inside_entry_file (thisframe->pc))
- return (read_memory_integer (FRAME_FP (thisframe) + thisframe->f_offset, 4));
+ if (!inside_entry_file (frame->pc))
+ return read_memory_integer (FRAME_FP (frame) + frame->f_offset, 4);
else
return 0;
}
@@ -254,15 +252,13 @@ init_extra_frame_info (fromleaf, fi)
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);
/* Copy regs from where they were saved in the frame */
for (regnum = 0; regnum < NUM_REGS; regnum++)
@@ -279,10 +275,11 @@ pop_frame ()
}
/* Print the registers in a form similar to the E7000 */
+
static void
show_regs (args, from_tty)
-char *args;
-int from_tty;
+ char *args;
+ int from_tty;
{
printf_filtered("PC=%08x SR=%08x PR=%08x MACH=%08x MACHL=%08x\n",
read_register(PC_REGNUM),