-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsynergydbg.js
693 lines (611 loc) · 22.3 KB
/
synergydbg.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
"use strict";
function isX86()
{
return host.currentSession.Attributes.Machine.PointerSize == 4;
}
function hostModule()
{
const moduleName = /^(.*[\\\/])*(dbr|DBR|dbs|DBS)(\.exe)$/;
// execute the match on the string str
for (let i = 0; i < host.currentProcess.Modules.Count(); i++)
{
let match = moduleName.exec(host.currentProcess.Modules[i].Name);
if (match != null)
{
// we ignore the match[0] because it's the match for the hole path string
return match[2];
}
}
return null;
}
function findSymbol(name, allowUndefined)
{
var moduleName = hostModule();
var moduleSymbol = host.getModuleSymbol(moduleName, name);
if(!allowUndefined && (moduleSymbol == null || moduleSymbol == undefined))
{
host.diagnostics.debugLog("failed to locate symbol: " + name + " ensure symbols are correctly loaded for " + moduleName);
return moduleSymbol;
}
else
{
return moduleSymbol;
}
}
function GetFileNameFromHandle(handle)
{
return host.evaluateExpression("!handle " + host.memory.readMemoryValues(handle, 1));
}
function synergyCallFrames()
{
var currentFrame = findSymbol("g_fptr");
var result = [];
while(currentFrame != null && !currentFrame.isNull)
{
var currentFrameValue = currentFrame.dereference();
result.push(currentFrameValue);
currentFrame = currentFrameValue.prev
}
return result;
}
function readString(obj, length)
{
if(length != undefined)
return host.memory.readString(obj, length);
else
return host.memory.readString(obj);
}
function getArguments(frame)
{
try
{
var is32Bit = isX86();
var DSC_A = is32Bit ? 0x0010 : 0x0100; /* Alpha */
var DSC_I = is32Bit ? 0x0020 : 0x0200; /* Integer */
var DSC_D = is32Bit ? 0x0040 : 0x0400; /* Decimal */
var DSC_ID = is32Bit ? 0x0080 : 0x0800; /* Implied Decimal */
var DSC_DIM = is32Bit ? 0x0400 : 0x10000; /* Dimensioned */
var DSC_OHND = is32Bit ? 0x4000 : 0x100000; /* Object handle */
if(frame.xargp.isNull)
return [];
var argBlockSize = host.memory.readMemoryValues(frame.xargp, 1, 4, false);
var resultArgs = [];
for(var i = 1; i <= argBlockSize; i++)
{
try
{
var descr = frame.xargp[i];
var descrVal = descr.dereference();
var argValue = "";
if(descrVal.ctl & DSC_DIM == DSC_DIM)
{
argValue = "{array}";
}
else
{
if(descrVal.ctl & DSC_A)
{
argValue = '"' + readString(descrVal.addr, descrVal.len) + '"';
}
else if(descrVal.ctl & DSC_I)
{
argValue = host.memory.readMemoryValues(descrVal.addr, 1, descrVal.len, true);
}
else if(descrVal.ctl & DSC_D)
{
argValue = readString(descrVal.addr, descrVal.len);
}
else if(descrVal.ctl & DSC_ID)
{
argValue = readString(descrVal.addr, descrVal.len);
}
else if(descrVal.ctl & DSC_OHND)
{
argValue = "{object}";
}
else
{
argValue = "{ctl: " + descrVal.ctl.toString() + "}";
}
}
resultArgs.push(argValue);
}
catch(err)
{
resultArgs.push("failure");
}
}
return resultArgs;
}
catch(err)
{
return ["failure"];
}
}
function showPrettyTraceback()
{
var callFrames = synergyCallFrames();
var result = [];
var first = true;
for(var i = 0; i < callFrames.length;i++)
{
var frame = callFrames[i];
try
{
var mptr = frame.mptr;
if(mptr != null)
{
var dblpc = first ? findSymbol("g_dblpc") : callFrames[i - 1].exitpc;
var sourceInfo = pcToSource(mptr, dblpc);
var allScopeItems = [];
for(var ii = 0; ii <= frame.scplvl; ii++ )
{
var items = iterateLLST(frame.lclscope[ii].hdr, "HND_RNT *");
allScopeItems = allScopeItems.concat(items);
}
var owner = mptr.dereference().owner;
var name = readString(owner.dereference().se_name);
var argCount = 0;
if(!frame.xargp.isNull)
argCount = host.memory.readMemoryValues(frame.xargp, 1, 4, false);
result.push(`${name}(${argCount} args) -> ${sourceInfo.SourceFile} : ${sourceInfo.LineNumber}`);
}
}
catch(err)
{
result.push(err)
}
first = false;
}
return result;
}
function showTraceback()
{
var callFrames = synergyCallFrames();
var result = [];
var first = true;
for(var i = 0; i < callFrames.length;i++)
{
var frame = callFrames[i];
try
{
var mptr = frame.mptr;
if(mptr != null)
{
var dblpc = first ? findSymbol("g_dblpc") : callFrames[i - 1].exitpc;
var sourceInfo = pcToSource(mptr, dblpc);
var allScopeItems = [];
for(var ii = 0; ii <= frame.scplvl; ii++ )
{
var items = iterateLLST(frame.lclscope[ii].hdr, "HND_RNT *");
allScopeItems = allScopeItems.concat(items);
}
var owner = mptr.dereference().owner;
var name = readString(owner.dereference().se_name);
result.push(`${name}(${getArguments(frame).join(",")}) -> ${sourceInfo.SourceFile} : ${sourceInfo.LineNumber} ### Object Scope Count: ${frame.scplvl} Object Count: ${allScopeItems.length.toString()}`);
}
}
catch(err)
{
result.push(err)
}
first = false;
}
return result;
}
function showChannels()
{
var gchan = findSymbol("g_channels");
let maxChan = 1024 + 7;
var result = []
for(var i = 0; i < maxChan; i++)
{
var chan = gchan[i];
if(!chan.isNull)
{
result.push(`Channel Number = ${i} File Name = "${readString(chan.io_filnam)}" Flags = ${new IOCB_FileTypeFlags(chan.io_flags).stringify()} Mode = ${new IOCB_FileModeTypes(chan.io_mode).stringify()}`);
}
}
return result;
}
function getHandles(dynctl, isGlobal)
{
var result = [];
if(dynctl.isNull || dynctl.size == 0)
return result;
var lastIndex = dynctl.last;
for(var i = 1; i <= lastIndex; i++)
{
var dynhand = dynctl.base[i];
var handleType = new HandleTypes(dynhand.type)
var typeString = handleType.stringify();
if(handleType.isMemory)
{
var maxDisplaySize = Math.min(dynhand.size, 120);
result.push(
{
Scope: isGlobal ? "Global" : "Local",
Type: typeString,
Size: dynhand.size,
Address: dynhand.addr.address,
Value: readString(dynhand.addr, maxDisplaySize)
});
}
else
{
result.push(
{
Scope: isGlobal ? "Global" : "Local",
Type: typeString,
Size: dynhand.size,
Address: dynhand.addr.address
});
}
}
return result;
}
function stringifyHandles(handles)
{
var result = [];
for(var handle of handles)
{
if(handle.Value == undefined)
{
result.push(`Scope = ${handle.Scope} Type = ${handle.Type} Size = ${handle.Size} Address = ${handle.Address}`);
}
else
{
result.push(`Scope = ${handle.Scope} Type = ${handle.Type} Size = ${handle.Size} Address = ${handle.Address} Value = ${handle.Value}`);
}
}
return result;
}
function showHandles()
{
var globalDynmem = findSymbol("g_dm_gctl");
var localDynmem = findSymbol("g_dm_lctl");
return stringifyHandles(getHandles(globalDynmem, true).concat(getHandles(localDynmem, false)));
}
function sourceNumberToName(mptr, sourceNumber)
{
var currentHostName = hostModule();
var srcTable = mptr.linctl.address.add(mptr.srcfiles);
var nextSource = host.createPointerObject(srcTable, currentHostName, "V9SRC *");
while(!nextSource.isNull && nextSource.dereference().srcnum != sourceNumber)
{
var nextSourceVal = nextSource.dereference();
var nextAddress = mptr.linctl.address.add(nextSourceVal.next);
nextSource = host.createPointerObject(nextAddress, currentHostName, "V9SRC *");
}
if(nextSource.isNull || nextSource.dereference().srcnum != sourceNumber)
{
host.diagnostics.debugLog("failed to locate source number " + sourceNumber.toString());
}
else
{
return host.memory.readString(nextSource.dereference().name);
}
}
function pcToSource(mptr, dblpc)
{
var currentHostName = hostModule();
var pcOffset = dblpc.address.getLowPart() - mptr.code.address.getLowPart();
var psegTable = mptr.linctl.address.add(mptr.psegtbl);
var psegTableTyped = host.createPointerObject(psegTable, currentHostName, "V9PSEG *");
var targetPSeg = psegTableTyped[0];
var nextPSeg = psegTableTyped[1];
var currentLineNumber = 0;
var segIndex = 0;
if ((pcOffset > 0XFFFF) || (pcOffset < 0))
{
}
else
{
while (nextPSeg.dblpc < pcOffset) /* Find the V9PSEG entry */
{
targetPSeg = nextPSeg;
nextPSeg = psegTableTyped[++segIndex]
}
}
var pcp = host.createPointerObject(mptr.linctl.address.add(targetPSeg.ctlndx), currentHostName, "DBLPC *");
var pcpIndex = 0;
var ix = (nextPSeg.ctlndx - targetPSeg.ctlndx);
var lincnt = 0;
while ((--ix >= 0) && (pcp[pcpIndex] < pcOffset))
{
pcpIndex++;
lincnt++;
}
return { SourceFile: sourceNumberToName(mptr, targetPSeg.srcnum), LineNumber: lincnt + targetPSeg.srclin};
}
function iterateLLST(head, targetType)
{
var result = [];
try
{
if(head == undefined || head.isNull)
{
var currentModuleName = hostModule();
var current = host.createTypedObject(head.address, currentModuleName, "LLST");
if(head.prev.address != head.next.address)
{
do
{
result.push(host.createTypedObject(current.address, currentModuleName, targetType));
if(current.next == undefined || current.next.isNull)
break;
current = host.createTypedObject(current.next.dereference().address, currentModuleName, "LLST");
}while(current.address != head.address);
}
}
}
catch(e)
{
host.diagnostics.debugLog(e);
}
return result;
}
function showMemory()
{
var maxMemoryUsed = findSymbol("g_maxmemused");
var inUseMemory = findSymbol("g_inuse");
var items = iterateLLST(findSymbol("s_prgscope"), "HND_RNT *");
var liveObjects = [];
for(var item of items)
{
if(item.dereference().cctl.dereference().clsnam != undefined)
liveObjects.push(readString(item.dereference().cctl.dereference().clsnam));
}
var dbrMemItems = iterateLLST(findSymbol("g_dbrmem"), "MEM_LLST *");
var exeMemItems = iterateLLST(findSymbol("g_exemem"), "MEM_LLST *");
var stmtMemItems = iterateLLST(findSymbol("g_stmtmem"), "MEM_LLST *");
var freeTempItems = iterateLLST(findSymbol("g_tmpfree"), "MEM_LLST *");
var allocatedTempItems = iterateLLST(findSymbol("g_tmpblks"), "SMLTMP *");
var allocatedErrtrcItems = iterateLLST(findSymbol("g_errtrclst"), "eltrace *");
var allocatedLogItems = iterateLLST(findSymbol("g_logmem"), "MEM_LLST *");
var netFxLoaded = findSymbol("pRuntimeHost", true);
var netLoaded = findSymbol("pCoreHost", true);
var gMaxMem = findSymbol("g_maxmem");
var relSegs = findSymbol("g_relsegs");
var wrkMem0 = findSymbol("g_wrk0");
var wrkMem1 = findSymbol("g_wrk1");
var errMem = findSymbol("s_ewrk");
var loadedDllCount = findSymbol("g_nmdlls");
var sdCtrl = findSymbol("g_r_sdctrl");
var sdWrkMem0 = sdCtrl.dereference().c_wrk0.memsiz;
var sdWrkMem1 = sdCtrl.dereference().c_wrk1.memsiz;
var sdWrkMem2 = sdCtrl.dereference().c_wrk2.memsiz;
var globalDynmem = findSymbol("g_dm_gctl");
var globalHandles = getHandles(globalDynmem, true);
var globalHandleAllocatedBytes = 0;
for(var handle of globalHandles)
{
globalHandleAllocatedBytes += handle.Size;
}
return {
LiveObjects: liveObjects,
MaxMemoryUsedBytes: maxMemoryUsed.toString(),
InUseMemoryBytes: inUseMemory.toString(),
MaxMemSetting: gMaxMem.toString(),
RelSegs: relSegs.toString(),
DBRMemAllocationCount: dbrMemItems.length.toString(),
EXEMemAllocationCount: exeMemItems.length.toString(),
StatementMemAllocationCount: stmtMemItems.length.toString(),
TempFreeListCount: freeTempItems.length.toString(),
SmallTempListCount: allocatedTempItems.length.toString(),
WrkMemSize: (wrkMem0.memsiz + wrkMem1.memsiz + sdWrkMem0 + sdWrkMem1 + sdWrkMem2 ).toString(),
LogicalListSize: allocatedLogItems.length.toString(),
ErrorControlListSize: allocatedErrtrcItems.length.toString(),
ErrorMememoryBytes: errMem.memsiz.toString(),
LoadedWin32Dlls: loadedDllCount.toString(),
NetFxLoaded: (netFxLoaded != undefined && !netFxLoaded.isNull),
DotNetLoaded: (netLoaded != undefined && !netLoaded.isNull),
GlobalHandleAllocatedBytes: globalHandleAllocatedBytes.toString(),
GlobalHandleCount: globalHandles.length.toString() };
}
class IOCB_FileTypeFlags
{
constructor(flagValue)
{
this.flagValue = flagValue;
this.FT_TYPE = 0x0FF2; /* File type only */
this.FT_LOCAL = 0x0000; /* Local file */
this.FT_REMOTE = 0x0001; /* Remote file */
this.FT_DBLISAM = 0x0002; /* Synergy DBL ISAM file */
this.FT_DBLFLAT = 0x0004; /* Synergy DBL Non-ISAM file */
this.FT_CISAM = 0x0008; /* Informix C-ISAM file */
this.FT_TIS = 0x0010; /* Trifox RDB file */
this.FT_PIPECMD = 0x0020; /* Open pipe command */
this.FT_AS400 = 0x0040; /* AS/400 native file */
this.FT_BTRV = 0x0040; /* Novell's Btreive */
this.FT_NETTHREAD = 0x0800; /* channel is a server thread channel */
this.FT_PCLOSE = 0x1000; /* Pending close (file closed) */
this.FT_BADHOST = 0x8000; /* Bad hostname */
this.FT_ODBCUPDATE = 0x0080; /* ODBC update channel */
this.FT_ODBCINPUT = 0x0100; /* ODBC input channel */
this.FT_ODBCLASTFIND = 0x0200; /* ODBC last op was find */
this.FT_ODBCISAM = 0x0400; /* ODBC isam channel */
}
isLocal()
{
return !(this.flagValue & REMOTE);
}
stringify()
{
var stringValues = [];
if(this.flagValue & this.FT_TYPE)
stringValues.push("File");
if(this.flagValue & this.FT_REMOTE)
stringValues.push("Remote");
else
stringValues.push("Local");
if(this.flagValue & this.FT_DBLISAM)
stringValues.push("ISAM");
if(this.flagValue & this.FT_DBLFLAT)
stringValues.push("Flat");
if(this.flagValue & this.FT_PIPECMD)
stringValues.push("Pipe");
if(this.flagValue & this.FT_PCLOSE)
stringValues.push("Pending Close");
if(this.flagValue & this.FT_BADHOST)
stringValues.push("Bad Host");
if(this.flagValue & this.FT_ODBCUPDATE)
stringValues.push("ODBC Update");
if(this.flagValue & this.FT_ODBCINPUT)
stringValues.push("ODBC Input");
if(this.flagValue & this.FT_ODBCLASTFIND)
stringValues.push("ODBC LastFind");
if(this.flagValue & this.FT_ODBCISAM)
stringValues.push("ODBC ISAM");
return stringValues.join("|");
}
}
class IOCB_FileModeTypes
{
constructor(flagValue)
{
this.CS_I = 0x0001 /* Input mode */
this.CS_O = 0x0002 /* Output mode */
this.CS_U = 0x0004 /* Update mode */
this.CS_A = 0x0008 /* Append mode */
this.CS_SEQ = 0x000010 /* Sequential submode */
this.CS_REL = 0x000020 /* Relative submode */
this.CS_IDX = 0x000040 /* ISAM submode */
this.CS_BLK = 0x000080 /* Block submode */
this.CS_PRT = 0x000100 /* Print submode */
this.CS_DBL = 0x000200 /* Default submode (stream) */
this.CS_RMSIDX = 0x000400 /* RMS ISAM submode */
this.CS_CDCHECK = 0x000400 /* cd checking on DOS/SFW serial port */
this.CS_TERMINAL = 0x000800 /* Channel is a terminal */
this.CS_CONSOLE = 0x001000 /* Channel is a console */
this.CS_CHRDEV = 0x002000 /* Channel is a character dev */
this.CS_BLKDEV = 0x004000 /* Channel is a block device */
this.CS_PIPE = 0x008000 /* Channel is a pipe */
this.CS_PRINTER = 0x010000 /* Channel is a printer */
this.CS_BUFFERED = 0x020000 /* Channel is buffered */
this.CS_MAILBOX = 0x040000 /* Channel is VMS mailbox */
this.CS_LAT = 0x080000 /* Channel is VMS LAT terminal */
this.CS_DOSNUL = 0x080000 /* Channel is Windows NUL device */
this.CS_TCPIP = 0x100000 /* Channel is a tcp/ip device */
this.CS_NETDEV = 0x200000 /* Channel is a network device */
this.CS_RECDEV = 0x400000 /* Channel is a record device */
this.CS_DEC_OP = 0x800000 /* Funny DEC O:P SEQ file */
this.CS_DOSCOM = 0x1000000 /* Channel is Windows comport */
this.CS_TEMP = 0x4000000 /* Temporary file is active */
}
stringify()
{
var stringValues = [];
if(this.flagValue & this.CS_I)
stringValues.push("I");
if(this.flagValue & this.CS_O)
stringValues.push("O");
if(this.flagValue & this.CS_U)
stringValues.push("U");
if(this.flagValue & this.CS_A)
stringValues.push("A");
if(this.flagValue & this.CS_SEQ)
stringValues.push("SEQ");
if(this.flagValue & this.CS_REL)
stringValues.push("REL");
if(this.flagValue & this.CS_IDX)
stringValues.push("IDX");
if(this.flagValue & this.CS_BLK)
stringValues.push("BLK");
if(this.flagValue & this.CS_PRT)
stringValues.push("PRT");
if(this.flagValue & this.CS_TERMINAL)
stringValues.push("TERMINAL");
if(this.flagValue & this.CS_DBL)
stringValues.push("DBL");
if(this.flagValue & this.CS_CONSOLE)
stringValues.push("CONSOLE");
if(this.flagValue & this.CS_CHRDEV)
stringValues.push("CHRDEV");
if(this.flagValue & this.CS_PIPE)
stringValues.push("PIPE");
if(this.flagValue & this.CS_PRINTER)
stringValues.push("PRINTER");
if(this.flagValue & this.CS_BUFFERED)
stringValues.push("BUFFERED");
var result = stringValues.join("|");
return result == "" ? "None" : result;
}
}
class HandleTypes
{
constructor(handle)
{
this.flagValue = handle;
this.DMTYP_HND = 0x00000001; /* This is normal handle memory */
this.DMTYP_WND = 0x00000002; /* There is a window associated */
this.DMTYP_RCB = 0x00000004; /* This is RCB memory */
this.DMTYP_WPR = 0x00000008; /* This is Windows API Printer memory */
this.DMTYP_WPN = 0x00000010; /* This is Windows API Pen memory */
this.DMTYP_RNC = 0x00000020; /* This is RNC memory */
this.DMTYP_NAM = 0x00000040; /* This is Name space memory */
this.DMTYP_CLS = 0x00000080; /* This is Class memory */
this.DMTYP_OBJ = 0x00000100; /* This is Object memory */
this.DMTYP_MSG = 0x00000200; /* This is Message block memory */
this.DMTYP_FRM = 0x00000400; /* This is Frame memory */
this.isMemory = (this.flagValue & this.DMTYP_HND) ? true : false;
}
stringify()
{
var stringValues = [];
if(this.flagValue & this.DMTYP_HND)
stringValues.push("Memory Handle");
if(this.flagValue & this.DMTYP_WND)
stringValues.push("Window");
if(this.flagValue & this.DMTYP_RCB)
stringValues.push("RCB");
if(this.flagValue & this.DMTYP_WPR)
stringValues.push("Printer");
if(this.flagValue & this.DMTYP_WPN)
stringValues.push("Pen");
if(this.flagValue & this.DMTYP_RNC)
stringValues.push("RNC");
if(this.flagValue & this.DMTYP_NAM)
stringValues.push("Namespace");
if(this.flagValue & this.DMTYP_CLS)
stringValues.push("Class");
if(this.flagValue & this.DMTYP_OBJ)
stringValues.push("Object");
if(this.flagValue & this.DMTYP_MSG)
stringValues.push("Message Block");
if(this.flagValue & this.DMTYP_FRM)
stringValues.push("Frame");
return stringValues.join("|");
}
}
function invokeScript() {
let module = hostModule();
if (module == null) {
host.diagnostics.debugLog("Could not locate target dbr or dbs module");
}
}
function initializeScript() {
return [
new host.apiVersionSupport(1, 3),
new host.functionAlias(
showHandles,
'showHandles'
),
new host.functionAlias(
showChannels,
'showChannels'
),
new host.functionAlias(
showTraceback,
'showTraceback'
),
new host.functionAlias(
showPrettyTraceback,
'showPrettyTraceback'
),
new host.functionAlias(
showMemory,
'showMemory'
)
];
}