This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb: detection and/or fork+gethostbyname crash workaround?
- To: Michael Elizabeth Chastain <chastain at cygnus dot com>, g_gdb at zewt dot org, gdb at sourceware dot cygnus dot com
- Subject: Re: gdb: detection and/or fork+gethostbyname crash workaround?
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Tue, 24 Jul 2001 13:52:57 -0700
- References: <200107242000.NAA20721@bosch.cygnus.com>
On Jul 24, 1:00pm, Michael Elizabeth Chastain wrote:
> > I'm trying to work around this bug in another program, now, where making
> > a separate binary for resolving is undesirable; I want to force it to
> > not fork resolves when being debugged, and do so automatically.
>
> 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 like Michael's suggestion (above) better than any of my suggested
workarounds.
Kevin