X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fmips-tdep.c;h=0852851595f0eac5008283d992379415cda61831;hb=fe56157f92879313e0a6f46eeaee06f71314cc04;hp=2c8726214f394cbdfed418fd7fce97fc54f21834;hpb=f6efe3f842e72e23ec6d8a57d683ce90d2e89785;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 2c8726214f..0852851595 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for the MIPS architecture, for GDB, the GNU Debugger. - Copyright (C) 1988-2018 Free Software Foundation, Inc. + Copyright (C) 1988-2019 Free Software Foundation, Inc. Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin. @@ -58,8 +58,6 @@ #include "target-float.h" #include -static const struct objfile_data *mips_pdr_data; - static struct type *mips_register_type (struct gdbarch *gdbarch, int regnum); static int mips32_instruction_has_delay_slot (struct gdbarch *gdbarch, @@ -860,7 +858,7 @@ static int heuristic_fence_post = 0; register N. NOTE: This defines the pseudo register type so need to rebuild the architecture vector. */ -static int mips64_transfers_32bit_regs_p = 0; +static bool mips64_transfers_32bit_regs_p = false; static void set_mips64_transfers_32bit_regs (const char *args, int from_tty, @@ -3823,8 +3821,8 @@ mips_stub_frame_sniffer (const struct frame_unwind *self, stub. The stub for foo is named ".pic.foo". */ msym = lookup_minimal_symbol_by_pc (pc); if (msym.minsym != NULL - && MSYMBOL_LINKAGE_NAME (msym.minsym) != NULL - && startswith (MSYMBOL_LINKAGE_NAME (msym.minsym), ".pic.")) + && msym.minsym->linkage_name () != NULL + && startswith (msym.minsym->linkage_name (), ".pic.")) return 1; return 0; @@ -4495,7 +4493,8 @@ static CORE_ADDR mips_eabi_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, CORE_ADDR struct_addr) + function_call_return_method return_method, + CORE_ADDR struct_addr) { int argreg; int float_argreg; @@ -4541,7 +4540,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, float_argreg = mips_fpa0_regnum (gdbarch); /* The struct_return pointer occupies the first parameter-passing reg. */ - if (struct_return) + if (return_method == return_method_struct) { if (mips_debug) fprintf_unfiltered (gdb_stdlog, @@ -4890,7 +4889,8 @@ static CORE_ADDR mips_n32n64_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, CORE_ADDR struct_addr) + function_call_return_method return_method, + CORE_ADDR struct_addr) { int argreg; int float_argreg; @@ -4933,7 +4933,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, float_argreg = mips_fpa0_regnum (gdbarch); /* The struct_return pointer occupies the first parameter-passing reg. */ - if (struct_return) + if (return_method == return_method_struct) { if (mips_debug) fprintf_unfiltered (gdb_stdlog, @@ -5347,7 +5347,8 @@ static CORE_ADDR mips_o32_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, CORE_ADDR struct_addr) + function_call_return_method return_method, + CORE_ADDR struct_addr) { int argreg; int float_argreg; @@ -5398,7 +5399,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, float_argreg = mips_fpa0_regnum (gdbarch); /* The struct_return pointer occupies the first parameter-passing reg. */ - if (struct_return) + if (return_method == return_method_struct) { if (mips_debug) fprintf_unfiltered (gdb_stdlog, @@ -5872,7 +5873,7 @@ mips_o64_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, CORE_ADDR struct_addr) + function_call_return_method return_method, CORE_ADDR struct_addr) { int argreg; int float_argreg; @@ -5920,7 +5921,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, float_argreg = mips_fpa0_regnum (gdbarch); /* The struct_return pointer occupies the first parameter-passing reg. */ - if (struct_return) + if (return_method == return_method_struct) { if (mips_debug) fprintf_unfiltered (gdb_stdlog, @@ -7817,8 +7818,8 @@ mips_skip_pic_trampoline_code (struct frame_info *frame, CORE_ADDR pc) msym = lookup_minimal_symbol_by_pc (pc); if (msym.minsym == NULL || BMSYMBOL_VALUE_ADDRESS (msym) != pc - || MSYMBOL_LINKAGE_NAME (msym.minsym) == NULL - || !startswith (MSYMBOL_LINKAGE_NAME (msym.minsym), ".pic.")) + || msym.minsym->linkage_name () == NULL + || !startswith (msym.minsym->linkage_name (), ".pic.")) return 0; /* A two-instruction header. */ @@ -7974,7 +7975,7 @@ static void mips_find_abi_section (bfd *abfd, asection *sect, void *obj) { enum mips_abi *abip = (enum mips_abi *) obj; - const char *name = bfd_get_section_name (abfd, sect); + const char *name = bfd_section_name (sect); if (*abip != MIPS_ABI_UNKNOWN) return; @@ -8002,7 +8003,7 @@ static void mips_find_long_section (bfd *abfd, asection *sect, void *obj) { int *lbp = (int *) obj; - const char *name = bfd_get_section_name (abfd, sect); + const char *name = bfd_section_name (sect); if (startswith (name, ".gcc_compiled_long32")) *lbp = 32; @@ -8982,8 +8983,6 @@ _initialize_mips_tdep (void) gdbarch_register (bfd_arch_mips, mips_gdbarch_init, mips_dump_tdep); - mips_pdr_data = register_objfile_data (); - /* Create feature sets with the appropriate properties. The values are not important. */ mips_tdesc_gp32 = allocate_target_description ();