Skip to content

Conversation

@dstoeg
Copy link
Contributor

@dstoeg dstoeg commented Feb 4, 2013

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

please ignore the SysC files

@giselher
Copy link

giselher commented Feb 4, 2013

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

@rainerf
Copy link
Owner

rainerf commented Feb 4, 2013

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
Copy link

giselher commented Feb 4, 2013

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

Alexander Preisinger and others added 6 commits February 4, 2013 11:27
Shows Waveforms in the Datagraph using the newly added functionality for
show SVG images in the datagraph
@giselher
Copy link

giselher commented Feb 4, 2013

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)

@giselher giselher mentioned this pull request Feb 4, 2013
@rainerf
Copy link
Owner

rainerf commented Feb 4, 2013

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
Copy link
Owner

rainerf commented Feb 18, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants