gdb: detection and/or fork+gethostbyname crash workaround?
Glenn F. Maynard
g_gdb@zewt.org
Tue Jul 24 14:26:00 GMT 2001
Didn't read this well enough the first time around:
> > How about something like this:
> >
> > /* Global variable. Do resolve by forking a child process.
> > This is usually one, but you can turn it off to make debugging
> > easier. */
> > int g_resolve_fork = 1;
> >
> > Then in your .gdbinit file, say:
> >
> > print g_resolve_fork = 0
I prefer a self-contained workaround. If someone loads a program into
a debugger to fix a problem, they shouldn't have to sift through documentation
to find something like this out--and they probably will end up mailing
the program's maintainer instead, as the result of not doing this looks like
a bug. `It's similar to a recent locale problem discussed on mutt-dev; one of
OpenBSD's "YES" regexes was "^[Yn]"; someone suggested adding a --without-
autoconf toggle to disable using this string--but I'd certainly never have
thought to look for a manual fix.
Also, that'd be printing "no symbol" errors for other programs (and "no
symtab" errors for empty gdbs).
--
Glenn Maynard
More information about the Gdb
mailing list