Traumflug / simulavr

A fork of SimulAVR (http://www.nongnu.org/simulavr/) for handling contributions. The practical SIMINFO mechanism implemented here wasn't accepted upstream, but is crucial for Teacup Firmware simulations, so this fork will stay ... and follow upstream. Default branch is 'traumflug', master here matches master on nongnu.org.
GNU General Public License v2.0
40 stars 26 forks source link

premature termination on linux/amd64 #6

Open miso- opened 10 years ago

miso- commented 10 years ago

simulavr terminates prematurely on linux/amd64 with message: "FATAL: file traceval.cpp: line 212: add TraceValue denied: wrong name: 'PC', scope is 'CORE.'". This behavior is caused by if(n.find('.') != (unsigned int)-1) check, in traceval.cpp:210 because string::find() returns size_t which is unsigned long, which happens to be of different (8) size than int (4). I'v created patch https://github.com/miso-/simulavr/commit/7141f505270be47bb5fcca0e0cd90adb4dbae2ed that makes simulavr work on linux/amd64. Please review.

Traumflug commented 10 years ago

Maybe I'm a bit late, but yes, I had this, too. As I wasn't so keen on hunting this down, I first rebased the traumflug branch onto the latest one from upstream. They already fixed the issue there, but your patch appears to be more complete. So I cherry-picked the commit, just modified the hunk in traceval.cpp aroung line 355 a bit. Another hunk didn't apply because it was done upstream already.

Thank you very much for the contribution. Does it work now for you, too?