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

I do not know how to debug args array in a FunctionCallbackInfo with gdb #3566

Closed
juanarbol opened this issue Oct 5, 2021 · 3 comments
Closed
Labels

Comments

@juanarbol
Copy link
Member

  • Node.js Version: Current
  • OS: Linux
  • Scope (install, code, runtime, meta, other?): Debug internals
  • Module (and version) (if relevant):

For some reason, gdb is grabbing the wrong object in debug

Thread 1 "node_g" hit Breakpoint 1, node::StreamBase::WriteString<(node::encoding)1> (this=0x5c9da78, args=...) at ../src/stream_base.cc:218
218       Environment* env = Environment::GetCurrent(args);
(gdb) framwe
Undefined command: "framwe".  Try "help".
(gdb) frame
#0  node::StreamBase::WriteString<(node::encoding)1> (this=0x5c9da78, args=...) at ../src/stream_base.cc:218
218       Environment* env = Environment::GetCurrent(args);
(gdb) n
219       CHECK(args[0]->IsObject());
(gdb) ptype args
type = const struct node::AssertionInfo {
    const char *file_line;
    const char *message;
    const char *function;
}
(gdb) p args->function
$14 = 0x32607c8 "int node::StreamBase::WriteString(const FunctionCallbackInfo<v8::Value> &) [enc = node::UTF8]"
(gdb) p args[0]->IsObject()
No symbol "operator[]" in current context.
(gdb) 
@juanarbol
Copy link
Member Author

May refs: nodejs/node#40336

Copy link

github-actions bot commented May 8, 2024

It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.

@github-actions github-actions bot added the stale label May 8, 2024
Copy link

github-actions bot commented Jun 7, 2024

It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant