VPI: Improve logging
@@ -169,6 +169,8 @@ GpiObjHdl* VpiImpl::create_gpi_obj_from_handle(vpiHandle new_hdl,
break;
case vpiStructVar:
case vpiStructNet:
+ new_obj = new VpiObjHdl(this, new_hdl, to_gpi_objtype(type));
+ break;
case vpiModule:
case vpiInterface:
case vpiModport:
@@ -184,7 +186,7 @@ GpiObjHdl* VpiImpl::create_gpi_obj_from_handle(vpiHandle new_hdl,
std::string hdl_name = vpi_get_str(vpiName, new_hdl);
if (hdl_name != name) {
- LOG_DEBUG("Found pseudo-region %s", fq_name.c_str());
+ LOG_DEBUG("Found pseudo-region %s (hdl_name=%s but name=%s)", fq_name.c_str(), hdl_name.c_str(), name.c_str());
new_obj = new VpiObjHdl(this, new_hdl, GPI_GENARRAY);
} else {
new_obj = new VpiObjHdl(this, new_hdl, to_gpi_objtype(type));
@@ -643,7 +645,7 @@ static int system_function_overload(char *userdata)
msg = argval.value.str;
}
- gpi_log("simulator", *userdata, vpi_get_str(vpiFile, systfref), "", (long)vpi_get(vpiLineNo, systfref), msg );
+ gpi_log("simulator", *userdata, vpi_get_str(vpiFile, systfref), "", (long)vpi_get(vpiLineNo, systfref), "%s", msg );
// Fail the test for critical errors
if (GPICritical == *userdata)
