From patchwork Fri Mar 6 21:31:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tankut Baris Aktemur X-Patchwork-Id: 38511 Received: (qmail 55699 invoked by alias); 6 Mar 2020 21:33:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 53639 invoked by uid 89); 6 Mar 2020 21:32:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Mar 2020 21:32:40 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2020 13:32:23 -0800 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 06 Mar 2020 13:32:22 -0800 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 026LWMaQ022521; Fri, 6 Mar 2020 21:32:22 GMT Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id 026LWMOg020558; Fri, 6 Mar 2020 22:32:22 +0100 Received: (from taktemur@localhost) by ulvlx001.iul.intel.com with LOCAL id 026LWMgf020554; Fri, 6 Mar 2020 22:32:22 +0100 From: Tankut Baris Aktemur To: gdb-patches@sourceware.org Subject: [PATCH 31/31] gdbserver/linux-low: delete 'linux_target_ops' and 'the_low_target' Date: Fri, 6 Mar 2020 22:31:39 +0100 Message-Id: <327597705830ec6cc61f657cdc7cef4c3da4b207.1583529167.git.tankut.baris.aktemur@intel.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes All the linux target ops have been moved into linux_process_target as methods. The 'linux_target_ops' struct and its instantiations are not obsolete. Delete them. gdbserver/ChangeLog: 2020-03-06 Tankut Baris Aktemur * linux-low.h (struct linux_target_ops): Remove. (the_low_target): Remove. * linux-x86-low.cc (the_low_target): Remove. * linux-aarch64-low.cc (the_low_target): Ditto. * linux-arm-low.cc (the_low_target): Ditto. * linux-bfin-low.cc (the_low_target): Ditto. * linux-cris-low.cc (the_low_target): Ditto. * linux-crisv32-low.cc (the_low_target): Ditto. * linux-ia64-low.cc (the_low_target): Ditto. * linux-m32r-low.cc (the_low_target): Ditto. * linux-m68k-low.cc (the_low_target): Ditto. * linux-mips-low.cc (the_low_target): Ditto. * linux-nios2-low.cc (the_low_target): Ditto. * linux-ppc-low.cc (the_low_target): Ditto. * linux-riscv-low.cc (the_low_target): Ditto. * linux-s390-low.cc (the_low_target): Ditto. * linux-sh-low.cc (the_low_target): Ditto. * linux-sparc-low.cc (the_low_target): Ditto. * linux-tic6x-low.cc (the_low_target): Ditto. * linux-tile-low.cc (the_low_target): Ditto. * linux-xtensa-low.cc (the_low_target): Ditto. --- gdbserver/linux-aarch64-low.cc | 4 ---- gdbserver/linux-arm-low.cc | 3 --- gdbserver/linux-bfin-low.cc | 3 --- gdbserver/linux-cris-low.cc | 3 --- gdbserver/linux-crisv32-low.cc | 3 --- gdbserver/linux-ia64-low.cc | 4 ---- gdbserver/linux-low.h | 6 ------ gdbserver/linux-m32r-low.cc | 3 --- gdbserver/linux-m68k-low.cc | 3 --- gdbserver/linux-mips-low.cc | 3 --- gdbserver/linux-nios2-low.cc | 4 ---- gdbserver/linux-ppc-low.cc | 3 --- gdbserver/linux-riscv-low.cc | 5 ----- gdbserver/linux-s390-low.cc | 3 --- gdbserver/linux-sh-low.cc | 3 --- gdbserver/linux-sparc-low.cc | 3 --- gdbserver/linux-tic6x-low.cc | 5 ----- gdbserver/linux-tile-low.cc | 4 ---- gdbserver/linux-x86-low.cc | 7 ------- gdbserver/linux-xtensa-low.cc | 3 --- 20 files changed, 75 deletions(-) diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc index 68ea95d6d36..22538029a56 100644 --- a/gdbserver/linux-aarch64-low.cc +++ b/gdbserver/linux-aarch64-low.cc @@ -3168,10 +3168,6 @@ aarch64_target::breakpoint_kind_from_current_state (CORE_ADDR *pcptr) return arm_breakpoint_kind_from_current_state (pcptr); } -struct linux_target_ops the_low_target = -{ -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_aarch64_target; diff --git a/gdbserver/linux-arm-low.cc b/gdbserver/linux-arm-low.cc index d8d57b44954..841298a9fda 100644 --- a/gdbserver/linux-arm-low.cc +++ b/gdbserver/linux-arm-low.cc @@ -1130,9 +1130,6 @@ arm_target::get_regs_info () return ®s_info_arm; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_arm_target; diff --git a/gdbserver/linux-bfin-low.cc b/gdbserver/linux-bfin-low.cc index 903758243d8..c1e9724c98a 100644 --- a/gdbserver/linux-bfin-low.cc +++ b/gdbserver/linux-bfin-low.cc @@ -156,9 +156,6 @@ bfin_target::get_regs_info () return &myregs_info; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_bfin_target; diff --git a/gdbserver/linux-cris-low.cc b/gdbserver/linux-cris-low.cc index fac925f0be5..6b71222d4a7 100644 --- a/gdbserver/linux-cris-low.cc +++ b/gdbserver/linux-cris-low.cc @@ -160,9 +160,6 @@ cris_target::get_regs_info () return &myregs_info; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_cris_target; diff --git a/gdbserver/linux-crisv32-low.cc b/gdbserver/linux-crisv32-low.cc index ad308ec68af..61108195e2c 100644 --- a/gdbserver/linux-crisv32-low.cc +++ b/gdbserver/linux-crisv32-low.cc @@ -461,9 +461,6 @@ crisv32_target::get_regs_info () return &myregs_info; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_crisv32_target; diff --git a/gdbserver/linux-ia64-low.cc b/gdbserver/linux-ia64-low.cc index dc1bf3dc4d0..fac1148e0a6 100644 --- a/gdbserver/linux-ia64-low.cc +++ b/gdbserver/linux-ia64-low.cc @@ -387,10 +387,6 @@ ia64_target::low_arch_setup () current_process ()->tdesc = tdesc_ia64; } - -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_ia64_target; diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index 3271a3f6a14..c8b150952b8 100644 --- a/gdbserver/linux-low.h +++ b/gdbserver/linux-low.h @@ -129,12 +129,6 @@ struct process_info_private struct lwp_info; -struct linux_target_ops -{ -}; - -extern struct linux_target_ops the_low_target; - /* Target ops definitions for a Linux target. */ class linux_process_target : public process_stratum_target diff --git a/gdbserver/linux-m32r-low.cc b/gdbserver/linux-m32r-low.cc index f32ce254b31..a436c2e5487 100644 --- a/gdbserver/linux-m32r-low.cc +++ b/gdbserver/linux-m32r-low.cc @@ -154,9 +154,6 @@ m32r_target::get_regs_info () return &myregs_info; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_m32r_target; diff --git a/gdbserver/linux-m68k-low.cc b/gdbserver/linux-m68k-low.cc index 3fb87ca5703..de160ae2cb9 100644 --- a/gdbserver/linux-m68k-low.cc +++ b/gdbserver/linux-m68k-low.cc @@ -250,9 +250,6 @@ m68k_target::low_arch_setup () current_process ()->tdesc = tdesc_m68k; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_m68k_target; diff --git a/gdbserver/linux-mips-low.cc b/gdbserver/linux-mips-low.cc index 073e924619c..31baaed52bf 100644 --- a/gdbserver/linux-mips-low.cc +++ b/gdbserver/linux-mips-low.cc @@ -999,9 +999,6 @@ mips_target::get_regs_info () return &myregs_info; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_mips_target; diff --git a/gdbserver/linux-nios2-low.cc b/gdbserver/linux-nios2-low.cc index 4323bb9d655..8391d6bfa15 100644 --- a/gdbserver/linux-nios2-low.cc +++ b/gdbserver/linux-nios2-low.cc @@ -279,10 +279,6 @@ nios2_target::get_regs_info () return &myregs_info; } -struct linux_target_ops the_low_target = -{ -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_nios2_target; diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc index a671bcea1a7..e202caad9c7 100644 --- a/gdbserver/linux-ppc-low.cc +++ b/gdbserver/linux-ppc-low.cc @@ -3449,9 +3449,6 @@ ppc_target::get_ipa_tdesc_idx () return 0; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_ppc_target; diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc index ace4eb6d5c0..86bca1daafe 100644 --- a/gdbserver/linux-riscv-low.cc +++ b/gdbserver/linux-riscv-low.cc @@ -310,11 +310,6 @@ riscv_target::low_breakpoint_at (CORE_ADDR pc) return false; } -/* RISC-V/Linux target operations. */ -struct linux_target_ops the_low_target = -{ -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_riscv_target; diff --git a/gdbserver/linux-s390-low.cc b/gdbserver/linux-s390-low.cc index f779635e202..9d4c58b6a57 100644 --- a/gdbserver/linux-s390-low.cc +++ b/gdbserver/linux-s390-low.cc @@ -2850,9 +2850,6 @@ s390_target::emit_ops () return &s390_emit_ops_impl; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_s390_target; diff --git a/gdbserver/linux-sh-low.cc b/gdbserver/linux-sh-low.cc index fb36fa0876f..81199643820 100644 --- a/gdbserver/linux-sh-low.cc +++ b/gdbserver/linux-sh-low.cc @@ -185,9 +185,6 @@ sh_target::low_arch_setup () current_process ()->tdesc = tdesc_sh; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_sh_target; diff --git a/gdbserver/linux-sparc-low.cc b/gdbserver/linux-sparc-low.cc index 245b8925d80..681ef9cf953 100644 --- a/gdbserver/linux-sparc-low.cc +++ b/gdbserver/linux-sparc-low.cc @@ -342,9 +342,6 @@ sparc_target::get_regs_info () return &myregs_info; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_sparc_target; diff --git a/gdbserver/linux-tic6x-low.cc b/gdbserver/linux-tic6x-low.cc index 9fac75114eb..1375e56feb7 100644 --- a/gdbserver/linux-tic6x-low.cc +++ b/gdbserver/linux-tic6x-low.cc @@ -202,8 +202,6 @@ static int tic6x_regmap_c62x[] = { #endif -extern struct linux_target_ops the_low_target; - static int *tic6x_regmap; static unsigned int tic6x_breakpoint; #define tic6x_breakpoint_len 4 @@ -416,9 +414,6 @@ tic6x_target::get_regs_info () return &myregs_info; } -struct linux_target_ops the_low_target = { -}; - #if GDB_SELF_TEST #include "gdbsupport/selftest.h" diff --git a/gdbserver/linux-tile-low.cc b/gdbserver/linux-tile-low.cc index cd18ba46731..67ff153ab1d 100644 --- a/gdbserver/linux-tile-low.cc +++ b/gdbserver/linux-tile-low.cc @@ -215,10 +215,6 @@ tile_target::low_arch_setup () current_process ()->tdesc = tdesc_tilegx; } -struct linux_target_ops the_low_target = -{ -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_tile_target; diff --git a/gdbserver/linux-x86-low.cc b/gdbserver/linux-x86-low.cc index a593644fb2b..bc6b925c422 100644 --- a/gdbserver/linux-x86-low.cc +++ b/gdbserver/linux-x86-low.cc @@ -2985,13 +2985,6 @@ x86_target::get_ipa_tdesc_idx () return i386_get_ipa_tdesc_idx (tdesc); } -/* This is initialized assuming an amd64 target. - x86_arch_setup will correct it for i386 or amd64 targets. */ - -struct linux_target_ops the_low_target = -{ -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_x86_target; diff --git a/gdbserver/linux-xtensa-low.cc b/gdbserver/linux-xtensa-low.cc index 940c66f6f83..2bb60c78ae9 100644 --- a/gdbserver/linux-xtensa-low.cc +++ b/gdbserver/linux-xtensa-low.cc @@ -322,9 +322,6 @@ xtensa_target::get_regs_info () return &myregs_info; } -struct linux_target_ops the_low_target = { -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_xtensa_target;