[gdb/testsuite] Use -fuse-ld=gold in fission.exp
[deliverable/binutils-gdb.git] / gdb / s390-linux-nat.c
index 74cab7142062e3f01be04a12724a58080dfd5ca0..e2f13def9de490d96ab8f94e096933c201100d10 100644 (file)
@@ -1,5 +1,5 @@
 /* S390 native-dependent code for GDB, the GNU debugger.
-   Copyright (C) 2001-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2019 Free Software Foundation, Inc.
 
    Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
    for IBM Deutschland Entwicklung GmbH, IBM Corporation.
@@ -42,6 +42,7 @@
 #include <elf.h>
 #include <algorithm>
 #include "inf-ptrace.h"
+#include "linux-tdep.h"
 
 /* Per-thread arch-specific data.  */
 
@@ -122,7 +123,6 @@ public:
   int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *)
     override;
   int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
-  bool have_continuable_watchpoint () override { return true; }
   bool stopped_by_watchpoint () override;
   int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
                         struct expression *) override;
@@ -258,9 +258,9 @@ static int
 s390_inferior_tid (void)
 {
   /* GNU/Linux LWP ID's are process ID's.  */
-  int tid = ptid_get_lwp (inferior_ptid);
+  int tid = inferior_ptid.lwp ();
   if (tid == 0)
-    tid = ptid_get_pid (inferior_ptid); /* Not a threaded program.  */
+    tid = inferior_ptid.pid (); /* Not a threaded program.  */
 
   return tid;
 }
@@ -622,7 +622,7 @@ s390_linux_nat_target::low_new_fork (struct lwp_info *parent, pid_t child_pid)
   /* GDB core assumes the child inherits the watchpoints/hw breakpoints of
      the parent.  So copy the debug state from parent to child.  */
 
-  parent_pid = ptid_get_pid (parent->ptid);
+  parent_pid = parent->ptid.pid ();
   parent_state = s390_get_debug_reg_state (parent_pid);
   child_state = s390_get_debug_reg_state (child_pid);
 
@@ -667,7 +667,7 @@ bool
 s390_linux_nat_target::stopped_by_watchpoint ()
 {
   struct s390_debug_reg_state *state
-    = s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+    = s390_get_debug_reg_state (inferior_ptid.pid ());
   per_lowcore_bits per_lowcore;
   ptrace_area parea;
 
@@ -704,7 +704,7 @@ void
 s390_linux_nat_target::low_prepare_to_resume (struct lwp_info *lp)
 {
   int tid;
-  pid_t pid = ptid_get_pid (ptid_of_lwp (lp));
+  pid_t pid = ptid_of_lwp (lp).pid ();
 
   per_struct per_info;
   ptrace_area parea;
@@ -730,7 +730,7 @@ s390_linux_nat_target::low_prepare_to_resume (struct lwp_info *lp)
 
   lp_priv->per_info_changed = 0;
 
-  tid = ptid_get_lwp (ptid_of_lwp (lp));
+  tid = ptid_of_lwp (lp).lwp ();
   if (tid == 0)
     tid = pid;
 
@@ -834,7 +834,7 @@ s390_linux_nat_target::low_delete_thread (struct arch_lwp_info *arch_lwp)
 /* Iterator callback for s390_refresh_per_info.  */
 
 static int
-s390_refresh_per_info_cb (struct lwp_info *lp, void *arg)
+s390_refresh_per_info_cb (struct lwp_info *lp)
 {
   s390_mark_per_info_changed (lp);
 
@@ -848,9 +848,9 @@ s390_refresh_per_info_cb (struct lwp_info *lp, void *arg)
 static int
 s390_refresh_per_info (void)
 {
-  ptid_t pid_ptid = ptid_t (ptid_get_pid (current_lwp_ptid ()));
+  ptid_t pid_ptid = ptid_t (current_lwp_ptid ().pid ());
 
-  iterate_over_lwps (pid_ptid, s390_refresh_per_info_cb, NULL);
+  iterate_over_lwps (pid_ptid, s390_refresh_per_info_cb);
   return 0;
 }
 
@@ -861,7 +861,7 @@ s390_linux_nat_target::insert_watchpoint (CORE_ADDR addr, int len,
 {
   s390_watch_area area;
   struct s390_debug_reg_state *state
-    = s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+    = s390_get_debug_reg_state (inferior_ptid.pid ());
 
   area.lo_addr = addr;
   area.hi_addr = addr + len - 1;
@@ -878,7 +878,7 @@ s390_linux_nat_target::remove_watchpoint (CORE_ADDR addr, int len,
   unsigned ix;
   s390_watch_area *area;
   struct s390_debug_reg_state *state
-    = s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+    = s390_get_debug_reg_state (inferior_ptid.pid ());
 
   for (ix = 0;
        VEC_iterate (s390_watch_area, state->watch_areas, ix, area);
@@ -918,7 +918,7 @@ s390_linux_nat_target::insert_hw_breakpoint (struct gdbarch *gdbarch,
 
   area.lo_addr = bp_tgt->placed_address = bp_tgt->reqstd_address;
   area.hi_addr = area.lo_addr;
-  state = s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+  state = s390_get_debug_reg_state (inferior_ptid.pid ());
   VEC_safe_push (s390_watch_area, state->break_areas, &area);
 
   return s390_refresh_per_info ();
@@ -934,7 +934,7 @@ s390_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch,
   struct watch_area *area;
   struct s390_debug_reg_state *state;
 
-  state = s390_get_debug_reg_state (ptid_get_pid (inferior_ptid));
+  state = s390_get_debug_reg_state (inferior_ptid.pid ());
   for (ix = 0;
        VEC_iterate (s390_watch_area, state->break_areas, ix, area);
        ix++)
@@ -1017,9 +1017,8 @@ s390_linux_nat_target::read_description ()
      that mode, report s390 architecture with 64-bit GPRs.  */
 #ifdef __s390x__
   {
-    CORE_ADDR hwcap = 0;
+    CORE_ADDR hwcap = linux_get_hwcap (current_top_target ());
 
-    target_auxv_search (current_top_target (), AT_HWCAP, &hwcap);
     have_regset_tdb = (hwcap & HWCAP_S390_TE)
       && check_regset (tid, NT_S390_TDB, s390_sizeof_tdbregset);
 
This page took 0.02683 seconds and 4 git commands to generate.