This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] select_event_lwp_callback: update comments


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b90fc18880972f0c2ed280df20604d89f1d4ec38

commit b90fc18880972f0c2ed280df20604d89f1d4ec38
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Mar 19 12:24:06 2015 +0000

    select_event_lwp_callback: update comments
    
    This function (in both GDB and GDBserver) used to consider only
    SIGTRAP/breakpoint events, but that's no longer the case nowadays.
    
    gdb/gdbserver/ChangeLog:
    2015-03-19  Pedro Alves  <palves@redhat.com>
    
    	* linux-low.c (select_event_lwp_callback): Update comments to
    	no longer mention SIGTRAP.
    
    gdb/ChangeLog:
    2015-03-19  Pedro Alves  <palves@redhat.com>
    
    	* linux-nat.c (select_event_lwp_callback): Update comment to no
    	longer mention SIGTRAP.

Diff:
---
 gdb/ChangeLog             |  5 +++++
 gdb/gdbserver/ChangeLog   |  5 +++++
 gdb/gdbserver/linux-low.c | 10 +++++-----
 gdb/linux-nat.c           |  2 +-
 4 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 41080ae..45e5029 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-19  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (select_event_lwp_callback): Update comment to no
+	longer mention SIGTRAP.
+
 2015-03-18  Tristan Gingold  <gingold@adacore.com>
 
         * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Move
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 7f009f1..6efab5b 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-19  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (select_event_lwp_callback): Update comments to
+	no longer mention SIGTRAP.
+
 2015-03-18  Gary Benson  <gbenson@redhat.com>
 
 	* server.c (handle_query): Do not report vFile:fstat as supported.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 48d905b..9558f46 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -2267,8 +2267,7 @@ select_singlestep_lwp_callback (struct inferior_list_entry *entry, void *data)
     return 0;
 }
 
-/* Select the Nth LWP that has had a SIGTRAP event that should be
-   reported to GDB.  */
+/* Select the Nth LWP that has had an event.  */
 
 static int
 select_event_lwp_callback (struct inferior_list_entry *entry, void *data)
@@ -2321,12 +2320,13 @@ select_event_lwp (struct lwp_info **orig_lp)
   if (event_thread == NULL)
     {
       /* No single-stepping LWP.  Select one at random, out of those
-         which have had SIGTRAP events.  */
+         which have had events.  */
 
-      /* First see how many SIGTRAP events we have.  */
+      /* First see how many events we have.  */
       find_inferior (&all_threads, count_events_callback, &num_events);
 
-      /* Now randomly pick a LWP out of those that have had a SIGTRAP.  */
+      /* Now randomly pick a LWP out of those that have had
+	 events.  */
       random_selector = (int)
 	((num_events * (double) rand ()) / (RAND_MAX + 1.0));
 
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 22ce842..f5622ac 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -2644,7 +2644,7 @@ lwp_status_pending_p (struct lwp_info *lp)
   return lp->status != 0 || lp->waitstatus.kind != TARGET_WAITKIND_IGNORE;
 }
 
-/* Select the Nth LWP that has had a SIGTRAP event.  */
+/* Select the Nth LWP that has had an event.  */
 
 static int
 select_event_lwp_callback (struct lwp_info *lp, void *data)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]