GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: backport ec1ffe3 from upstream V8 · nodejs/node@62e047e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • deps/v8
    • include
      • v8-version.h
    • tools
      • lldb_commands.py
      • lldbinit
  • tools
    • install.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/v8/include/v8-version.h‎

Copy file name to clipboardExpand all lines: deps/v8/include/v8-version.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 5
1212
#define V8_MINOR_VERSION 1
1313
#define V8_BUILD_NUMBER 281
14-
#define V8_PATCH_LEVEL 99
14+
#define V8_PATCH_LEVEL 100
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)
Collapse file

‎deps/v8/tools/lldb_commands.py‎

Copy file name to clipboard
+72Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Copyright 2017 the V8 project authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
import lldb
6+
import re
7+
8+
def jst(debugger, *args):
9+
"""Print the current JavaScript stack trace"""
10+
target = debugger.GetSelectedTarget()
11+
process = target.GetProcess()
12+
thread = process.GetSelectedThread()
13+
frame = thread.GetSelectedFrame()
14+
frame.EvaluateExpression("_v8_internal_Print_StackTrace();")
15+
print("")
16+
17+
def jss(debugger, *args):
18+
"""Skip the jitted stack on x64 to where we entered JS last"""
19+
target = debugger.GetSelectedTarget()
20+
process = target.GetProcess()
21+
thread = process.GetSelectedThread()
22+
frame = thread.GetSelectedFrame()
23+
js_entry_sp = frame.EvaluateExpression(
24+
"v8::internal::Isolate::Current()->thread_local_top()->js_entry_sp_;") \
25+
.GetValue()
26+
sizeof_void = frame.EvaluateExpression("sizeof(void*)").GetValue()
27+
rbp = frame.FindRegister("rbp")
28+
rsp = frame.FindRegister("rsp")
29+
pc = frame.FindRegister("pc")
30+
rbp = js_entry_sp
31+
rsp = js_entry_sp + 2 *sizeof_void
32+
pc.value = js_entry_sp + sizeof_void
33+
34+
def bta(debugger, *args):
35+
"""Print stack trace with assertion scopes"""
36+
func_name_re = re.compile("([^(<]+)(?:\(.+\))?")
37+
assert_re = re.compile(
38+
"^v8::internal::Per\w+AssertType::(\w+)_ASSERT, (false|true)>")
39+
target = debugger.GetSelectedTarget()
40+
process = target.GetProcess()
41+
thread = process.GetSelectedThread()
42+
frame = thread.GetSelectedFrame()
43+
for frame in thread:
44+
functionSignature = frame.GetDisplayFunctionName()
45+
if functionSignature is None:
46+
continue
47+
functionName = func_name_re.match(functionSignature)
48+
line = frame.GetLineEntry().GetLine()
49+
sourceFile = frame.GetLineEntry().GetFileSpec().GetFilename()
50+
if line:
51+
sourceFile = sourceFile + ":" + str(line)
52+
53+
if sourceFile is None:
54+
sourceFile = ""
55+
print("[%-2s] %-60s %-40s" % (frame.GetFrameID(),
56+
functionName.group(1),
57+
sourceFile))
58+
match = assert_re.match(str(functionSignature))
59+
if match:
60+
if match.group(3) == "false":
61+
prefix = "Disallow"
62+
color = "\033[91m"
63+
else:
64+
prefix = "Allow"
65+
color = "\033[92m"
66+
print("%s -> %s %s (%s)\033[0m" % (
67+
color, prefix, match.group(2), match.group(1)))
68+
69+
def __lldb_init_module (debugger, dict):
70+
debugger.HandleCommand('command script add -f lldb_commands.jst jst')
71+
debugger.HandleCommand('command script add -f lldb_commands.jss jss')
72+
debugger.HandleCommand('command script add -f lldb_commands.bta bta')
Collapse file

‎deps/v8/tools/lldbinit‎

Copy file name to clipboard
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2017 the V8 project authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
# Print HeapObjects.
6+
command regex -h 'Print a v8 JavaScript object' job 's/(.+)/expr -- '_v8_internal_Print_Object((void*)(%1))/'
7+
8+
# Print v8::Local handle value.
9+
command regex -h 'Print content of a v8::Local handle' jlh 's/(.+)/expr -- '_v8_internal_Print_Object(*(v8::internal::Object**)(*%1))/'
10+
11+
# Print Code objects containing given PC.
12+
command regex -h 'Print a v8 Code object from an internal code address' jco 's/(.+)/expr -- '_v8_internal_Print_Code((void*)(*%1))/'
13+
14+
# Print FeedbackVector
15+
command regex -h 'Print a v8 FeedbackVector object' jfv 's/(.+)/expr -- '_v8_internal_Print_FeedbackVector((void*)(%1))/'
16+
17+
# Print DescriptorArray.
18+
command regex -h 'Print a v8 DescriptorArray object' jda 's/(.+)/expr -- '_v8_internal_Print_DescriptorArray((void*)(%1))/'
19+
20+
# Print LayoutDescriptor.
21+
command regex -h 'Print a v8 LayoutDescriptor object' jld 's/(.+)/expr -- '_v8_internal_Print_LayoutDescriptor((void*)(%1))/'
22+
23+
# Print TransitionArray.
24+
command regex -h 'Print a v8 TransitionArray object' jta 's/(.+)/expr -- '_v8_internal_Print_TransitionArray((void*)(%1))/'
25+
26+
command script import ~/lldb_commands.py
Collapse file

‎tools/install.py‎

Copy file name to clipboardExpand all lines: tools/install.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ def files(action):
133133
action(['src/node.stp'], 'share/systemtap/tapset/')
134134

135135
action(['deps/v8/tools/gdbinit'], 'share/doc/node/')
136+
action(['deps/v8/tools/lldbinit'], 'share/doc/node/')
137+
action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/')
136138

137139
if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
138140
action(['doc/node.1'], 'man/man1/')

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.