This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: libSegFault and just in time debugging
> Oops, hit send too soon...
>
> Meant to say if you are automatically attaching to everything on the
> system, you have to be careful about auto-launched daemons, because
> they won't die all the way while waiting for the connection to the
> debugger, and that can cause them not to get restarted. Not a problem
> in general with released systems, where hopefully the daemons aren't
> crashing all that often. But with development systems it could cause
> a problem...
Right. But there's considerable flexibility in, eg. at what point in your
boot scripts do you introduce the LD_PRELOAD variable or the
/etc/ld.so.preload file. You could start your system daemons first,
for instance, and then they wouldn't get the preload library. And the
env variable would only apply to children of a specific shell. Could
even be turned on by a user, thus not affecting any root or other-user
processes.
Or, you could introduce the /etc file before boot, and get everything,
thus enabling you to debug crashing system daemons etc.