Skip to content

Instantly share code, notes, and snippets.

@agalazis
Last active August 7, 2016 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agalazis/6ec3efa203bb947e159ce4b6de0e216d to your computer and use it in GitHub Desktop.
Save agalazis/6ec3efa203bb947e159ce4b6de0e216d to your computer and use it in GitHub Desktop.
GDB debugging on latest version of node
 gdb attach $(pidof node)
 b v8::internal::Runtime_StackGuard
 print 'v8::Isolate::GetCurrent'()
 -----------------------------
 output: $1=<result>
 ---------------------
print 'v8::Isolate::TerminateExecution'(<result>)
c
print 'v8::StackTrace::CurrentStackTrace'(<result>)

example:

(gdb) b v8::internal::Runtime_StackGuard

(gdb) print 'v8::Isolate::GetCurrent'()

$1 = 48005328

(gdb) print 'v8::Isolate::TerminateExecution'(48005328)

$2 = 0

(gdb) c

Continuing.

Breakpoint 1, 0x0000000000be58b0 in

v8::internal::Runtime_StackGuard(int, v8::internal::Object**,

v8::internal::Isolate*) ()

(gdb) print 'v8::StackTrace::CurrentStackTrace'(48005328)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment