OLD | NEW |
1 # Copyright 2014 the V8 project authors. All rights reserved. | 1 # Copyright 2014 the V8 project authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Print HeapObjects. | 5 # Print HeapObjects. |
6 define job | 6 define job |
7 call _v8_internal_Print_Object((void*)($arg0)) | 7 call _v8_internal_Print_Object((void*)($arg0)) |
8 end | 8 end |
9 document job | 9 document job |
10 Print a v8 JavaScript object | 10 Print a v8 JavaScript object |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 set $js_entry_sp=v8::internal::Isolate::Current()->thread_local_top()->js_entry_
sp_ | 61 set $js_entry_sp=v8::internal::Isolate::Current()->thread_local_top()->js_entry_
sp_ |
62 set $rbp=*(void**)$js_entry_sp | 62 set $rbp=*(void**)$js_entry_sp |
63 set $rsp=$js_entry_sp + 2*sizeof(void*) | 63 set $rsp=$js_entry_sp + 2*sizeof(void*) |
64 set $pc=*(void**)($js_entry_sp+sizeof(void*)) | 64 set $pc=*(void**)($js_entry_sp+sizeof(void*)) |
65 end | 65 end |
66 document jss | 66 document jss |
67 Skip the jitted stack on x64 to where we entered JS last. | 67 Skip the jitted stack on x64 to where we entered JS last. |
68 Usage: jss | 68 Usage: jss |
69 end | 69 end |
70 | 70 |
| 71 # Print stack trace with assertion scopes. |
| 72 define bta |
| 73 python |
| 74 import re |
| 75 frame_re = re.compile("^#(\d+).* in (\S+) .+ at (.+)") |
| 76 assert_re = re.compile("^\s*(\S+) = .+<v8::internal::Per\w+AssertType::(\w+)_ASS
ERT, (false|true)>") |
| 77 btl = gdb.execute("backtrace full", to_string = True).splitlines() |
| 78 for l in btl: |
| 79 match = frame_re.match(l) |
| 80 if match: |
| 81 print("[%-2s] %-60s %-40s" % (match.group(1), match.group(2), match.group(3)
)) |
| 82 match = assert_re.match(l) |
| 83 if match: |
| 84 if match.group(3) == "false": |
| 85 prefix = "Disallow" |
| 86 color = "\033[91m" |
| 87 else: |
| 88 prefix = "Allow" |
| 89 color = "\033[92m" |
| 90 print("%s -> %s %s (%s)\033[0m" % (color, prefix, match.group(2), match.grou
p(1))) |
| 91 end |
| 92 document bta |
| 93 Print stack trace with assertion scopes |
| 94 Usage: bta |
| 95 end |
| 96 |
71 set disassembly-flavor intel | 97 set disassembly-flavor intel |
72 set disable-randomization off | 98 set disable-randomization off |
OLD | NEW |