[RFC][PATCH 3/3] [gdb/procfs.c] Build failure in find_stop_signal.

Libor Bukata libor.bukata@oracle.com
Wed Jul 14 13:19:51 GMT 2021


>From fee608e1297bd24c4c32a3a8a56b08d85abac397 Mon Sep 17 00:00:00 2001
From: Libor Bukata <libor.bukata@oracle.com>
Date: Wed, 14 Jul 2021 05:38:46 -0700
Subject: [PATCH 3/3] [gdb/procfs.c] Build failure in find_stop_signal.

It fixes a regression caused by commit
1edb66d856c82c389edfd7610143236a68c76846
where thread_info::suspend was made private.

The public thread_info API has to be used
to get stop signal and avoid build failures.

gdb/ChangeLog:

2021-07-14  Libor Bukata <libor.bukata@oracle.com>

  * gdb/procfs.c (find_stop_signal): Use thread_info API.
---
 gdb/procfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/procfs.c b/gdb/procfs.c
index 529ee33df90..8343865e447 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -3576,7 +3576,7 @@ procfs_corefile_thread_callback (procinfo *pi, procinfo *thread, void *data)
 static int
 find_signalled_thread (struct thread_info *info, void *data)
 {
-  if (info->suspend.stop_signal != GDB_SIGNAL_0
+  if (info->stop_signal () != GDB_SIGNAL_0
       && info->ptid.pid () == inferior_ptid.pid ())
     return 1;
 
@@ -3590,7 +3590,7 @@ find_stop_signal (void)
     iterate_over_threads (find_signalled_thread, NULL);
 
   if (info)
-    return info->suspend.stop_signal;
+    return info->stop_signal ();
   else
     return GDB_SIGNAL_0;
 }
-- 
2.31.1



More information about the Gdb-patches mailing list