This is the mail archive of the gdb@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: Debugging through exec() (Linux MAY_FOLLOW_EXEC)


> Date: Tue, 15 Aug 2006 16:28:19 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb@sourceware.org
> 
> Currently gdb does not notice `exec' at all - it does not apply the inferior
> changes to its debugging information about the inferior.  By default in the
> point of `exec' it will lose any breakpoints and the execution will continue
> without any gdb influence and the program will just finish uncaught.
> 
> If you turn on "catch exec" you will get back the control after `exec' changes
> the virtual memory context but gdb will still expect the original executable is
> still loaded. All the sources will be displayed for the original program and
> breakpoints put to the addresses according to the debuginfo of the original
> program, still everything will be messed up as a complately different
> executable is already running.

Thanks for the explanations, but I seem to be dense today, because I
don't get to the cheese yet.

Perhaps if you could describe a scenario where the current behavior is
inconvenient, and what does your patch change in this respect, I will
understand the issues.

Please also tell how, if at all, the suggested changes interact with
follow-fork mode.


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