-
Notifications
You must be signed in to change notification settings - Fork 90
/
fOutputCurrentJITDebuggerSettings.py
60 lines (58 loc) · 1.98 KB
/
fOutputCurrentJITDebuggerSettings.py
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
from mNotProvided import fbIsProvided;
from foConsoleLoader import foConsoleLoader;
from fsCreateBugIdCommandLine import fsCreateBugIdCommandLine;
from fxGetCurrentJITDebuggerCommandLine import fxGetCurrentJITDebuggerCommandLine;
from mColorsAndChars import *;
oConsole = foConsoleLoader();
def fOutputCurrentJITDebuggerSettings():
oConsole.fLock();
try:
oConsole.fOutput("┌───[", COLOR_INFO, " Current JIT Debugger ", COLOR_NORMAL, "]", sPadding = "─");
xCurrentJITDebuggerCommandLine = fxGetCurrentJITDebuggerCommandLine();
if not fbIsProvided(xCurrentJITDebuggerCommandLine):
oConsole.fOutput(
"│ ",
COLOR_INFO, CHAR_INFO,
COLOR_NORMAL, "JIT debugger: ",
COLOR_INFO, "None",
COLOR_NORMAL, ".",
);
elif xCurrentJITDebuggerCommandLine is None:
oConsole.fOutput(
"│ ",
COLOR_ERROR, CHAR_ERROR,
COLOR_NORMAL, " JIT debugger: ",
COLOR_INFO, "Unknown",
COLOR_NORMAL, " (unable to read registry).",
);
else:
sBugIdJITDebuggerCommandLineStartsWith = fsCreateBugIdCommandLine();
if xCurrentJITDebuggerCommandLine.startswith(sBugIdJITDebuggerCommandLineStartsWith):
oConsole.fOutput(
"│ ",
COLOR_OK, CHAR_OK,
COLOR_NORMAL, " JIT debugger: ",
COLOR_INFO, "BugId",
COLOR_NORMAL, ".",
);
sArguments = xCurrentJITDebuggerCommandLine[len(sBugIdJITDebuggerCommandLineStartsWith) + 1:];
oConsole.fOutput(
"│ Arguments: ",
COLOR_INFO, sArguments,
);
else:
oConsole.fOutput(
"│ ",
COLOR_WARNING, CHAR_WARNING,
COLOR_NORMAL, " JIT debugger: ",
COLOR_INFO, "Other",
COLOR_NORMAL, ".",
);
oConsole.fOutput(
"│ Command line: ",
COLOR_INFO, xCurrentJITDebuggerCommandLine,
);
oConsole.fOutput("└", sPadding = "─");
finally:
oConsole.fUnlock();