Jump to content

SC_ENABLE_SIMULATION_PHASE_CALLBACKS_TRACING doesn't propagate to users of SystemC CMake package


Marcus

Recommended Posts

SystemC version 2.3.3.

I have a class that inherits from sc_trace_file_base. This class is in a public SystemC header. The definition of this class (whether it inherits from sc_object or not) is defined (indirectly) by the SC_ENABLE_SIMULATION_PHASE_CALLBACKS_TRACING flag. But the SystemCLanguageConfig.cmake.in file doesn't propagate this flag. So any other cmake library (my code) using SystemC will always be built as if this flag is not set. This has the side effect that the destructor of sc_object crashes because it somehow gets an invalid this-pointer. Adding SC_ENABLE_SIMULATION_PHASE_CALLBACKS_TRACING to every cmake executable/library using SystemC fixes the issue.

Is this a bug?

Why isn't SC_ENABLE_SIMULATION_PHASE_CALLBACKS_TRACING propagated? Is it because trace file is not part of the language? Should all users of sc_trace_file_base manually add the flag?

Why is SC_ENABLE_SIMULATION_PHASE_CALLBACKS_TRACING enabled by default while at the same time marked as experimental? Shouldn't defaults be stable?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...