diff options
Diffstat (limited to 'kernel/log.cc')
-rw-r--r-- | kernel/log.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/log.cc b/kernel/log.cc index 3108bddfe..949bf4327 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -213,3 +213,18 @@ const char *log_id(std::string str) string_buf.push_back(str); return string_buf.back().c_str(); } + +void log_cell(RTLIL::Cell *cell, std::string indent) +{ + char *ptr; + size_t size; + + FILE *f = open_memstream(&ptr, &size); + ILANG_BACKEND::dump_cell(f, indent, cell); + fputc(0, f); + fclose(f); + + log("%s", ptr); + free(ptr); +} + |