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 v6 3/4] Share fork_inferior et al with gdbserver


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


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