rainerf / ricodebug

ricodebug is a debugger featuring data visualization, similar to DDD
12 stars 9 forks source link

SVG + Tracepoints #48

Open dstoeg opened 11 years ago

dstoeg commented 11 years ago

Added SVG stuff and changed tracepointcontroller, so that waveforms can be displayed in the datagraph window.

please ignore the SysC files

giselher commented 11 years ago

Why didn't you rebasee your branch on top of mine? I already have a lot of and other new stuff.

rainerf commented 11 years ago

Does not work for me: After setting a tracepoint, adding a single integer variable, and running over it, everything seems fine (MI trace shows the program stopping on breakpoints and automatically continuing, etc). However, after clicking the tracepoint, the following happens:

Traceback (most recent call last):
  File "/home/rainer/svn/ricodebug/src/controllers/tracepointcontroller.py", line 69, in updateWaveforms
    self._model.selectionMade(index)
  File "/home/rainer/svn/ricodebug/src/models/tracepointmodel.py", line 411, in selectionMade
    self.distObjects.tracepointwaveModel.updateTracepointWave(tp.wave)
  File "/home/rainer/svn/ricodebug/src/models/tracepointwavemodel.py", line 112, in updateTracepointWave
    self.waveform.svg.drawWaveform(i, v, item.type, item.name)
  File "/home/rainer/svn/ricodebug/src/helpers/svgdrawwaveforms.py", line 106, in drawWaveform
    self.values = self.wave_list[i]["values"]
TypeError: list indices must be integers, not NoneType
giselher commented 11 years ago

Give me write access to your repo and I can help you rebase your branch. Just click the link and add giselher as collaborator. https://github.com/num3n0r/ricodebug/settings/collaboration

giselher commented 11 years ago

Rebased and fixed for the new changes. Also removed 4 unused files (wtf?).

Daniel just needs to fix the errors Rainer encountered.

Dependency cycle is:

 1. STL                     (Rebased and declared as fixed)
 2. SystemC & SVG stuff     (Rebased and hopefully fixed)
 3. Waveforms in Datagraph  (Rebased and partly broken)
rainerf commented 11 years ago

Thanks, I merged the other two into an integration branch for further testing, but they look good so far. I'll wait with this one until Daniel's fixes are in.

rainerf commented 11 years ago

Some further debugging. In __getTracepointWaveIndex with stack trace

    __getTracepointWaveIndex [tracepointwavemodel.py:128]   
    updateTracepointWave [tracepointwavemodel.py:109]   
    selectionMade [tracepointmodel.py:411]  
    updateWaveforms [tracepointcontroller.py:69]    
    main [ricodebug.py:77]  
    ... 

self.waveforms is an empty list. __getTracepointWaveIndex will therefore return None, which you pass as first parameter (i) to self.waveform.svg.drawWaveform, which, with stack trace

    drawWaveform [svgdrawwaveforms.py:106]  
    updateTracepointWave [tracepointwavemodel.py:112]   
    selectionMade [tracepointmodel.py:411]  
    updateWaveforms [tracepointcontroller.py:69]    
    main [ricodebug.py:77]  
    ...

will use this parameter to get an element in self.wave_list[i]["values"] (where i is now None), which leads to the crash reported above.

Steps to reproduce with the following program:

int main() {
    volatile int a;

    for (int i=0; i<10; ++i)
        a = i;

    return 0;
}
  1. Compile program
  2. Set breakpoints in line 4 (for loop) and 7 (return), and a tracepoint in line 5 (a = i)
  3. Run to breakpoint in line 4, add i to tracepoint
  4. Continue to breakpoint in line 5
  5. Click tracepoint in "Tracepoints" dock widget