This is the mail archive of the gdb@sources.redhat.com 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]

Re: gdb: detection and/or fork+gethostbyname crash workaround?


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


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