From: Alan Modra Date: Wed, 10 Feb 2021 02:08:47 +0000 (+1030) Subject: gdb: Remove arm-symbianelf support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18b8df43bd11ed314153dff2ef04a4b991f00a7c;p=binutils-gdb.git gdb: Remove arm-symbianelf support Since it has gone from bfd/. * arm-symbian-tdep.c: Delete. * NEWS: Mention arm-symbian removal. * Makefile.in: Remove arm-symbian-tdep entries. * configure.tgt: Remove arm*-*-symbianelf*. * doc/gdb.texinfo: Remove mention of SymbianOS. * osabi.c (gdb_osabi_names): Remove "Symbian". * osabi.h (enum gdb_osabi): Remove GDB_OSABI_SYMBIAN. * testsuite/gdb.base/ending-run.exp: Remove E32Main handling. * testsuite/gdb.ada/catch_ex_std.exp: Remove arm*-*-symbianelf* handling. * testsuite/gdb.base/dup-sect.exp: Likewise. * testsuite/gdb.base/long_long.exp: Likewise. * testsuite/gdb.base/solib-weak.exp: Likewise. * testsuite/gdb.guile/scm-section-script.exp: Likewise. * testsuite/gdb.python/py-section-script.exp: Likewise. * testsuite/lib/dwarf.exp: Likewise. * testsuite/lib/gdb.exp: Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0f600fedc72..408d38865b0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,23 @@ +2021-02-11 Alan Modra + + * arm-symbian-tdep.c: Delete. + * NEWS: Mention arm-symbian removal. + * Makefile.in: Remove arm-symbian-tdep entries. + * configure.tgt: Remove arm*-*-symbianelf*. + * doc/gdb.texinfo: Remove mention of SymbianOS. + * osabi.c (gdb_osabi_names): Remove "Symbian". + * osabi.h (enum gdb_osabi): Remove GDB_OSABI_SYMBIAN. + * testsuite/gdb.base/ending-run.exp: Remove E32Main handling. + * testsuite/gdb.ada/catch_ex_std.exp: Remove arm*-*-symbianelf* + handling. + * testsuite/gdb.base/dup-sect.exp: Likewise. + * testsuite/gdb.base/long_long.exp: Likewise. + * testsuite/gdb.base/solib-weak.exp: Likewise. + * testsuite/gdb.guile/scm-section-script.exp: Likewise. + * testsuite/gdb.python/py-section-script.exp: Likewise. + * testsuite/lib/dwarf.exp: Likewise. + * testsuite/lib/gdb.exp: Likewise. + 2021-02-10 Andrew Burgess * f-exp.y (UNOP_OR_BINOP_INTRINSIC): New token. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 36ef45d4559..ae89b85eb56 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -730,7 +730,6 @@ ALL_TARGET_OBS = \ arm-netbsd-tdep.o \ arm-obsd-tdep.o \ arm-pikeos-tdep.o \ - arm-symbian-tdep.o \ arm-tdep.o \ arm-wince-tdep.o \ avr-tdep.o \ @@ -2168,7 +2167,6 @@ ALLDEPFILES = \ arm-netbsd-nat.c \ arm-netbsd-tdep.c \ arm-obsd-tdep.c \ - arm-symbian-tdep.c \ arm-tdep.c \ avr-tdep.c \ bfin-linux-tdep.c \ diff --git a/gdb/NEWS b/gdb/NEWS index d4c76570331..272f8315b65 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -86,6 +86,10 @@ inferior [ID] behavior of the command is unchanged and have the inferior ID become the current inferior. +* Removed targets and native configurations + +ARM Symbian arm*-*-symbianelf* + *** Changes in GDB 10 * There are new feature names for ARC targets: "org.gnu.gdb.arc.core" diff --git a/gdb/arm-symbian-tdep.c b/gdb/arm-symbian-tdep.c deleted file mode 100644 index 2bd0db9c68c..00000000000 --- a/gdb/arm-symbian-tdep.c +++ /dev/null @@ -1,132 +0,0 @@ -/* ARM Symbian OS target support. - - Copyright (C) 2008-2021 Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include "defs.h" -#include "frame.h" -#include "objfiles.h" -#include "osabi.h" -#include "solib.h" -#include "solib-target.h" -#include "target.h" -#include "elf-bfd.h" - -/* If PC is in a DLL import stub, return the address of the `real' - function belonging to the stub. */ - -static CORE_ADDR -arm_symbian_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) -{ - struct gdbarch *gdbarch; - enum bfd_endian byte_order; - ULONGEST insn; - CORE_ADDR dest; - gdb_byte buf[4]; - - if (!in_plt_section (pc)) - return 0; - - if (target_read_memory (pc, buf, 4) != 0) - return 0; - - gdbarch = get_frame_arch (frame); - byte_order = gdbarch_byte_order (gdbarch); - - /* ldr pc, [pc, #-4]. */ - insn = extract_unsigned_integer (buf, 4, byte_order); - if (insn != 0xe51ff004) - return 0; - - if (target_read_memory (pc + 4, buf, 4) != 0) - return 0; - - dest = extract_unsigned_integer (buf, 4, byte_order); - return gdbarch_addr_bits_remove (gdbarch, dest); -} - -static void -arm_symbian_init_abi (struct gdbarch_info info, - struct gdbarch *gdbarch) -{ - /* Shared library handling. */ - set_gdbarch_skip_trampoline_code (gdbarch, arm_symbian_skip_trampoline_code); - - /* On this target, the toolchain outputs ELF files, with `sym' for - filename extension (e.g., `FOO.sym'); these are post-linker - processed into PE-ish DLLs (e.g., `FOO.dll'), and it's these that - are actually copied to and run on the target. Naturally, when - listing shared libraries, Symbian stubs report the DLL filenames. - Setting this makes it so that GDB automatically looks for the - corresponding ELF files on the host's filesystem. */ - set_gdbarch_solib_symbols_extension (gdbarch, "sym"); - - /* Canonical paths on this target look like `c:\sys\bin\bar.dll', - for example. */ - set_gdbarch_has_dos_based_file_system (gdbarch, 1); - - set_solib_ops (gdbarch, &solib_target_so_ops); -} - -/* Recognize Symbian object files. */ - -static enum gdb_osabi -arm_symbian_osabi_sniffer (bfd *abfd) -{ - Elf_Internal_Phdr *phdrs; - long phdrs_size; - int num_phdrs, i; - - /* Symbian executables are always shared objects (ET_DYN). */ - if (elf_elfheader (abfd)->e_type == ET_EXEC) - return GDB_OSABI_UNKNOWN; - - if (elf_elfheader (abfd)->e_ident[EI_OSABI] != ELFOSABI_NONE) - return GDB_OSABI_UNKNOWN; - - /* Check for the ELF headers not being part of any PT_LOAD segment. - Symbian is the only GDB supported (or GNU binutils supported) ARM - target which uses a postlinker to flatten ELF files, dropping the - ELF dynamic info in the process. */ - phdrs_size = bfd_get_elf_phdr_upper_bound (abfd); - if (phdrs_size == -1) - return GDB_OSABI_UNKNOWN; - - phdrs = (Elf_Internal_Phdr *) alloca (phdrs_size); - num_phdrs = bfd_get_elf_phdrs (abfd, phdrs); - if (num_phdrs == -1) - return GDB_OSABI_UNKNOWN; - - for (i = 0; i < num_phdrs; i++) - if (phdrs[i].p_type == PT_LOAD && phdrs[i].p_offset == 0) - return GDB_OSABI_UNKNOWN; - - /* Looks like a Symbian binary. */ - return GDB_OSABI_SYMBIAN; -} - -void _initialize_arm_symbian_tdep (); -void -_initialize_arm_symbian_tdep () -{ - gdbarch_register_osabi_sniffer (bfd_arch_arm, - bfd_target_elf_flavour, - arm_symbian_osabi_sniffer); - - gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_SYMBIAN, - arm_symbian_init_abi); -} diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 5440780065f..842e683f5f5 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -184,10 +184,6 @@ arm*-*-openbsd*) # Target: OpenBSD/arm gdb_target_obs="arm-bsd-tdep.o arm-obsd-tdep.o" ;; -arm*-*-symbianelf*) - # Target: SymbianOS/arm - gdb_target_obs="arm-symbian-tdep.o" - ;; arm*-*-*) # Target: ARM embedded system gdb_target_obs="arm-pikeos-tdep.o" @@ -787,8 +783,6 @@ m68*-*-openbsd* | m88*-*-openbsd* | vax-*-openbsd*) ;; *-*-mingw*) gdb_osabi=GDB_OSABI_WINDOWS ;; *-*-cygwin*) gdb_osabi=GDB_OSABI_CYGWIN ;; *-*-dicos*) gdb_osabi=GDB_OSABI_DICOS ;; -*-*-symbianelf*) - gdb_osabi=GDB_OSABI_SYMBIAN ;; powerpc-*-aix* | rs6000-*-* | powerpc64-*-aix*) gdb_osabi=GDB_OSABI_AIX ;; esac diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 174fd6d0ffc..3bc9e264792 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -20850,8 +20850,8 @@ to specify a local system root using a directory that happens to be named @file{target:} or @file{remote:}, you need to use some equivalent variant of the name like @file{./target:}. -For targets with an MS-DOS based filesystem, such as MS-Windows and -SymbianOS, @value{GDBN} tries prefixing a few variants of the target +For targets with an MS-DOS based filesystem, such as MS-Windows, +@value{GDBN} tries prefixing a few variants of the target absolute file name with @var{path}. But first, on Unix hosts, @value{GDBN} converts all backslash directory separators into forward slashes, because the backslash is not a directory separator on Unix: diff --git a/gdb/osabi.c b/gdb/osabi.c index 9d546a95954..b1603c09c85 100644 --- a/gdb/osabi.c +++ b/gdb/osabi.c @@ -77,7 +77,6 @@ static const struct osabi_names gdb_osabi_names[] = { "AIX", NULL }, { "DICOS", NULL }, { "Darwin", NULL }, - { "Symbian", NULL }, { "OpenVMS", NULL }, { "LynxOS178", NULL }, { "Newlib", NULL }, diff --git a/gdb/osabi.h b/gdb/osabi.h index 9057429c4da..1ecbed4611d 100644 --- a/gdb/osabi.h +++ b/gdb/osabi.h @@ -41,7 +41,6 @@ enum gdb_osabi GDB_OSABI_AIX, GDB_OSABI_DICOS, GDB_OSABI_DARWIN, - GDB_OSABI_SYMBIAN, GDB_OSABI_OPENVMS, GDB_OSABI_LYNXOS178, GDB_OSABI_NEWLIB, diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp index 37d7434035c..cd2dd5a06e0 100644 --- a/gdb/testsuite/gdb.ada/catch_ex_std.exp +++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp @@ -36,8 +36,7 @@ if {[gdb_compile_shlib $srcfile2 $sofile {ada debug}] != ""} { # Set linkarg such that the executable can find the shared library. if {[istarget "*-*-mingw*"] || [istarget *-*-cygwin*] - || [istarget *-*-pe*] - || [istarget arm*-*-symbianelf*]} { + || [istarget *-*-pe*]} { # Do not need anything. set linkarg "" } elseif {[istarget *-*-freebsd*] || [istarget *-*-openbsd*]} { diff --git a/gdb/testsuite/gdb.base/dup-sect.exp b/gdb/testsuite/gdb.base/dup-sect.exp index a2362462cf2..5a682dfdc23 100644 --- a/gdb/testsuite/gdb.base/dup-sect.exp +++ b/gdb/testsuite/gdb.base/dup-sect.exp @@ -28,7 +28,6 @@ if {![istarget *-*-linux*] && ![istarget *-*-gnu*] && ![istarget *-*-elf*] && ![istarget arm*-*-eabi*] - && ![istarget arm*-*-symbianelf*] && ![istarget powerpc-*-eabi*]} { return 0 } diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp index 23b13200f70..31befa6b35e 100644 --- a/gdb/testsuite/gdb.base/ending-run.exp +++ b/gdb/testsuite/gdb.base/ending-run.exp @@ -189,10 +189,6 @@ gdb_test_multiple "next" "step out of main" { # another `next' is necessary. gdb_test "next" ".*in start_l ().*" "step out of main" } - -re "E32Main (.*).*$gdb_prompt $" { - # On SymbianOS there's a different function which calls main. - pass "step out of main" - } -re ".*in.*currently asm.*$gdb_prompt $" { pass "step out of main" } diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp index aff8e20446b..f7fdceb05e0 100644 --- a/gdb/testsuite/gdb.base/long_long.exp +++ b/gdb/testsuite/gdb.base/long_long.exp @@ -156,8 +156,7 @@ if { $sizeof_double == 8 || $sizeof_long_double == 8 } { if { ([istarget "arm*-*-*"]) \ && !([istarget "*-*-*eabi*"] || \ [istarget "*-*-mingw32ce*"] || \ - [istarget "*-*-openbsd*"] || \ - [istarget "*-*-symbianelf"]) } then { + [istarget "*-*-openbsd*"]) } then { # assume the long long represents a floating point double in ARM format gdb_test "p/f val.oct" "2.1386676354387559e\\+265" } else { diff --git a/gdb/testsuite/gdb.base/solib-weak.exp b/gdb/testsuite/gdb.base/solib-weak.exp index 0457acaa1d3..bc4d2e57efd 100644 --- a/gdb/testsuite/gdb.base/solib-weak.exp +++ b/gdb/testsuite/gdb.base/solib-weak.exp @@ -22,8 +22,7 @@ if {[skip_shlib_tests]} { } # These targets have shared libraries, but weak symbols are not meaningful. -if {([istarget arm*-*-symbianelf*] - || [istarget *-*-mingw*] +if {([istarget *-*-mingw*] || [istarget *-*-cygwin*] || [istarget *-*-pe*])} { return 0 diff --git a/gdb/testsuite/gdb.guile/scm-section-script.exp b/gdb/testsuite/gdb.guile/scm-section-script.exp index 5e314996d46..30a6c1cf40a 100644 --- a/gdb/testsuite/gdb.guile/scm-section-script.exp +++ b/gdb/testsuite/gdb.guile/scm-section-script.exp @@ -23,7 +23,6 @@ if {![istarget *-*-linux*] && ![istarget *-*-elf*] && ![istarget *-*-openbsd*] && ![istarget arm*-*-eabi*] - && ![istarget arm*-*-symbianelf*] && ![istarget powerpc-*-eabi*]} { verbose "Skipping scm-section-script.exp because of lack of support." return diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp index c57b3fbed4f..4144a085d58 100644 --- a/gdb/testsuite/gdb.python/py-section-script.exp +++ b/gdb/testsuite/gdb.python/py-section-script.exp @@ -23,7 +23,6 @@ if {![istarget *-*-linux*] && ![istarget *-*-elf*] && ![istarget *-*-openbsd*] && ![istarget arm*-*-eabi*] - && ![istarget arm*-*-symbianelf*] && ![istarget powerpc-*-eabi*]} { verbose "Skipping py-section-script.exp because of lack of support." return diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index 10fd88f6e0f..c1c07be0b98 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -21,7 +21,6 @@ proc dwarf2_support {} { || [istarget *-*-elf*] || [istarget *-*-openbsd*] || [istarget arm*-*-eabi*] - || [istarget arm*-*-symbianelf*] || [istarget powerpc-*-eabi*]} { return 1 } diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 016c678237c..60f84d22aad 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2133,12 +2133,6 @@ proc skip_cplus_tests {} { # Return a 1 for configurations for which don't have both C++ and the STL. proc skip_stl_tests {} { - # Symbian supports the C++ language, but the STL is missing - # (both headers and libraries). - if { [istarget "arm*-*-symbianelf*"] } { - return 1 - } - return [skip_cplus_tests] } @@ -2236,7 +2230,6 @@ proc skip_shlib_tests {} { if {([istarget *-*-linux*] || [istarget *-*-*bsd*] || [istarget *-*-solaris2*] - || [istarget arm*-*-symbianelf*] || [istarget *-*-mingw*] || [istarget *-*-cygwin*] || [istarget *-*-pe*])} { @@ -4153,10 +4146,6 @@ proc gdb_compile {source dest type options} { # Do not need anything. } elseif { [istarget *-*-freebsd*] || [istarget *-*-openbsd*] } { lappend new_options "ldflags=-Wl,-rpath,${outdir}" - } elseif { [istarget arm*-*-symbianelf*] } { - if { $shlib_load } { - lappend new_options "libs=-ldl" - } } else { if { $shlib_load } { lappend new_options "libs=-ldl" @@ -6199,7 +6188,6 @@ gdb_caching_proc gdb_has_argv0 { || [istarget *-*-cygwin*] || [istarget *-*-mingw32*] || [istarget *-*-*djgpp*] || [istarget *-*-go32*] || [istarget *-wince-pe] || [istarget *-*-mingw32ce*] - || [istarget *-*-symbianelf*] || [istarget *-*-osf*] || [istarget *-*-dicos*] || [istarget *-*-nto*]