llvm.org GIT mirror llvm / a1d942f
KillTheDoctor: Fix spelling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120985 91177308-0d34-0410-b5e6-96231b3b80d8 Michael J. Spencer 9 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
1515 // (and hopefully tells someone about it).
1616 //
1717 // This also provides another really hacky method to prevent assert dialog boxes
18 // from poping up. When --no-user32 is passed, if any process loads user32.dll,
18 // from popping up. When --no-user32 is passed, if any process loads user32.dll,
1919 // we assume it is trying to call MessageBoxEx and terminate it. The proper way
2020 // to do this would be to actually set a break point, but there's quite a bit
2121 // of code involved to get the address of MessageBoxEx in the remote process's
2222 // address space due to Address space layout randomization (ASLR). This can be
2323 // added if it's ever actually needed.
2424 //
25 // If the subprocess exits for any reason other than sucessful termination, -1
25 // If the subprocess exits for any reason other than successful termination, -1
2626 // is returned. If the process exits normally the value it returned is returned.
2727 //
2828 // I hate Windows.
386386 StartupInfo.cb = sizeof(StartupInfo);
387387 std::memset(&ProcessInfo, 0, sizeof(ProcessInfo));
388388
389 // Set error mode to not display any message boxes. The child process inherets
389 // Set error mode to not display any message boxes. The child process inherits
390390 // this.
391391 ::SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
392392 ::_set_error_mode(_OUT_TO_STDERR);
441441 a.HighPart = KernelTime.dwHighDateTime;
442442 b.LowPart = UserTime.dwLowDateTime;
443443 b.HighPart = UserTime.dwHighDateTime;
444 // Convert 100-nanosecond units to miliseconds.
444 // Convert 100-nanosecond units to milliseconds.
445445 uint64_t TotalTimeMiliseconds = (a.QuadPart + b.QuadPart) / 10000;
446446 // Handle the case where the process has been running for more than 49
447447 // days.
493493 if (TraceExecution)
494494 errs() << ToolName << ": Debug Event: EXIT_PROCESS_DEBUG_EVENT\n";
495495
496 // If this is the process we origionally created, exit with its exit
496 // If this is the process we originally created, exit with its exit
497497 // code.
498498 if (DebugEvent.dwProcessId == ProcessInfo.dwProcessId)
499499 return DebugEvent.u.ExitProcess.dwExitCode;
533533 errs() << ToolName << ": user32.dll loaded!\n";
534534 errs().indent(ToolName.size())
535535 << ": This probably means that assert was called. Closing "
536 "program to prevent message box from poping up.\n";
536 "program to prevent message box from popping up.\n";
537537 dwContinueStatus = DBG_CONTINUE;
538538 ::TerminateProcess(ProcessIDToHandle[DebugEvent.dwProcessId], -1);
539539 return -1;