Simulavr: an AVR simulator - Patches: patch #7766, Make Step stoppable, print less...
You are not allowed to post comments on this tracker with your current authentication level.
patch #7766: Make Step stoppable, print less when used as a library
Submitter: | Lars Immisch <larsimmisch> | ||
Submitted: | Sat 21 Apr 2012 01:25:10 AM UTC | ||
Category: | feature add | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | tomk | Open/Closed: | Closed |
Component Version: | simulavr |
Attached Files
file #25701: 0006-Make-Step-stoppable-print-less-when-used-as-a-librar.patch added by larsimmisch (10KiB - application/octet-stream)
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2014-10-30 | tomk | Category | None | feature add | |
Status | None | Done | |||
Assigned to | None | tomk | |||
Open/Closed | Open | Closed | |||
2012-04-21 | larsimmisch | Attached File | - | Added 0006-Make-Step-stoppable-print-less-when-used-as-a-librar.patch, #25701 |
Powered by Savane 3.13-d3ae.
Corresponding source code
This patch fixes two problems:
- SystemClock::Step didn't honour Stop, so if Stop was called internally from a device (because an exit symbol was encountered), a loop with Step would never terminate. This was a problem in the existing example code, e.g. examples/python/ex_utils.py#doRun
- SystemClock::Endless and others unconditionally wrote to stdout. This is undesirable when simulavr is used as a library. The output was moved to cmd/main.c. This way, the simulavr binary gives the same diagnostic messages, but the library itself is silent.
Also, Step, Run, adn RunTimeRange return the number of steps to improve usability of these methods from a library.