Miodrag Milanovic
97e2600e5c
Removed rewrite leftovers from log
2026-06-29 08:32:44 +02:00
Miodrag Milanovic
102f008194
Remove EMSCRIPTEN leftovers
2026-06-05 10:03:27 +02:00
Catherine
a727e7f6e7
Migrate build system to CMake
...
See #5895 for details.
This commit does not include CI or documentation changes.
2026-06-03 08:58:10 +00:00
Miodrag Milanovic
75dcbe03c6
Convert RTLIL::unescape_id of IdString to unescape()
2026-05-16 19:49:45 +02:00
Codexplorer
e41b969da2
Refactored uses of log_id()
2026-05-08 20:59:24 -07:00
Robert O'Callahan
bd7f2d9ba4
Make log_error() work in a Multithreaded context.
...
`log_error()` causes an exit so we don't have to try too hard here. The main
thing is to ensure that we normally are able to exit without causing a stack
overflow due to recursive asserts about not being in a `Multithreaded` context.
2026-03-06 02:03:21 +00:00
Emil J. Tywoniak
8e2038c419
Use digit separators for large decimal integers
2026-01-13 16:38:12 +01:00
Emil J
5594b817cd
Merge pull request #5524 from rocallahan/single-thread-log
...
Check that we don't use logging during multithreading
2025-12-10 13:54:09 +01:00
Robert O'Callahan
638e904f91
Remove cover() coverage tracking
2025-12-04 16:27:13 +01:00
Robert O'Callahan
7e75200b2a
Check that we don't use logging during multithreading
2025-11-29 22:47:23 +00:00
Robert O'Callahan
7f9de6e48f
Make coverage data thread-safe
2025-11-25 21:46:48 +00:00
Jannis Harder
2dce50516b
log: Print static message as fatal error for YOSYS_ABORT
2025-09-24 13:20:27 +02:00
Jannis Harder
86a46b9e5c
log: Flush stdout before printing a fatal error to stderr
...
This hasn't been an issue when using -l to redirect or when stdout is
line buffered, explaining how we didn't notice this earlier, but for
`yosys ... > log` that extra flush is required to ensure all messages
preceding the fatal error are flushed.
2025-09-24 13:20:27 +02:00
Robert O'Callahan
a7c46f7b4a
Remove .c_str() calls from parameters to log_warning()/log_warning_noprefix()
2025-09-16 23:02:16 +00:00
Robert O'Callahan
8492c49f6c
Remove string_buf by making log_signal() and log_const() return std::string
...
We only have to fix one caller in-tree so this probably has very low impact on out-of-tree plugins.
Resolves #5215
2025-09-16 03:06:17 +00:00
Jannis Harder
b87a33d64e
Merge pull request #5211 from rocallahan/remove-log_str
...
Remove `log_str()` functions and convert their `log_signal()` users t…
2025-09-12 14:10:47 +02:00
Robert O'Callahan
e0ae7b7af4
Remove .c_str() calls from log()/log_error()
...
There are some leftovers, but this is an easy regex-based approach that removes most of them.
2025-09-11 20:59:37 +00:00
Robert O'Callahan
c7017f7f79
Remove log_str() functions and convert their log_signal() users to return std::string
...
This is a small but easy step towards removing the `log_id_cache`.
See issue #5210 .
2025-09-11 04:00:49 +00:00
Robert O'Callahan
a137d03c32
Make log_cmd_error() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
243f5f5201
Make log_file_error() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
974455378b
Make log_error() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
c3924d0616
Move log_abort()'s call to log_error() into an out-of-line non-varargs function
2025-09-09 15:41:03 +02:00
Robert O'Callahan
1b5373de0d
Move log_assert_worker()'s call to log_error() into an out-of-line non-varags function
2025-09-09 15:41:03 +02:00
Robert O'Callahan
ea2bb5b79a
Make log_file_info() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
ec5f62e6d4
Make log_file_warning() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
2a2c586e2c
Make log_experimental() just take an std::string, since it doesn't need to be varargs.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
25cba6181e
Make log_warning()/log_warning_noprefix() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
66d2c2af08
Make log_header() use variadic templates.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
d34ac0c87d
Make log() use the FmtString infrastructure.
...
Now `log()` supports `std::string`.
We have to fix a few places where the format parameter was not a compile time constant.
This is mostly trivial.
2025-09-09 15:41:03 +02:00
Robert O'Callahan
3f69a768f4
Hide public logv_ variant declarations that don't need to be public
2025-09-09 15:41:03 +02:00
Robert O'Callahan
c7df6954b9
Remove .c_str() from stringf parameters
2025-09-01 23:34:42 +00:00
Emil J
d68d28d05e
Merge pull request #5183 from YosysHQ/emil/test-diagnostics
...
logger: add -expect types prefix-log, prefix-warning, prefix-error
2025-08-08 14:46:25 +02:00
Emil J. Tywoniak
f34c4f2e26
log: deduplicate unescape_id from log_id
2025-07-09 16:20:27 +02:00
Emil J. Tywoniak
41107e5473
log: add -expect types prefix-log, prefix-warning, prefix-error
2025-06-16 21:26:08 +02:00
Martin Povišer
3e3515e7d9
log: Never silence log_cmd_error
...
Add extra handling to arrange for `log_cmd_error` never being silenced
by the command line `-v N` option. Similar path for `log_error` exists
already.
2024-09-24 17:47:46 +02:00
Jannis Harder
c73c8a39cf
kernel/log: Add log_str helper for custom log_* functions/overloads
...
When implementing custom log_... functions or custom overloads for the
core log functions like log_signal it is necessary to return `char *`
that are valid long enough.
The log_... functions implemented in log.cc use either `log_id_cache` or
`string_buf` which both are cleared on log_pop.
This commit adds a public `log_str` function which stores its argument
in the `log_id_cache` and returns the stored copy, such that custom
log functions outside of log.cc can also create strings that remain
valid until the next `log_pop`.
2024-08-21 10:58:39 +01:00
Miodrag Milanovic
4eb18e1f07
change verific log callback api
2023-11-01 08:13:27 +01:00
N. Engelhardt
5e8db7000c
Merge pull request #3839 from povik/python-log-newline
2023-07-24 16:28:02 +02:00
Martin Povišer
77d4b5230e
ast: Move to a new helper method to print input errors
...
It's a repeating pattern to print an error message tied to an AST
node. Start using an 'input_error' helper for that. Among other
things this is beneficial in shortening the print lines, which tend
to be long.
2023-07-20 23:40:19 -04:00
Martin Povišer
5584ce95db
log: Detect newlines in Python log output
...
So that Python messages are annotated with timestamps too (if -t was
passed).
2023-07-10 13:19:20 +02:00
Miodrag Milanovic
75cf79588e
Add ability for user plugin to add new verific log callback
2023-06-12 10:01:01 +02:00
Miodrag Milanovic
200ffdccc5
Call yosys_shutdown to properly cleanup plugins and tcl when expecting error
2023-01-20 16:09:42 +01:00
Miodrag Milanovic
5801152779
Deprecate gcc-4.8
2023-01-11 09:54:19 +01:00
Jannis Harder
ed02d52f30
tee: Allow logging command output to a given scratchpad value
2022-12-02 14:36:19 +01:00
Jannis Harder
ac906d15ce
Add YOSYS_ABORT_ON_LOG_ERROR environment variable for debugging.
2022-10-07 15:02:33 +02:00
Marcelina Kościelnicka
a681904237
Assorted microoptimization speedups in core data structures.
2022-07-27 17:05:30 +02:00
Zachary Snow
66447e8faf
logger: fix unmatched expected warnings and errors
...
- Prevent unmatched expected error patterns from self-matching
- Prevent infinite recursion on unmatched expected warnings
- Always print the error message for unmatched error patterns
- Add test coverage for all unmatched message types
- Add test coverage for excess matched logs and warnings
2022-01-04 13:39:34 -07:00
Marcelina Kościelnicka
c58ac63c97
logger: Add -check-expected subcommand.
...
This allows us to have multiple "expect this warning" calls in a single
long script, covering only as many passes as necessary.
2021-08-12 17:41:39 +02:00
Claire Xenia Wolf
72787f52fc
Fixing old e-mail addresses and deadnames
...
s/((Claire|Xen|Xenia|Clifford)\s+)+(Wolf|Xen)\s+<(claire|clifford)@(symbioticeda.com|clifford.at|yosyshq.com)>/Claire Xenia Wolf <claire@yosyshq.com>/gi;
s/((Nina|Nak|N\.)\s+)+Engelhardt\s+<nak@(symbioticeda.com|yosyshq.com)>/N. Engelhardt <nak@yosyshq.com>/gi;
s/((David)\s+)+Shah\s+<(dave|david)@(symbioticeda.com|yosyshq.com|ds0.me)>/David Shah <dave@ds0.me>/gi;
s/((Miodrag)\s+)+Milanovic\s+<(miodrag|micko)@(symbioticeda.com|yosyshq.com)>/Miodrag Milanovic <micko@yosyshq.com>/gi;
s,https?://www.clifford.at/yosys/,http://yosyshq.net/yosys/,g ;
2021-06-08 00:39:36 +02:00
Zachary Snow
5e439b6e3f
Fix double-free on unmatched logger error pattern
...
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.
2021-02-23 20:49:21 -05:00