Re: Fwd: Re: [hatari-devel] Re: [hatari-users] DSP emulation - MPY #immediate

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On maanantai 28 tammikuu 2013, Laurent Sallafranque wrote:
> Sorry, but from my point of view, the debugging is more important than
> the profiler for common usage, ie, I wouldn't like to have the debugger
> display an instruction one time later when I trace something to find a
> bug.

Sure, no problem, I just wanted to know which way it should be fixed.
I've commited now a fix to this.


Doug, I commited also some updates to disassembler based on Mudflap
output.  Mudflap didn't indicate anything that would clearly cause
the crash you were seeing, but there was one instance of using
stack variable from inner scope on outer scope, which your GCC
version might not have liked [1].

-> If you have extra time at some point it would nice if you could
   reverse the columns workaround patch and try whether latest
   Mercurial version still triggers your crash.


	- Eero

[1] Undefined behavior = compiler is free to choose whether resulting
    code will blow up your computer.  :-)

> 
> Laurent
> 
> Le 28/01/2013 20:05, Eero Tamminen a écrit :
> > Hi,
> > 
> > On maanantai 28 tammikuu 2013, Douglas Little wrote:
> >> Please find the requested trace attached!
> >> 
> >> On 28 January 2013 18:53, Laurent Sallafranque
> >> <laurent.sallafranque@xxxxxxx
> >> 
> >>> wrote:
> >>>   Doug,
> >>> 
> >>> Would you please do the following :
> >>> 
> >>> In the debugger :
> >>>   b pc=text:once
> >>> 
> >>> start your program
> > 
> > Thanks, it seems pretty clear that profiler gets
> > DSP cycles for the previous instruction.
> > 
> > This is because debugger is called before DSP code is
> > executed, in dsp.c:
> > ----------
> > 
> >          if (unlikely(bDspDebugging)) {
> >          
> >                  while (save_cycles > 0)
> >                  {
> >                  
> >                          DebugDsp_Check();
> >                          dsp56k_execute_instruction();
> >                          save_cycles -= dsp_core.instr_cycle;
> >                  
> >                  }
> >          
> >          } else {
> > 
> > ----------
> > 
> > Next question is should the order of DSP instruction
> > execution and debugger hook be inverted.
> > 
> > Then DSP breakpoints would hit one instruction later, after
> > the instruction at given PC address has already been executed.
> > 
> > If latter isn't desirable, I need to delay cycle information
> > storing by one instruction.
> > 
> > 	- Eero




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/