diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-08-01 21:14:33 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-08-01 21:14:33 +0000 |
commit | 880bc914e0090a4076eeb385c8bf0cfe0b0142d4 (patch) | |
tree | 17fd59766e0af49f90ebe94de6d014325309f976 | |
parent | 19f5934377cdd949da85bea862750e48f50aafde (diff) | |
download | gdb-880bc914e0090a4076eeb385c8bf0cfe0b0142d4.zip gdb-880bc914e0090a4076eeb385c8bf0cfe0b0142d4.tar.gz gdb-880bc914e0090a4076eeb385c8bf0cfe0b0142d4.tar.bz2 |
2003-08-01 Andrew Cagney <cagney@redhat.com>
* NEWS: Mention that m32r is multi-arch.
From 2003-07-28 Kei Sakamoto <sakamoto.kei@renesas.com>:
* configure.tgt: Recognize m32r-*-*.
* config/m32r/tm-m32r.h: Delete file.
* config/m32r/m32r.mt: New file.
* m32r-rom.c (m32r_upload_command): Use hostent only when
gethostname succeeds, in order to avoid a compilation
warning.
* m32r-tdep.c (m32r_store_return_value): Add a cast to remove a
compiler warning.
-rw-r--r-- | gdb/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/NEWS | 2 | ||||
-rw-r--r-- | gdb/config/m32r/m32r.mt | 9 | ||||
-rw-r--r-- | gdb/config/m32r/tm-m32r.h | 231 | ||||
-rw-r--r-- | gdb/configure.tgt | 3 | ||||
-rw-r--r-- | gdb/m32r-rom.c | 14 | ||||
-rw-r--r-- | gdb/m32r-tdep.c | 2 |
7 files changed, 29 insertions, 245 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6964774..360026e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +2003-08-01 Andrew Cagney <cagney@redhat.com> + + * NEWS: Mention that m32r is multi-arch. + From 2003-07-28 Kei Sakamoto <sakamoto.kei@renesas.com>: + * configure.tgt: Recognize m32r-*-*. + * config/m32r/tm-m32r.h: Delete file. + * config/m32r/m32r.mt: New file. + * m32r-rom.c (m32r_upload_command): Use hostent only when + gethostname succeeds, in order to avoid a compilation + warning. + * m32r-tdep.c (m32r_store_return_value): Add a cast to remove a + compiler warning. + 2003-08-01 Michael Snyder <msnyder@redhat.com> * sh-tdep.c (sh_frame_align): New gdbarch method. @@ -46,6 +46,7 @@ Fix for gdb/702: a -var-assign that updates the value now shows up * Multi-arched targets. HP/PA HPUX11, 32bit ABI (partial) hppa*-*-hpux* except hppa*64*-*-hpux11* +Mitsubishi M32R/D w/simulator m32r-*-elf* * OBSOLETE configurations and files @@ -54,7 +55,6 @@ been commented out. Unless there is activity to revive these configurations, the next release of GDB will have their sources permanently REMOVED. -Mitsubishi M32R/D w/simulator m32r-*-elf* Z8000 simulator z8k-zilog-none or z8ksim Matsushita MN10200 w/simulator mn10200-*-* H8/500 simulator h8500-hitachi-hms or h8500hms diff --git a/gdb/config/m32r/m32r.mt b/gdb/config/m32r/m32r.mt index a281608..6d578c8 100644 --- a/gdb/config/m32r/m32r.mt +++ b/gdb/config/m32r/m32r.mt @@ -1,5 +1,4 @@ -# OBSOLETE # Target: Mitsubishi m32r processor -# OBSOLETE TDEPFILES= m32r-tdep.o monitor.o m32r-rom.o dsrec.o -# OBSOLETE TM_FILE= tm-m32r.h -# OBSOLETE SIM_OBS = remote-sim.o -# OBSOLETE SIM = ../sim/m32r/libsim.a +# Target: Renesas m32r processor +TDEPFILES= m32r-tdep.o monitor.o m32r-rom.o dsrec.o +SIM_OBS = remote-sim.o +SIM = ../sim/m32r/libsim.a diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h deleted file mode 100644 index 89af4e3..0000000 --- a/gdb/config/m32r/tm-m32r.h +++ /dev/null @@ -1,231 +0,0 @@ -// OBSOLETE /* Parameters for execution on a Mitsubishi m32r processor. -// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -// OBSOLETE Free Software Foundation, Inc. -// OBSOLETE -// OBSOLETE This file is part of GDB. -// OBSOLETE -// OBSOLETE This program is free software; you can redistribute it and/or modify -// OBSOLETE it under the terms of the GNU General Public License as published by -// OBSOLETE the Free Software Foundation; either version 2 of the License, or -// OBSOLETE (at your option) any later version. -// OBSOLETE -// OBSOLETE This program is distributed in the hope that it will be useful, -// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of -// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// OBSOLETE GNU General Public License for more details. -// OBSOLETE -// OBSOLETE You should have received a copy of the GNU General Public License -// OBSOLETE along with this program; if not, write to the Free Software -// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, -// OBSOLETE Boston, MA 02111-1307, USA. */ -// OBSOLETE -// OBSOLETE #include "regcache.h" -// OBSOLETE -// OBSOLETE /* Used by mswin. */ -// OBSOLETE #define TARGET_M32R 1 -// OBSOLETE -// OBSOLETE /* mvs_check REGISTER_NAMES */ -// OBSOLETE #define REGISTER_NAMES \ -// OBSOLETE { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ -// OBSOLETE "r8", "r9", "r10", "r11", "r12", "fp", "lr", "sp", \ -// OBSOLETE "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch", \ -// OBSOLETE /* "cond", "sm", "bsm", "ie", "bie", "bcarry", */ \ -// OBSOLETE } -// OBSOLETE /* mvs_check NUM_REGS */ -// OBSOLETE #define NUM_REGS 24 -// OBSOLETE -// OBSOLETE /* mvs_check REGISTER_SIZE */ -// OBSOLETE #define REGISTER_SIZE 4 -// OBSOLETE /* mvs_check MAX_REGISTER_RAW_SIZE */ -// OBSOLETE #define MAX_REGISTER_RAW_SIZE 4 -// OBSOLETE -// OBSOLETE /* mvs_check *_REGNUM */ -// OBSOLETE #define R0_REGNUM 0 -// OBSOLETE #define STRUCT_RETURN_REGNUM 0 -// OBSOLETE #define ARG0_REGNUM 0 -// OBSOLETE #define ARGLAST_REGNUM 3 -// OBSOLETE #define V0_REGNUM 0 -// OBSOLETE #define V1_REGNUM 1 -// OBSOLETE #define FP_REGNUM 13 -// OBSOLETE #define RP_REGNUM 14 -// OBSOLETE #define SP_REGNUM 15 -// OBSOLETE #define PSW_REGNUM 16 -// OBSOLETE #define CBR_REGNUM 17 -// OBSOLETE #define SPI_REGNUM 18 -// OBSOLETE #define SPU_REGNUM 19 -// OBSOLETE #define BPC_REGNUM 20 -// OBSOLETE #define PC_REGNUM 21 -// OBSOLETE #define ACCL_REGNUM 22 -// OBSOLETE #define ACCH_REGNUM 23 -// OBSOLETE -// OBSOLETE /* mvs_check REGISTER_BYTES */ -// OBSOLETE #define REGISTER_BYTES (NUM_REGS * 4) -// OBSOLETE -// OBSOLETE /* mvs_check REGISTER_VIRTUAL_TYPE */ -// OBSOLETE #define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int -// OBSOLETE -// OBSOLETE /* mvs_check REGISTER_BYTE */ -// OBSOLETE #define REGISTER_BYTE(REG) ((REG) * 4) -// OBSOLETE /* mvs_check REGISTER_VIRTUAL_SIZE */ -// OBSOLETE #define REGISTER_VIRTUAL_SIZE(REG) 4 -// OBSOLETE /* mvs_check REGISTER_RAW_SIZE */ -// OBSOLETE #define REGISTER_RAW_SIZE(REG) 4 -// OBSOLETE -// OBSOLETE /* mvs_check MAX_REGISTER_VIRTUAL_SIZE */ -// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4 -// OBSOLETE -// OBSOLETE /* mvs_check BREAKPOINT */ -// OBSOLETE #define BREAKPOINT {0x10, 0xf1} -// OBSOLETE -// OBSOLETE /* mvs_no_check FUNCTION_START_OFFSET */ -// OBSOLETE #define FUNCTION_START_OFFSET 0 -// OBSOLETE -// OBSOLETE /* mvs_check DECR_PC_AFTER_BREAK */ -// OBSOLETE #define DECR_PC_AFTER_BREAK 0 -// OBSOLETE -// OBSOLETE /* mvs_check INNER_THAN */ -// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) -// OBSOLETE -// OBSOLETE /* mvs_check SAVED_PC_AFTER_CALL */ -// OBSOLETE #define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM) -// OBSOLETE -// OBSOLETE struct frame_info; -// OBSOLETE struct frame_saved_regs; -// OBSOLETE struct type; -// OBSOLETE struct value; -// OBSOLETE -// OBSOLETE /* Define other aspects of the stack frame. -// OBSOLETE We keep the offsets of all saved registers, 'cause we need 'em a lot! -// OBSOLETE We also keep the current size of the stack frame, and whether -// OBSOLETE the frame pointer is valid (for frameless functions, and when we're -// OBSOLETE still in the prologue of a function with a frame) */ -// OBSOLETE -// OBSOLETE /* mvs_check EXTRA_FRAME_INFO */ -// OBSOLETE #define EXTRA_FRAME_INFO \ -// OBSOLETE struct frame_saved_regs fsr; \ -// OBSOLETE int framesize; \ -// OBSOLETE int using_frame_pointer; -// OBSOLETE -// OBSOLETE -// OBSOLETE extern void m32r_init_extra_frame_info (struct frame_info *fi); -// OBSOLETE /* mvs_check INIT_EXTRA_FRAME_INFO */ -// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) m32r_init_extra_frame_info (fi) -// OBSOLETE /* mvs_no_check DEPRECATED_INIT_FRAME_PC */ -// OBSOLETE #define DEPRECATED_INIT_FRAME_PC init_frame_pc_noop -// OBSOLETE -// OBSOLETE extern void -// OBSOLETE m32r_frame_find_saved_regs (struct frame_info *fi, -// OBSOLETE struct frame_saved_regs *regaddr); -// OBSOLETE -// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, -// OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO. -// OBSOLETE This includes special registers such as pc and fp saved in special -// OBSOLETE ways in the stack frame. sp is even more special: -// OBSOLETE the address we return for it IS the sp for the next frame. */ -// OBSOLETE -// OBSOLETE /* mvs_check FRAME_FIND_SAVED_REGS */ -// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ -// OBSOLETE m32r_frame_find_saved_regs(frame_info, &(frame_saved_regs)) -// OBSOLETE -// OBSOLETE extern CORE_ADDR m32r_frame_chain (struct frame_info *fi); -// OBSOLETE /* mvs_check FRAME_CHAIN */ -// OBSOLETE #define FRAME_CHAIN(fi) m32r_frame_chain (fi) -// OBSOLETE -// OBSOLETE extern CORE_ADDR m32r_find_callers_reg (struct frame_info *fi, int regnum); -// OBSOLETE extern CORE_ADDR m32r_frame_saved_pc (struct frame_info *); -// OBSOLETE /* mvs_check FRAME_SAVED_PC */ -// OBSOLETE #define FRAME_SAVED_PC(fi) m32r_frame_saved_pc (fi) -// OBSOLETE -// OBSOLETE /* mvs_check DEPRECATED_EXTRACT_RETURN_VALUE */ -// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \ -// OBSOLETE memcpy ((VALBUF), \ -// OBSOLETE (char *)(REGBUF) + REGISTER_BYTE (V0_REGNUM) + \ -// OBSOLETE ((TYPE_LENGTH (TYPE) > 4 ? 8 : 4) - TYPE_LENGTH (TYPE)), \ -// OBSOLETE TYPE_LENGTH (TYPE)) -// OBSOLETE -// OBSOLETE /* mvs_check DEPRECATED_STORE_RETURN_VALUE */ -// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \ -// OBSOLETE deprecated_write_register_bytes(REGISTER_BYTE (V0_REGNUM) + \ -// OBSOLETE ((TYPE_LENGTH (TYPE) > 4 ? 8:4) - TYPE_LENGTH (TYPE)),\ -// OBSOLETE (VALBUF), TYPE_LENGTH (TYPE)); -// OBSOLETE -// OBSOLETE extern CORE_ADDR m32r_skip_prologue (CORE_ADDR pc); -// OBSOLETE /* mvs_check SKIP_PROLOGUE */ -// OBSOLETE #define SKIP_PROLOGUE(pc) (m32r_skip_prologue (pc)) -// OBSOLETE -// OBSOLETE /* mvs_no_check FRAME_ARGS_SKIP */ -// OBSOLETE #define FRAME_ARGS_SKIP 0 -// OBSOLETE -// OBSOLETE /* mvs_no_check FRAME_ARGS_ADDRESS */ -// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame) -// OBSOLETE /* mvs_no_check FRAME_LOCALS_ADDRESS */ -// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame) -// OBSOLETE /* mvs_no_check FRAME_NUM_ARGS */ -// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1) -// OBSOLETE -// OBSOLETE extern void m32r_write_sp (CORE_ADDR val); -// OBSOLETE #define TARGET_WRITE_SP m32r_write_sp -// OBSOLETE -// OBSOLETE -// OBSOLETE -// OBSOLETE -// OBSOLETE -// OBSOLETE -// OBSOLETE /* struct passing and returning stuff */ -// OBSOLETE #define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \ -// OBSOLETE write_register (0, STRUCT_ADDR) -// OBSOLETE -// OBSOLETE extern use_struct_convention_fn m32r_use_struct_convention; -// OBSOLETE #define USE_STRUCT_CONVENTION(GCC_P, TYPE) m32r_use_struct_convention (GCC_P, TYPE) -// OBSOLETE -// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ -// OBSOLETE extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \ -// OBSOLETE REGISTER_RAW_SIZE (V0_REGNUM)) -// OBSOLETE -// OBSOLETE #define REG_STRUCT_HAS_ADDR(gcc_p,type) (TYPE_LENGTH (type) > 8) -// OBSOLETE -// OBSOLETE -// OBSOLETE /* generic dummy frame stuff */ -// OBSOLETE -// OBSOLETE #define PUSH_DUMMY_FRAME generic_push_dummy_frame () -// OBSOLETE #define DEPRECATED_PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP) -// OBSOLETE -// OBSOLETE -// OBSOLETE /* target-specific dummy_frame stuff */ -// OBSOLETE -// OBSOLETE extern struct frame_info *m32r_pop_frame (struct frame_info *frame); -// OBSOLETE /* mvs_check POP_FRAME */ -// OBSOLETE #define POP_FRAME m32r_pop_frame (get_current_frame ()) -// OBSOLETE -// OBSOLETE /* mvs_no_check STACK_ALIGN */ -// OBSOLETE /* #define STACK_ALIGN(x) ((x + 3) & ~3) */ -// OBSOLETE -// OBSOLETE extern CORE_ADDR m32r_push_return_address (CORE_ADDR, CORE_ADDR); -// OBSOLETE extern CORE_ADDR m32r_push_arguments (int nargs, -// OBSOLETE struct value **args, -// OBSOLETE CORE_ADDR sp, -// OBSOLETE unsigned char struct_return, -// OBSOLETE CORE_ADDR struct_addr); -// OBSOLETE -// OBSOLETE -// OBSOLETE -// OBSOLETE /* mvs_no_check PUSH_ARGUMENTS */ -// OBSOLETE #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \ -// OBSOLETE (m32r_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)) -// OBSOLETE -// OBSOLETE #define PUSH_RETURN_ADDRESS(PC, SP) m32r_push_return_address (PC, SP) -// OBSOLETE -// OBSOLETE /* override the standard get_saved_register function with -// OBSOLETE one that takes account of generic CALL_DUMMY frames */ -// OBSOLETE #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \ -// OBSOLETE deprecated_generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval) -// OBSOLETE -// OBSOLETE -// OBSOLETE #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 1 -// OBSOLETE #define CALL_DUMMY {0} -// OBSOLETE #define CALL_DUMMY_LENGTH (0) -// OBSOLETE #define CALL_DUMMY_START_OFFSET (0) -// OBSOLETE #define CALL_DUMMY_BREAKPOINT_OFFSET (0) -// OBSOLETE #define FIX_CALL_DUMMY(DUMMY1, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP) -// OBSOLETE #define CALL_DUMMY_LOCATION AT_ENTRY_POINT -// OBSOLETE #define CALL_DUMMY_ADDRESS() entry_point_address () diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 14dedbe..f11f0ee 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -114,7 +114,7 @@ ia64-*-linux*) gdb_target=linux ;; ia64*-*-*) gdb_target=ia64 ;; -# OBSOLETE m32r-*-elf*) gdb_target=m32r ;; +m32r-*-*) gdb_target=m32r ;; m68hc11*-*-*|m6811*-*-*) gdb_target=m68hc11 ;; @@ -266,6 +266,7 @@ esac case "${gdb_target}" in d10v) gdb_multi_arch=yes ;; fbsd64) gdb_multi_arch=yes ;; +m32r) gdb_multi_arch=yes ;; m68hc11) gdb_multi_arch=yes ;; mn10300) gdb_multi_arch=yes ;; x86-64linux) gdb_multi_arch=yes ;; diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c index 444a6cd..970a8e6 100644 --- a/gdb/m32r-rom.c +++ b/gdb/m32r-rom.c @@ -492,16 +492,18 @@ m32r_upload_command (char *args, int from_tty) buf[0] = 0; gethostname (buf, sizeof (buf)); if (buf[0] != 0) - hostent = gethostbyname (buf); - if (hostent != 0) { + hostent = gethostbyname (buf); + if (hostent != 0) + { #if 1 - memcpy (&inet_addr.s_addr, hostent->h_addr, - sizeof (inet_addr.s_addr)); - server_addr = (char *) inet_ntoa (inet_addr); + memcpy (&inet_addr.s_addr, hostent->h_addr, + sizeof (inet_addr.s_addr)); + server_addr = (char *) inet_ntoa (inet_addr); #else - server_addr = (char *) inet_ntoa (hostent->h_addr); + server_addr = (char *) inet_ntoa (hostent->h_addr); #endif + } } if (server_addr == 0) /* failed? */ error diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c index 9de8bdd..dc51699 100644 --- a/gdb/m32r-tdep.c +++ b/gdb/m32r-tdep.c @@ -286,7 +286,7 @@ m32r_store_return_value (struct type *type, struct regcache *regcache, if (len > 4) { - regval = extract_unsigned_integer (valbuf + 4, len - 4); + regval = extract_unsigned_integer ((char *) valbuf + 4, len - 4); regcache_cooked_write_unsigned (regcache, RET1_REGNUM + 1, regval); } } |