MCPcopy Index your code
hub / github.com/nodejs/node / module_name

Function module_name

deps/v8/tools/windbg.js:227–271  ·  view source on GitHub ↗
(use_this_module)

Source from the content-addressed store, hash-verified

225const known_exes = ["d8", "v8_unittests", "mksnapshot", "chrome", "chromium"];
226let module_name_cache;
227function module_name(use_this_module) {
228 if (use_this_module) {
229 module_name_cache = use_this_module;
230 }
231
232 if (!module_name_cache) {
233 let v8 = host.namespace.Debugger.State.DebuggerVariables.curprocess
234 .Modules.Where(
235 function(m) {
236 return m.Name.indexOf("\\v8.dll") !== -1;
237 });
238
239 let v8_test = host.namespace.Debugger.State.DebuggerVariables.curprocess
240 .Modules.Where(
241 function(m) {
242 return m.Name.indexOf("\\v8_for_testing.dll") !== -1;
243 });
244
245 if (v8.Count() > 0) {
246 module_name_cache = "v8";
247 }
248 else if (v8_test.Count() > 0) {
249 module_name_cache = "v8_for_testing";
250 }
251 else {
252 for (let exe_name in known_exes) {
253 let exe = host.namespace.Debugger.State.DebuggerVariables.curprocess
254 .Modules.Where(
255 function(m) {
256 return m.Name.indexOf(`\\${exe_name}.exe`) !== -1;
257 });
258 if (exe.Count() > 0) {
259 module_name_cache = exe_name;
260 break;
261 }
262 }
263 }
264 }
265
266 if (!module_name_cache) {
267 print(`ERROR. Couldn't determine module name for v8's symbols.`);
268 print(`Please run !set_module (e.g. "!set_module \"v8_for_testing\"")`);
269 }
270 return module_name_cache;
271};
272
273let using_ptr_compr = false;
274let isolate_address = 0;

Callers 3

castFunction · 0.85
set_user_js_bpFunction · 0.85
print_memory_chunk_listFunction · 0.85

Calls 3

CountMethod · 0.80
printFunction · 0.70
indexOfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…