Internals: Add source file/line info to BROKEN_RTN messages

This commit is contained in:
Geza Lore 2021-07-11 14:40:41 +01:00
parent c7499133b2
commit 8a9d6d225b
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ using MTaskIdSet = std::set<int>; // Set of mtaskIds for Var sorting
// For broken() function, return error string if have a match
#define BROKEN_RTN(test) \
do { \
if (VL_UNCOVERABLE(test)) return #test; \
if (VL_UNCOVERABLE(test)) return "'" #test "' @ " __FILE__ ":" VL_STRINGIFY(__LINE__); \
} while (false)
// For broken() function, return error string if a base of this class has a match
#define BROKEN_BASE_RTN(test) \

View File

@ -2,7 +2,7 @@
16 | foo(bus_we_select_from[2]);
| ^
... For error description see https://verilator.org/warn/TASKNSVAR?v=latest
%Error: Internal Error: t/t_func_tasknsvar_bad.v:10:7: ../V3Broken.cpp:#: Broken link in node (or something without maybePointedTo): m_varScopep && !m_varScopep->brokeExists()
%Error: Internal Error: t/t_func_tasknsvar_bad.v:10:7: ../V3Broken.cpp:#: Broken link in node (or something without maybePointedTo): 'm_varScopep && !m_varScopep->brokeExists()' @ ../V3AstNodes.cpp:51
10 | sig = '1;
| ^~~
... See the manual at https://verilator.org/verilator_doc.html for more assistance.