2014-07-07 16:21:29 +00:00
|
|
|
# Copyright 2014 the V8 project authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
# Print HeapObjects.
|
|
|
|
define job
|
2016-07-28 17:09:10 +00:00
|
|
|
call _v8_internal_Print_Object((void*)($arg0))
|
2014-07-07 16:21:29 +00:00
|
|
|
end
|
|
|
|
document job
|
|
|
|
Print a v8 JavaScript object
|
|
|
|
Usage: job tagged_ptr
|
|
|
|
end
|
|
|
|
|
|
|
|
# Print Code objects containing given PC.
|
|
|
|
define jco
|
2016-07-28 17:09:10 +00:00
|
|
|
call _v8_internal_Print_Code((void*)($arg0))
|
2014-07-07 16:21:29 +00:00
|
|
|
end
|
|
|
|
document jco
|
|
|
|
Print a v8 Code object from an internal code address
|
|
|
|
Usage: jco pc
|
|
|
|
end
|
|
|
|
|
2015-07-15 12:21:57 +00:00
|
|
|
# Print TypeFeedbackVector
|
|
|
|
define jfv
|
2016-07-28 17:09:10 +00:00
|
|
|
call _v8_internal_Print_TypeFeedbackVector((void*)($arg0))
|
2015-07-15 12:21:57 +00:00
|
|
|
end
|
|
|
|
document jfv
|
|
|
|
Print a v8 TypeFeedbackVector object
|
|
|
|
Usage: jtv tagged_ptr
|
|
|
|
end
|
|
|
|
|
2014-10-23 11:31:33 +00:00
|
|
|
# Print DescriptorArray.
|
|
|
|
define jda
|
2016-07-28 17:09:10 +00:00
|
|
|
call _v8_internal_Print_DescriptorArray((void*)($arg0))
|
2014-10-23 11:31:33 +00:00
|
|
|
end
|
|
|
|
document jda
|
|
|
|
Print a v8 DescriptorArray object
|
|
|
|
Usage: jda tagged_ptr
|
|
|
|
end
|
|
|
|
|
|
|
|
# Print TransitionArray.
|
|
|
|
define jta
|
2016-07-28 17:09:10 +00:00
|
|
|
call _v8_internal_Print_TransitionArray((void*)($arg0))
|
2014-10-23 11:31:33 +00:00
|
|
|
end
|
|
|
|
document jta
|
|
|
|
Print a v8 TransitionArray object
|
|
|
|
Usage: jta tagged_ptr
|
|
|
|
end
|
|
|
|
|
2014-07-07 16:21:29 +00:00
|
|
|
# Print JavaScript stack trace.
|
2014-07-09 10:55:55 +00:00
|
|
|
define jst
|
2016-07-28 17:09:10 +00:00
|
|
|
call _v8_internal_Print_StackTrace()
|
2014-07-07 16:21:29 +00:00
|
|
|
end
|
|
|
|
document jst
|
|
|
|
Print the current JavaScript stack trace
|
|
|
|
Usage: jst
|
|
|
|
end
|
|
|
|
|
Add a jss gdb macro that skips over the jitted stack in gdb
Use it like this:
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x7f50d02c4700 (LWP 8152)]
base::debug::(anonymous namespace)::DebugBreak ()
at ../../base/debug/debugger_posix.cc:230
230 }
(gdb) bt
at ../../base/debug/debugger_posix.cc:230
...
args_object=0x7f50d02bfe00, isolate=0x2f001c9e2020)
at ../../v8/src/builtins/builtins-api.cc:123
...
(gdb) jss
(gdb) bt
isolate=0x2f001c9e2020, is_construct=false, target=..., receiver=...,
argc=1, args=0x7f50d02c0518, new_target=...)
at ../../v8/src/execution.cc:111
isolate=0x2f001c9e2020, callable=..., receiver=..., argc=1,
argv=0x7f50d02c0518) at ../../v8/src/execution.cc:168
...
R=yangguo@chromium.org
BUG=
Review-Url: https://codereview.chromium.org/2186013002
Cr-Commit-Position: refs/heads/master@{#38121}
2016-07-28 09:04:39 +00:00
|
|
|
# Skip the JavaScript stack.
|
|
|
|
define jss
|
|
|
|
set $js_entry_sp=v8::internal::Isolate::Current()->thread_local_top()->js_entry_sp_
|
|
|
|
set $rbp=*(void**)$js_entry_sp
|
|
|
|
set $rsp=$js_entry_sp + 2*sizeof(void*)
|
|
|
|
set $pc=*(void**)($js_entry_sp+sizeof(void*))
|
|
|
|
end
|
|
|
|
document jss
|
|
|
|
Skip the jitted stack on x64 to where we entered JS last.
|
|
|
|
Usage: jss
|
|
|
|
end
|
|
|
|
|
2014-07-07 16:21:29 +00:00
|
|
|
set disassembly-flavor intel
|
2014-07-09 10:55:55 +00:00
|
|
|
set disable-randomization off
|