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?


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


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