| 296 | } |
| 297 | |
| 298 | std::string SValue::decompiledValue() { |
| 299 | Value::Type valueType = getType(); |
| 300 | std::string result; |
| 301 | switch (valueType) { |
| 302 | case Value::Type::Scalar: |
| 303 | result = std::to_string(m_value.u_int); |
| 304 | break; |
| 305 | case Value::Type::Double: |
| 306 | result = std::to_string(m_value.d_int); |
| 307 | break; |
| 308 | case Value::Type::Binary: |
| 309 | result = (m_size ? std::to_string(m_size) : "") + std::string("'b") + |
| 310 | NumUtils::toBinary(m_size, m_value.d_int); |
| 311 | break; |
| 312 | case Value::Type::Hexadecimal: |
| 313 | result = (m_size ? std::to_string(m_size) : "") + std::string("'h") + |
| 314 | NumUtils::binToHex(NumUtils::toBinary(m_size, m_value.d_int)); |
| 315 | break; |
| 316 | case Value::Type::Integer: |
| 317 | result = std::to_string(m_value.s_int); |
| 318 | break; |
| 319 | default: |
| 320 | result = std::to_string(m_value.u_int); |
| 321 | break; |
| 322 | } |
| 323 | return result; |
| 324 | } |
| 325 | |
| 326 | int32_t SValue::vpiValType() { |
| 327 | Value::Type valueType = getType(); |
no outgoing calls
no test coverage detected