From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: PATCH: resume + threads + software stepping == boom Date: Fri, 08 Jun 2001 16:43:00 -0000 Message-id: <20010608164327.A22796@nevyn.them.org> References: <20010608123432.A2140@nevyn.them.org> <3B215D60.78921819@cygnus.com> <3B215DBE.E9E4463A@cygnus.com> X-SW-Source: 2001-06/msg00185.html On Fri, Jun 08, 2001 at 04:20:30PM -0700, Michael Snyder wrote: > Michael Snyder wrote: > > I like the problem analysis, but not the implementation of the solution. > > If we are going to always set step to zero for SOFTWARE_SINGLE_STEP_P, > > then it does not make sense to set it to one again, even if the code > > will never be reached (in theory). I would rather see it made explicit > > that this code should never be reached if SOFTWARE_SINGLE_STEP_P is true. > > Something like this: > > > > < if (!step) > > --- > > > if (!(step && SOFTWARE_SINGLE_STEP_P())) > > Err, my logic is wrong, but you get the idea... maybe I meant > if (!step && !SOFTWARE_SINGLE_STEP_P()) > Does SOFTWARE_SINGLE_STEP_P () contradict the error we are detecting here? From reading the surrounding code, I'm not entirely sure what the case is; is it: the current thread has stopped at a breakpoint, and we do not want to let other threads continue, so we require that we be single stepping so that one thread does not run independently? -- Daniel Jacobowitz Debian GNU/Linux Developer Monta Vista Software Debian Security Team