From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Buettner To: "Glenn F. Maynard" , gdb@sourceware.cygnus.com Subject: Re: gdb: detection and/or fork+gethostbyname crash workaround? Date: Tue, 24 Jul 2001 14:49:00 -0000 Message-id: <1010724214920.ZM20942@ocotillo.lan> References: <20010723210115.B1359@zewt.org> <1010724155219.ZM20181@ocotillo.lan> <20010724142248.A2923@zewt.org> <1010724202607.ZM20680@ocotillo.lan> <20010724165719.A3214@zewt.org> X-SW-Source: 2001-07/msg00354.html On Jul 24, 4:57pm, Glenn F. Maynard wrote: > > 1) Set up a signal handler in the child for SIGTRAP. Have the > > signal handler replace the trap instruction with a nop prior > > to returning. > > I tried that, with no luck. I might have botched something silly, of course. Well, I didn't really like this suggestion anyway, but often times when writing self modifying code (I used to work on JIT compilers), you need to make sure that the instruction cache and the data cache are synchronized. (This often means that you need to flush the D-cache and invalidate the I-cache.) Kevin