summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2011-02-11 17:30:09 -0500
committerNyx (Neal Orman) <nyx@lindenlab.com>2011-02-11 17:30:09 -0500
commit344ddaf9f5945c63c39774f9619069629430e70b (patch)
tree8f6dc2b2e317d1967d832cd42474546e48212beb /indra
parent86a2c4912c72a735f713dfc40a053335a21f3350 (diff)
reverting windows debugging commits.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/CMakeLists.txt1
-rw-r--r--indra/newview/llappviewerwin32.cpp3
-rw-r--r--indra/newview/runtimediagnostics.h253
3 files changed, 1 insertions, 256 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index ca408d032a..8ea0dd1089 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1136,7 +1136,6 @@ set(viewer_HEADER_FILES
macmain.h
noise.h
pipeline.h
- runtimediagnostics.h
VertexCache.h
VorbisFramework.h
)
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index b0bf36f688..d328567a0e 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -57,7 +57,7 @@
#include "llcommandlineparser.h"
#include "lltrans.h"
-#include "runtimediagnostics.h"
+
#ifndef LL_RELEASE_FOR_DOWNLOAD
#include "llwindebug.h"
#endif
@@ -110,7 +110,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
- RuntimeDiagnostics::CheckPauseOnStartupOption();
LLMemType mt1(LLMemType::MTYPE_STARTUP);
const S32 MAX_HEAPS = 255;
diff --git a/indra/newview/runtimediagnostics.h b/indra/newview/runtimediagnostics.h
deleted file mode 100644
index bf385a6361..0000000000
--- a/indra/newview/runtimediagnostics.h
+++ /dev/null
@@ -1,253 +0,0 @@
-#pragma once
-#include <atlbase.h>
-
-
-
-/* static*/ class RuntimeDiagnostics
-
-{
-
-public:
-
- static void CheckPauseOnStartupOption(
-
- )
-
- {
-
- DWORD dwPause;
-
- if (GetExecutionOption(TEXT("PauseOnStartup"), &dwPause) == S_OK && dwPause != 0)
-
- {
-
- while (true)
-
- {
-
- if (IsDebuggerPresent())
-
- {
-
- __debugbreak();
-
- break;
-
- }
-
-
-
- Sleep(1000);
-
- }
-
- }
-
- }
-
-
-
-private:
-
- static HRESULT GetExecutionOption(
-
- LPCTSTR szOptionName,
-
- DWORD *pValue
-
- )
-
- {
-
- HRESULT hr;
-
- DWORD nChar;
-
-
-
- *pValue = 0;
-
-
-
- CRegKey rkeyExecutionOptions;
-
- hr = WIN32_ERROR_CALL( rkeyExecutionOptions.Open(
-
- HKEY_LOCAL_MACHINE,
-
- TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options"),
-
- KEY_READ
-
- ) );
-
-
-
- if (hr == S_OK)
-
- {
-
- TCHAR szModPath[MAX_PATH + 1];
-
- nChar = GetModuleFileName(NULL, szModPath, ARRAYSIZE(szModPath));
-
- hr = WIN32_BOOL_CALL(nChar > 0 && nChar < ARRAYSIZE(szModPath));
-
-
-
- if (hr == S_OK)
-
- {
-
- nChar = GetFileNameCharOffset(szModPath);
-
-
-
- if (nChar != MAXDWORD)
-
- {
-
- CRegKey rkeyExe;
-
- hr = WIN32_ERROR_CALL( rkeyExe.Open(rkeyExecutionOptions, szModPath + nChar, KEY_QUERY_VALUE) );
-
- if (hr == S_OK)
-
- {
-
- hr = WIN32_ERROR_CALL( rkeyExe.QueryDWORDValue(szOptionName, *pValue) );
-
- }
-
- }
-
- else
-
- {
-
- hr = E_FAIL;
-
- }
-
- }
-
- }
-
-
-
- return hr;
-
- }
-
-
-
- static DWORD GetFileNameCharOffset(LPCTSTR szPath)
-
- {
-
- if (!szPath)
-
- {
-
- return MAXDWORD;
-
- }
-
-
-
- // Find the last slash
-
- DWORD dwReturn = 0;
-
- for (DWORD c = 0; szPath[c] != 0; c++)
-
- {
-
- if (c >= INT_MAX)
-
- {
-
- return MAXDWORD; // string did not terminate
-
- }
-
-
-
- if (szPath[c] == '\\' || szPath[c] == '/' || (szPath[c] == ':' && c == 1))
-
- {
-
- dwReturn = c + 1;
-
- }
-
- }
-
-
-
- // Make sure that the string doesn't end at the slash
-
- if (szPath[dwReturn] == 0)
-
- {
-
- dwReturn = MAXDWORD;
-
- }
-
-
-
- return dwReturn;
-
- }
-
-
-
- static inline HRESULT WIN32_ERROR(LONG lError)
-
- {
-
- return HRESULT_FROM_WIN32(lError);
-
- }
-
-
-
- static inline HRESULT WIN32_LAST_ERROR()
-
- {
-
- return WIN32_ERROR(GetLastError());
-
- }
-
-
-
- static inline HRESULT WIN32_BOOL_CALL(BOOL rc)
-
- {
-
- if (!rc)
-
- return WIN32_LAST_ERROR();
-
- return S_OK;
-
- }
-
-
-
- static inline HRESULT WIN32_ERROR_CALL(LONG lError)
-
- {
-
- if (lError != ERROR_SUCCESS)
-
- return WIN32_ERROR(lError);
-
- return S_OK;
-
- }
-
-};
-