X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fmips-sde-tdep.c;h=685c3c7263c0c5c8e12c2d02e243219ea3daf432;hb=f9b5d5ea18a3878ca48c1b747e35d456133858bc;hp=eb171bf3f9b751a25f39bc4d6defb4a1b2703d2a;hpb=32d0add0a654c1204ab71dc8a55d9374538c4b33;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/mips-sde-tdep.c b/gdb/mips-sde-tdep.c index eb171bf3f9..685c3c7263 100644 --- a/gdb/mips-sde-tdep.c +++ b/gdb/mips-sde-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for SDE on MIPS processors. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -48,7 +48,7 @@ mips_sde_frame_cache (struct frame_info *this_frame, void **this_cache) int i; if (*this_cache != NULL) - return *this_cache; + return (struct trad_frame_cache *) *this_cache; cache = trad_frame_cache_zalloc (this_frame); *this_cache = cache; @@ -205,14 +205,14 @@ static void mips_sde_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj) { - enum gdb_osabi *os_ident_ptr = obj; + enum gdb_osabi *os_ident_ptr = (enum gdb_osabi *) obj; const char *name; - name = bfd_get_section_name (abfd, sect); + name = bfd_section_name (sect); /* The presence of a section with a ".sde" prefix is indicative of an SDE binary. */ - if (strncmp (name, ".sde", 4) == 0) + if (startswith (name, ".sde")) *os_ident_ptr = GDB_OSABI_SDE; } @@ -256,11 +256,9 @@ mips_sde_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) frame_base_append_sniffer (gdbarch, mips_sde_frame_base_sniffer); } -/* Provide a prototype to silence -Wmissing-prototypes. */ -extern initialize_file_ftype _initialize_mips_sde_tdep; - +void _initialize_mips_sde_tdep (); void -_initialize_mips_sde_tdep (void) +_initialize_mips_sde_tdep () { gdbarch_register_osabi_sniffer (bfd_arch_mips, bfd_target_elf_flavour,