aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/log.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix double-free on unmatched logger error patternZachary Snow2021-02-231-3/+3
| | | | | | | When an expected logger error pattern is unmatched, the logger raises another (hidden) error. Because of the previous ordering of actions, `logv_error_with_prefix()` would inadvertently invoke `yosys_atexit()` twice, causing a double-free.
* Replace "ILANG" with "RTLIL" everywhere.whitequark2020-08-261-5/+5
| | | | | | | | | | The only difference between "RTLIL" and "ILANG" is that the latter is the text representation of the former, as opposed to the in-memory graph representation. This distinction serves no purpose but confuses people: it is not obvious that the ILANG backend writes RTLIL graphs. Passes `write_ilang` and `read_ilang` are provided as aliases to `write_rtlil` and `read_rtlil` for compatibility.
* Use C++11 [[noreturn]] attribute.whitequark2020-06-191-1/+1
|
* log: Use `dict` instead of `std::vector<std::pair>` for `log_expect_{error, ↵Alberto Gonzalez2020-05-151-10/+10
| | | | warning, log}` to better express the intent that each element is unique.
* kernel: Trap in `log_error()` when a debugger is attached.whitequark2020-05-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The workflow of debugging fatal pass errors in Yosys is flawed in three ways: 1. Running Yosys under a debugger is sufficient for the debugger to catch some fatal errors (segfaults, aborts, STL exceptions) but not others (`log_error()`, `log_cmd_error()`). This is neither obvious nor easy to remember. 2. To catch Yosys-specific fatal errors, it is necessary to set a breakpoint at `logv_error_with_prefix()`, or at least, `logv_error()`. This is neither obvious nor easy to remember, and GDB's autocomplete takes many seconds to suggest function names due to the large amount of symbols in Yosys. 3. If a breakpoint is not set and Yosys encounters with such a fatal error, the process terminates. When debugging a crash that takes a long time to reproduce (or a nondeterministic crash) this can waste a significant amount of time. To solve this problem, add a macro `YS_DEBUGTRAP` that acts as a hard breakpoint (if available), and a macro `YS_DEBUGTRAP_IF_DEBUGGING` that acts as a hard breakpoint only if debugger is present. Then, use `YS_DEBUGTRAP_IF_DEBUGGING` in `logv_error_with_prefix()` to obviate the need for a breakpoint on nearly every platform. Co-Authored-By: Alberto Gonzalez <boqwxp@airmail.cc>
* Add YS_ prefix to macros, add explanation and apply to older version as wellMiodrag Milanovic2020-03-131-8/+8
|
* Use boost xpressive for gcc 4.8Miodrag Milanovic2020-03-131-8/+8
|
* Fix compilation for emccjiegec2020-03-111-1/+0
|
* Remove duplicate warning detectionMiodrag Milanovic2020-02-231-0/+6
|
* Handle expect no warnings together with expectedMiodrag Milanovic2020-02-221-2/+8
|
* Prevent double error messageMiodrag Milanovic2020-02-171-1/+3
|
* Option to expect no warningsMiodrag Milanovic2020-02-171-0/+1
|
* No new error if already failingMiodrag Milanovic2020-02-171-1/+2
|
* Add expect option to logger commandMiodrag Milanovic2020-02-141-1/+58
|
* Improve logging use of experimental featuresClaire Wolf2020-01-281-2/+2
| | | | Signed-off-by: Claire Wolf <clifford@clifford.at>
* Add log_experimental() and experimental() API and "yosys -x"Claire Wolf2020-01-271-1/+14
| | | | Signed-off-by: Claire Wolf <clifford@clifford.at>
* log_dump() to support State enumEddie Hung2019-10-021-0/+4
|
* Revert "Add log_checkpoint function and use it in opt_muxtree"Eddie Hung2019-07-151-7/+0
| | | | This reverts commit 0e6c83027f24cdf7082606a5631468ad28f41574.
* Redesign log_id_cache so that it doesn't keep IdString instances referenced, ↵Clifford Wolf2019-07-151-6/+13
| | | | | | fixes #1178 Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Add log_checkpoint function and use it in opt_muxtreeClifford Wolf2019-07-151-0/+7
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Fixes and cleanups in AST_TECALL handlingClifford Wolf2019-06-071-4/+4
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Merge branch 'pr_elab_sys_tasks' of https://github.com/udif/yosys into ↵Clifford Wolf2019-06-071-0/+11
|\ | | | | | | clifford/pr983
| * Initial implementation of elaboration system tasksUdi Finkelstein2019-05-031-0/+11
| | | | | | | | | | | | | | (IEEE1800-2017 section 20.11) This PR allows us to use $info/$warning/$error/$fatal **at elaboration time** within a generate block. This is very useful to stop a synthesis of a parametrized block when an illegal combination of parameters is chosen.
* | Fix handling of warning and error messages within log_make_debug-blocksClifford Wolf2019-05-221-0/+9
|/ | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Add log_debug() frameworkClifford Wolf2019-04-221-0/+7
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Improve determinism of IdString DB for similar scriptsClifford Wolf2019-03-111-0/+4
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Provide source-location logging.Henner Zeller2018-07-191-44/+40
| | | | | | | | o Provide log_file_warning() and log_file_error() that prefix the log message with <filename>:<lineno>: to be easily picked up by IDEs that need to step through errors. o Simplify some duplicate logging code in kernel/log.cc o Use the new log functions in genrtlil.
* Add "#ifdef __FreeBSD__"Christian Krämer2018-05-131-3/+3
| | | | (Re-commit e3575a8 with corrected author field)
* Revert "Add "#ifdef __FreeBSD__""Clifford Wolf2018-05-131-3/+3
| | | | This reverts commit e3575a86c525f2511902e7022893c3923ba8093e.
* Add "#ifdef __FreeBSD__"Johnny Sorocil2018-05-051-3/+3
|
* Add "yosys -e regex" for turning warnings into errorsClifford Wolf2018-05-041-1/+9
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Improve handling of warning messagesClifford Wolf2018-03-041-12/+38
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Do not create deep backtraces unless in ENABLE_DEBUG modeClifford Wolf2018-02-031-0/+4
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Add log_warning_noprefix() API, Use for Verific warnings and errorsClifford Wolf2017-07-271-0/+34
|
* Store command history when terminating with an errorClifford Wolf2017-06-201-0/+4
|
* Add "yosys -w" for suppressing warningsClifford Wolf2017-02-121-8/+21
|
* Add log_wire() APIClifford Wolf2017-02-111-0/+7
|
* Simplified log_spacer() codeClifford Wolf2016-12-231-6/+2
|
* Added "yosys -W regex"Clifford Wolf2016-12-221-1/+32
|
* Some minor build fixes for Visual CClifford Wolf2016-10-141-0/+2
|
* Use _Exit(0) on win32, always use _Exit(1) in log_error()Clifford Wolf2016-08-161-1/+1
|
* Added log_const() APIClifford Wolf2016-08-091-0/+18
|
* Added "read_verilog -dump_rtlil"Clifford Wolf2016-07-271-0/+7
|
* Added "yosys -D ALL"Clifford Wolf2016-04-241-0/+4
|
* Added "yosys -D" featureClifford Wolf2016-04-211-5/+15
|
* Fixed trailing whitespacesClifford Wolf2015-07-021-2/+2
|
* Fixed cstr_buf for std::string with small string optimizationClifford Wolf2015-06-111-1/+1
|
* Added log_dump() support for IdStringsClifford Wolf2015-06-081-0/+4
|
* Verific build fixesClifford Wolf2015-05-171-1/+1
|
* YosysJS stuffClifford Wolf2015-02-191-4/+15
|