This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: frysk-core/frysk/proc Breakpoint.java IsaIA32. ...


Hi Phil,

On Wed, 2007-08-22 at 10:11 -0500, Phil Muldoon wrote:
> > 	Fixes bug #3676
> > 	* Breakpoint.java (stepDone): Only set if still installed.
> > 	(isInstalled): new method.
> > 	(toString): Prettify.
> > 	* IsaIA32.java (isTaskStepped): Reset flag.
> > 	* IsaX8664.java (isTaskStepped): Likewise.
> >   
> As we talked about on irc, and in addition to looking at this code in 
> preparation  for hardware watchpoints, can I make a small recommendation 
> here?
> 
> isTaskStepped(task) is a query, and should imo not be altering any debug 
> registers after the fact.
> 
> Can I propose a split into:
> 
> isTaskStepped(task) and setTaskStepped(task)
> 
> Does that make better sense?

That does make sense. Although I don't know if someone really needs
setTaskStepped(), so I wouldn't introduce it unless there was a real
usage for it. The reason why the flag is reset here is mentioned in the
original patch email:
http://sourceware.org/ml/frysk/2007-q1/msg00024.html

> There is one thing that changed in the semantics of Isa.isTaskStepped()
> for x86 and x86_64 (and Ia32On64 has been added). That is that the
> stepping flag in the d6 register is being reset because "[the d6]
> register is never cleared by the processor and must be cleared by
> software after the contents have been read". This means that we are now
> doing a inferior visible change, but I don't see any way to get around
> this. If the inferior would be using instruction stepping itself there
> would be all kinds of interesting issues anyway.

I do agree this might not be the most ideal place to reset this flag
though. Maybe it should be moved into LinuxTask.sendContinue()?

Cheers,

Mark


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