Re: [PATCH v6 3/4] Share fork_inferior et al with gdbserver

Pedro Alves
2017-06-07T21:06:58Z

On 06/07/2017 10:01 PM, Sergio Durigan Junior wrote:
>> >
>> > I tried it against v7, and that works. The think to keep
>> > in mind is that these trace_start_error functions
>> > are only called from the fork child, so they're very much
>> > fork-inferior.c related.
> They're actually being used by some -nat.c files on gdb/, and -low.c
> files on gdbserver. But as I said, I'm OK with your suggestion.

Sure, but that's exactly the code that is related to forking
a child, and which runs on the fork child, after it forks,
and before it execs.

It'd never make sense to call those functions on the fork
parent, which is GDB, because they'd cause GDB to exit!

Thanks,
Pedro Alves