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 test for following fork on position-independent executables


On 04/11/2018 04:28 PM, Simon Marchi wrote:

> +static void
> +break_here ()

This is C, so "(void)" is better here.

> +{
> +   int i;
> +   for (i = 0; i < 30; i++)
> +     sleep (1);
> +}
> +
> +int
> +main ()
> +{
> +  fork ();
> +  break_here();

Missing space before parens.

> +if [use_gdb_stub] {
> +    return
> +}
> +
I guess this is why you were asking about following forks and
"target remote".  AFAICT, this should just work in that case
too.  Did you find out it doesn't?

Otherwise looks fine.  Thanks for adding this.

Thanks,
Pedro Alves


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