This is the mail archive of the gdb-patches@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: PATCH: resume + threads + software stepping == boom


Could I suggest:

> 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())


Dumping the warning("internal error: ...") and replacing the entire 
block of code with something like:

	gdb_assert (step || SOFTWARE_SINGLE_STEP_P ())

(I know my logic is wrong).  That way the problem of ``never reached (in 
theory)'' is eliminated.


	Andrew


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