Skip to content

Verbose flag is not passed to tuple element dump #1608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
i582 opened this issue Apr 6, 2025 · 0 comments
Open

Verbose flag is not passed to tuple element dump #1608

i582 opened this issue Apr 6, 2025 · 0 comments

Comments

@i582
Copy link

i582 commented Apr 6, 2025

TVM logs are important information that allows implementing a time-travel debugger. For such a debugger to be as useful as possible, stack dump should be as detailed as possible.
Sadly when dumping tuples, verbose flag is lost, which leads to a loss of information.

If this is a bug and not intentional, I will create a PR :)

// crypto/vm/stack.cpp:154
case t_tuple: {
  const auto& tuple = *static_cast<Ref<Tuple>>(ref);
  auto n = tuple.size();
  if (!n) {
    os << "[]";
  } else if (n == 1) {
    os << "[ ";
    tuple[0].dump(os);
//                ^^ here
    os << " ]";
  } else {
    os << "[ ";
    for (const auto& entry : tuple) {
      entry.dump(os);
//               ^^ and here
      os << ' ';
    }
    os << ']';
  }
  break;

See
https://github.com/ton-blockchain/ton/blob/master/crypto/vm/stack.cpp#L154-L171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant