X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Farm-tdep.c;h=599f785b3494929cd53343f60fcf3f80e5762dbf;hb=24e31cf3aa66e20877358040ceb35b87dde66d12;hp=c3280ee211d17ff899dc56f7a7127d7b5e685d5b;hpb=8d49165d8382e29bff8d60d208934596e3994305;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index c3280ee211..599f785b34 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1,6 +1,6 @@ /* Common target dependent code for GDB on ARM systems. - Copyright (C) 1988-2018 Free Software Foundation, Inc. + Copyright (C) 1988-2019 Free Software Foundation, Inc. This file is part of GDB. @@ -55,7 +55,7 @@ #include "coff/internal.h" #include "elf/arm.h" -#include "vec.h" +#include "common/vec.h" #include "record.h" #include "record-full.h" @@ -70,7 +70,7 @@ #include "features/arm/arm-with-neon.c" #if GDB_SELF_TEST -#include "selftest.h" +#include "common/selftest.h" #endif static int arm_debug; @@ -1801,6 +1801,10 @@ arm_scan_prologue (struct frame_info *this_frame, CORE_ADDR frame_loc; ULONGEST return_value; + /* AAPCS does not use a frame register, so we can abort here. */ + if (gdbarch_tdep (gdbarch)->arm_abi == ARM_ABI_AAPCS) + return; + frame_loc = get_frame_register_unsigned (this_frame, ARM_FP_REGNUM); if (!safe_read_memory_unsigned_integer (frame_loc, 4, byte_order, &return_value)) @@ -3055,38 +3059,6 @@ struct frame_base arm_normal_base = { arm_normal_frame_base }; -/* Assuming THIS_FRAME is a dummy, return the frame ID of that - dummy frame. The frame ID's base needs to match the TOS value - saved by save_dummy_frame_tos() and returned from - arm_push_dummy_call, and the PC needs to match the dummy frame's - breakpoint. */ - -static struct frame_id -arm_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - return frame_id_build (get_frame_register_unsigned (this_frame, - ARM_SP_REGNUM), - get_frame_pc (this_frame)); -} - -/* Given THIS_FRAME, find the previous frame's resume PC (which will - be used to construct the previous frame's ID, after looking up the - containing function). */ - -static CORE_ADDR -arm_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - CORE_ADDR pc; - pc = frame_unwind_register_unsigned (this_frame, ARM_PC_REGNUM); - return arm_addr_bits_remove (gdbarch, pc); -} - -static CORE_ADDR -arm_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - return frame_unwind_register_unsigned (this_frame, ARM_SP_REGNUM); -} - static struct value * arm_dwarf2_prev_register (struct frame_info *this_frame, void **this_cache, int regnum) @@ -3679,7 +3651,8 @@ arm_vfp_abi_for_function (struct gdbarch *gdbarch, struct type *func_type) static CORE_ADDR arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, - struct value **args, CORE_ADDR sp, int struct_return, + struct value **args, CORE_ADDR sp, + function_call_return_method return_method, CORE_ADDR struct_addr) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -3714,7 +3687,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, /* The struct_return pointer occupies the first parameter passing register. */ - if (struct_return) + if (return_method == return_method_struct) { if (arm_debug) fprintf_unfiltered (gdb_stdlog, "struct return in %s = %s\n", @@ -7460,9 +7433,9 @@ thumb_process_displaced_32bit_insn (struct gdbarch *gdbarch, uint16_t insn1, { if (bit (insn1, 9)) /* Data processing (plain binary imm). */ { - int op = bits (insn1, 4, 8); + int dp_op = bits (insn1, 4, 8); int rn = bits (insn1, 0, 3); - if ((op == 0 || op == 0xa) && rn == 0xf) + if ((dp_op == 0 || dp_op == 0xa) && rn == 0xf) err = thumb_copy_pc_relative_32bit (gdbarch, insn1, insn2, regs, dsc); else @@ -9046,8 +9019,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) if (fp_model == ARM_FLOAT_AUTO) { - int e_flags = elf_elfheader (info.abfd)->e_flags; - switch (e_flags & (EF_ARM_SOFT_FLOAT | EF_ARM_VFP_FLOAT)) { case 0: @@ -9359,11 +9330,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_write_pc (gdbarch, arm_write_pc); - /* Frame handling. */ - set_gdbarch_dummy_id (gdbarch, arm_dummy_id); - set_gdbarch_unwind_pc (gdbarch, arm_unwind_pc); - set_gdbarch_unwind_sp (gdbarch, arm_unwind_sp); - frame_base_set_default (gdbarch, &arm_normal_base); /* Address manipulation. */