diff options
author | Steve Chamberlain <sac@cygnus> | 1995-05-24 23:56:24 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1995-05-24 23:56:24 +0000 |
commit | 54af8e6e7bc98d625c39796a55b82393572595d6 (patch) | |
tree | 502197f9e92be8e32d4503eb26d0305616081e77 | |
parent | 4cea100d33f39a57c5e9f72270c453f4bf92ca2e (diff) | |
download | fsf-binutils-gdb-54af8e6e7bc98d625c39796a55b82393572595d6.zip fsf-binutils-gdb-54af8e6e7bc98d625c39796a55b82393572595d6.tar.gz fsf-binutils-gdb-54af8e6e7bc98d625c39796a55b82393572595d6.tar.bz2 |
Wed May 24 15:49:47 1995 Steve Chamberlain <sac@slash.cygnus.com>
* arm-tdep.c (convert_from_extended, convert_to_extended):
New.
* coffread.c (enter_linenos): Return if linetab 0.
* config/arm/arm.mt (TDEPFILES): Add simulator support.
* config/arm/tm-arm.h (FRAME_FIND_SAVED_REGS): Fix prototypes.
-rw-r--r-- | gdb/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 108 | ||||
-rw-r--r-- | gdb/config/arm/arm.mt | 2 |
3 files changed, 109 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 95b1c73..de2d32f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +Wed May 24 15:49:47 1995 Steve Chamberlain <sac@slash.cygnus.com> + + * arm-tdep.c (convert_from_extended, convert_to_extended): + New. + * coffread.c (enter_linenos): Return if linetab 0. + * config/arm/arm.mt (TDEPFILES): Add simulator support. + * config/arm/tm-arm.h (FRAME_FIND_SAVED_REGS): Fix prototypes. + +Mon May 22 19:37:21 1995 Rob Savoye <rob@darkstar.cygnus.com> + + * config/idt.mt: replace monitor and array-rom with the new + remote-array. + Mon May 22 15:38:25 1995 Stu Grossman (grossman@cygnus.com) * remote-nindy.c: Install Kung patch for PR 6820. I have no idea diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index b4fe1b5..1a8b027 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1,28 +1,28 @@ -/* Copyright (C) 1988, 1989 Free Software Foundation, Inc. +/* Target-dependent code for the Acorn Risc Machine, for GDB, the GNU Debugger. + Copyright 1988, 1989, 1991, 1992, 1993, 1995 Free Software Foundation, Inc. This file is part of GDB. -GDB is free software; you can redistribute it and/or modify +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. -GDB is distributed in the hope that it will be useful, +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GDB; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "defs.h" -#include "param.h" #include "frame.h" #include "inferior.h" -#include "arm-opcode.h" -#include <stdio.h> +#if 0 +#include "gdbcore.h" #include <sys/param.h> #include <sys/dir.h> #include <signal.h> @@ -33,14 +33,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define N_TXTADDR(hdr) 0x8000 #define N_DATADDR(hdr) (hdr.a_text + 0x8000) -#include "gdbcore.h" #include <sys/user.h> /* After a.out.h */ #include <sys/file.h> #include <sys/stat.h> #include <errno.h> +#endif +#if 0 /* Work with core dump and executable files, for GDB. This code would be in core.c if it weren't machine-dependent. */ @@ -157,7 +158,9 @@ exec_file_command (filename, from_tty) if (exec_file_display_hook) (*exec_file_display_hook) (filename); } +#endif +#if 0 /* Read from the program's memory (except for inferior processes). This function is misnamed, since it only reads, never writes; and since it will use the core file and/or executable file as necessary. @@ -309,7 +312,7 @@ xfer_core_file (memaddr, myaddr, len) Actually, we never right. */ else { - bzero (myaddr, i); + memset (myaddr, '\0', i); returnval = EIO; } @@ -319,6 +322,7 @@ xfer_core_file (memaddr, myaddr, len) } return returnval; } +#endif /* APCS (ARM procedure call standard) defines the following prologue: @@ -336,8 +340,9 @@ CORE_ADDR skip_prologue(pc) CORE_ADDR pc; { - union insn_fmt op; CORE_ADDR skip_pc = pc; +#if 0 + union insn_fmt op; op.ins = read_memory_integer(skip_pc, 4); /* look for the "mov ip,sp" */ @@ -374,9 +379,58 @@ CORE_ADDR pc; op.arith.opcode != OPCODE_SUB || op.arith.dest != FP || op.arith.operand1 != SPTEMP) return pc; +#endif return skip_pc + 4; } +void +arm_frame_find_saved_regs (frame_info, saved_regs_addr) + struct frame_info *frame_info; + struct frame_saved_regs *saved_regs_addr; +{ + register int regnum; + register int frame; + register int next_addr; + register int return_data_save; + register int saved_register_mask; + + memset (saved_regs_addr, '\0', sizeof (*saved_regs_addr)); + frame = frame_info->frame; + return_data_save = read_memory_integer (frame, 4) & 0x03fffffc - 12; + saved_register_mask = read_memory_integer (return_data_save, 4); + next_addr = frame - 12; + for (regnum = 4; regnum < 10; regnum++) + if (saved_register_mask & (1 << regnum)) + { + next_addr -= 4; + saved_regs_addr->regs[regnum] = next_addr; + } + if (read_memory_integer (return_data_save + 4, 4) == 0xed6d7103) + { + next_addr -= 12; + saved_regs_addr->regs[F0_REGNUM + 7] = next_addr; + } + if (read_memory_integer (return_data_save + 8, 4) == 0xed6d6103) + { + next_addr -= 12; + saved_regs_addr->regs[F0_REGNUM + 6] = next_addr; + } + if (read_memory_integer (return_data_save + 12, 4) == 0xed6d5103) + { + next_addr -= 12; + saved_regs_addr->regs[F0_REGNUM + 5] = next_addr; + } + if (read_memory_integer(return_data_save + 16, 4) == 0xed6d4103) + { + next_addr -= 12; + saved_regs_addr->regs[F0_REGNUM + 4] = next_addr; + } + saved_regs_addr->regs[SP_REGNUM] = next_addr; + saved_regs_addr->regs[PC_REGNUM] = frame - 4; + saved_regs_addr->regs[PS_REGNUM] = frame - 4; + saved_regs_addr->regs[FP_REGNUM] = frame - 12; +} + static void print_fpu_flags(flags) int flags; @@ -404,3 +458,31 @@ arm_float_info() fputs("flags: ", stdout); print_fpu_flags(status); } + +void +_initialize_arm_tdep () +{ + tm_print_insn = print_insn_arm; +} + + +/* FIXME: Fill in with the 'right thing', see asm + template in arm-convert.s */ + +void +convert_from_extended (ptr, dbl) +void *ptr; +double *dbl; +{ + *dbl = *(double*)ptr; +} + + +void +convert_to_extended (dbl, ptr) +void *ptr; +double *dbl; +{ + *(double*)ptr = *dbl; +} + diff --git a/gdb/config/arm/arm.mt b/gdb/config/arm/arm.mt index e6e3ec9..b0e4dbe 100644 --- a/gdb/config/arm/arm.mt +++ b/gdb/config/arm/arm.mt @@ -1,3 +1,3 @@ # Target: Acorn RISC machine running RISCiX (4.3bsd) -TDEPFILES= arm-tdep.o +TDEPFILES= arm-tdep.o remote-sim.o ../sim/arm/libsim.a TM_FILE= tm-arm.h |