[02/12] gdb/infrun: add debug print in print_signal_received_reason

Message ID 8b853ddc70117ba5a6a357c2833070a6c3f160d2.1666341010.git.aburgess@redhat.com
State New
Headers
Series Infcalls from B/P conditions in multi-threaded inferiors |

Commit Message

Andrew Burgess Oct. 21, 2022, 8:43 a.m. UTC
  It would have helped me to see an infrun debug line being printed from
print_signal_received_reason, so I'm adding one.
---
 gdb/infrun.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Andrew Burgess Jan. 13, 2023, 4:38 p.m. UTC | #1
Andrew Burgess <aburgess@redhat.com> writes:

> It would have helped me to see an infrun debug line being printed from
> print_signal_received_reason, so I'm adding one.

I've gone ahead and pushed this patch, it's only adding a single debug
line so I don't think anyone will complain.

Thanks,
Andrew


> ---
>  gdb/infrun.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/gdb/infrun.c b/gdb/infrun.c
> index 39840ef32c8..c28bf28a4d9 100644
> --- a/gdb/infrun.c
> +++ b/gdb/infrun.c
> @@ -8393,6 +8393,8 @@ print_signal_received_reason (struct ui_out *uiout, enum gdb_signal siggnal)
>  {
>    struct thread_info *thr = inferior_thread ();
>  
> +  infrun_debug_printf ("signal = %s", gdb_signal_to_string (siggnal));
> +
>    annotate_signal ();
>  
>    if (uiout->is_mi_like_p ())
> -- 
> 2.25.4
  

Patch

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 39840ef32c8..c28bf28a4d9 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -8393,6 +8393,8 @@  print_signal_received_reason (struct ui_out *uiout, enum gdb_signal siggnal)
 {
   struct thread_info *thr = inferior_thread ();
 
+  infrun_debug_printf ("signal = %s", gdb_signal_to_string (siggnal));
+
   annotate_signal ();
 
   if (uiout->is_mi_like_p ())