X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Favr-tdep.c;h=c44a3aa96775c234472f5df3592b25bf4e8cb5ca;hb=ea005f31ca7a823680c70a75ae073bee52487859;hp=ec9db1cb3a78be1e7e5fea75871596d1f8d38bec;hpb=53375380e934928af133bca69c1e1912c35e9c73;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index ec9db1cb3a..c44a3aa967 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for Atmel AVR, for GDB. - Copyright (C) 1996-2017 Free Software Foundation, Inc. + Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of GDB. @@ -367,10 +367,11 @@ avr_integer_to_address (struct gdbarch *gdbarch, } static CORE_ADDR -avr_read_pc (struct regcache *regcache) +avr_read_pc (readable_regcache *regcache) { ULONGEST pc; - regcache_cooked_read_unsigned (regcache, AVR_PC_REGNUM, &pc); + + regcache->cooked_read (AVR_PC_REGNUM, &pc); return avr_make_iaddr (pc); } @@ -382,7 +383,7 @@ avr_write_pc (struct regcache *regcache, CORE_ADDR val) } static enum register_status -avr_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, +avr_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache, int regnum, gdb_byte *buf) { ULONGEST val; @@ -391,7 +392,7 @@ avr_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, switch (regnum) { case AVR_PSEUDO_PC_REGNUM: - status = regcache_raw_read_unsigned (regcache, AVR_PC_REGNUM, &val); + status = regcache->raw_read (AVR_PC_REGNUM, &val); if (status != REG_VALID) return status; val >>= 1; @@ -1453,14 +1454,15 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } /* None found, create a new architecture from the information provided. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); tdep->call_length = call_length; /* Create a type for PC. We can't use builtin types here, as they may not be defined. */ - tdep->void_type = arch_type (gdbarch, TYPE_CODE_VOID, 1, "void"); + tdep->void_type = arch_type (gdbarch, TYPE_CODE_VOID, TARGET_CHAR_BIT, + "void"); tdep->func_void_type = make_function_type (tdep->void_type, NULL); tdep->pc_type = arch_pointer_type (gdbarch, 4 * TARGET_CHAR_BIT, NULL, tdep->func_void_type); @@ -1499,7 +1501,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pseudo_register_write (gdbarch, avr_pseudo_register_write); set_gdbarch_return_value (gdbarch, avr_return_value); - set_gdbarch_print_insn (gdbarch, print_insn_avr); set_gdbarch_push_dummy_call (gdbarch, avr_push_dummy_call); @@ -1546,7 +1547,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) All io registers are 8-bit. */ static void -avr_io_reg_read_command (char *args, int from_tty) +avr_io_reg_read_command (const char *args, int from_tty) { LONGEST bufsiz = 0; gdb_byte *buf; @@ -1616,8 +1617,6 @@ avr_io_reg_read_command (char *args, int from_tty) } } -extern initialize_file_ftype _initialize_avr_tdep; /* -Wmissing-prototypes */ - void _initialize_avr_tdep (void) {