[1/3] gdb: print 'stop_requested' in infrun_debug_show_threads

Message ID 20240328173537.2679010-1-tankut.baris.aktemur@intel.com
State New
Headers
Series [1/3] gdb: print 'stop_requested' in infrun_debug_show_threads |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Aktemur, Tankut Baris March 28, 2024, 5:35 p.m. UTC
  Print the 'stop_requested' field of a thread in the debug logs.
The field may be useful when debugging GDB's infrun.
---
 gdb/infrun.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gdb/infrun.h b/gdb/infrun.h
index 6339fd997e1..57a49da51fe 100644
--- a/gdb/infrun.h
+++ b/gdb/infrun.h
@@ -67,10 +67,11 @@  infrun_debug_show_threads (const char *title, ThreadRange threads)
       infrun_debug_printf ("%s:", title);
       for (thread_info *thread : threads)
 	infrun_debug_printf ("  thread %s, executing = %d, resumed = %d, "
-			     "state = %s",
+			     "stop_requested = %d, state = %s",
 			     thread->ptid.to_string ().c_str (),
 			     thread->executing (),
 			     thread->resumed (),
+			     thread->stop_requested,
 			     thread_state_string (thread->state));
     }
 }