Skip to content
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

Deserializer fails to deserialize Int64 #66

Closed
Coder666 opened this issue Aug 12, 2021 · 0 comments · Fixed by #67
Closed

Deserializer fails to deserialize Int64 #66

Coder666 opened this issue Aug 12, 2021 · 0 comments · Fixed by #67

Comments

@Coder666
Copy link

Coder666 commented Aug 12, 2021

I was having an issue with parsing a variables request, whereby I had encoded a thread id and a stack frame id into a 64 bit integer. This id was being serialized and sent OK to the debugger by cppdap, however receipt of a variables request in the dap session was failing to parse. I have tracked it down to the rapid json deserializer, below is my fix:

bool RapidDeserializer::deserialize(dap::integer* v) const {
    
  if (json()->IsInt())
  {
    *v = json()->GetInt();
    return true;
  } 
  else if (json()->IsInt64())
  {
    *v = json()->GetInt64();
    return true;
  }

  return false;
}

NOTE: May also want to include Uint64 here?

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

Successfully merging a pull request may close this issue.

1 participant