From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Glenn F. Maynard" To: gdb@sourceware.cygnus.com Subject: Re: gdb: detection and/or fork+gethostbyname crash workaround? Date: Tue, 24 Jul 2001 14:26:00 -0000 Message-id: <20010724172643.A3936@zewt.org> References: <200107242000.NAA20721@bosch.cygnus.com> <1010724205257.ZM20762@ocotillo.lan> X-SW-Source: 2001-07/msg00353.html 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