This is the mail archive of the gdb-patches@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]

Re: [PATCH] Add some debugging printfs to linux-nat.c


Hi Doug,

Doug Evans wrote:
> I found these useful when debugging 17247,17314.
> 
> 2014-08-31  Doug Evans  <xdje42@gmail.com>
> 
> 	* linux-nat.c (wait_lwp): Add debugging printf.
> 	(linux_nat_wait_1): Ditto.
> 
> diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
> index 0898442..557c84b 100644
> --- a/gdb/linux-nat.c
> +++ b/gdb/linux-nat.c
> @@ -2311,6 +2311,8 @@ wait_lwp (struct lwp_info *lp)
>  	 again before it gets to sigsuspend so we can safely let the handlers
>  	 get executed here.  */
>  
> +      if (debug_linux_nat)
> +	fprintf_unfiltered (gdb_stdlog, "WL: about to sigsuspend\n");
>        sigsuspend (&suspend_mask);
>      }
>  
> @@ -3441,6 +3443,8 @@ retry:
>        gdb_assert (lp == NULL);
>  
>        /* Block until we get an event reported with SIGCHLD.  */
> +      if (debug_linux_nat)
> +	fprintf_unfiltered (gdb_stdlog, "LNW: about to sigsuspend\n");
>        sigsuspend (&suspend_mask);
>      }

Please use debug_printf.

Thanks,
Gary

-- 
http://gbenson.net/


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