gdb/testsuite: link some dwarf2 tests with nopie
[deliverable/binutils-gdb.git] / gdb / mips-linux-nat.c
index 21b1f583b9226911e27e8620db3fb379dc1d8b53..38ff461a35b3955780e6ce49c69b0e05c4b27136 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux on MIPS processors.
 
-   Copyright (C) 2001-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -458,11 +458,7 @@ mips_linux_nat_target::read_description ()
 
   if (have_dsp < 0)
     {
-      int tid;
-
-      tid = inferior_ptid.lwp ();
-      if (tid == 0)
-       tid = inferior_ptid.pid ();
+      int tid = get_ptrace_pid (inferior_ptid);
 
       errno = 0;
       ptrace (PTRACE_PEEKUSER, tid, DSP_CONTROL, 0);
@@ -677,7 +673,6 @@ mips_linux_nat_target::insert_watchpoint (CORE_ADDR addr, int len,
   struct mips_watchpoint *new_watch;
   struct mips_watchpoint **pw;
 
-  int i;
   int retval;
 
   if (!mips_linux_read_watch_registers (inferior_ptid.lwp (),
@@ -788,8 +783,9 @@ mips_linux_nat_target::close ()
   linux_nat_trad_target::close ();
 }
 
+void _initialize_mips_linux_nat ();
 void
-_initialize_mips_linux_nat (void)
+_initialize_mips_linux_nat ()
 {
   add_setshow_boolean_cmd ("show-debug-regs", class_maintenance,
                           &show_debug_regs, _("\
This page took 0.025696 seconds and 4 git commands to generate.