linux-nat: Add function lwp_is_stepping
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Fri, 16 Sep 2016 17:25:55 +0000 (19:25 +0200)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Fri, 16 Sep 2016 17:25:55 +0000 (19:25 +0200)
Add the function lwp_is_stepping which indicates whether the given LWP
is currently single-stepping.  This is a common interface, usable from
native GDB as well as from gdbserver.

gdb/gdbserver/ChangeLog:

* linux-low.c (lwp_is_stepping): New function.

gdb/ChangeLog:

* nat/linux-nat.h (lwp_is_stepping): New declaration.
* linux-nat.c (lwp_is_stepping): New function.

gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c
gdb/linux-nat.c
gdb/nat/linux-nat.h

index 9e38ce3171858ca7c6227e514fc5b6307ccfab47..1aef462ba0ddcc2af4acfda80159f48cb72390b1 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+       * nat/linux-nat.h (lwp_is_stepping): New declaration.
+       * linux-nat.c (lwp_is_stepping): New function.
+
 2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
        * s390-linux-nat.c (gdbcmd.h): New include.
index af8420f11b1459da2c744cd4ab44dcfd68c1ca4c..499ae3d8ce45712b6d987b02506bdb0250b5ef98 100644 (file)
@@ -1,3 +1,7 @@
+2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+       * linux-low.c (lwp_is_stepping): New function.
+
 2016-09-06  Carl Love  <cel@us.ibm.com>
 
        * server.c (start_inferior):  Fixed comment, requested comment change
index fb707158465e78f2d53b86590671cdd600e44892..4203b92342bc3f1a4a163e65826c86f732e65b1d 100644 (file)
@@ -176,6 +176,14 @@ lwp_stop_reason (struct lwp_info *lwp)
   return lwp->stop_reason;
 }
 
+/* See nat/linux-nat.h.  */
+
+int
+lwp_is_stepping (struct lwp_info *lwp)
+{
+  return lwp->stepping;
+}
+
 /* A list of all unknown processes which receive stop signals.  Some
    other process will presumably claim each of these as forked
    children momentarily.  */
index 7410f8ec148115e3ca95b2e3ce0032396b53ac22..8e9eb0bac4bb288324109f9fb122da58587c6a8c 100644 (file)
@@ -355,6 +355,14 @@ lwp_stop_reason (struct lwp_info *lwp)
   return lwp->stop_reason;
 }
 
+/* See nat/linux-nat.h.  */
+
+int
+lwp_is_stepping (struct lwp_info *lwp)
+{
+  return lwp->step;
+}
+
 \f
 /* Trivial list manipulation functions to keep track of a list of
    new stopped processes.  */
index 2b485db1412335b180fd40262234649721d1d65c..529cf26dab3ac893cf2e02cfbab5b1293042b99e 100644 (file)
@@ -85,4 +85,9 @@ extern enum target_stop_reason lwp_stop_reason (struct lwp_info *lwp);
 
 extern void linux_stop_lwp (struct lwp_info *lwp);
 
+/* Return nonzero if we are single-stepping this LWP at the ptrace
+   level.  */
+
+extern int lwp_is_stepping (struct lwp_info *lwp);
+
 #endif /* LINUX_NAT_H */
This page took 0.043376 seconds and 4 git commands to generate.