SET_THREAD_NAME for easier MSVC debugging

git-svn-id: file:///home/jj/hercules.svn/trunk@3555 956126f8-22a0-4046-8f4a-272fa8102e63
This commit is contained in:
Fish (David B Trout)
2005-12-31 20:01:59 +00:00
parent f88c4a4ac9
commit e219ebea50
26 changed files with 165 additions and 6 deletions

View File

@@ -15,6 +15,8 @@
int main(int ac,char *av[])
{
SET_THREAD_NAME(-1,"bootstrap");
#if defined( OPTION_DYNAMIC_LOAD ) && defined( HDL_USE_LIBTOOL )
LTDL_SET_PRELOADED_SYMBOLS();
#endif
@@ -54,6 +56,8 @@ int main(int ac,char *av[])
{
int rc = 0;
SET_THREAD_NAME(-1,"bootstrap");
// If we're being debugged, then let the debugger
// catch the exception. Otherwise, let our exception
// handler catch it...
@@ -137,6 +141,10 @@ static void ProcessException( EXCEPTION_POINTERS* pExceptionPtrs )
{
if ( CreateMiniDump( pExceptionPtrs ) )
{
// ZZ FIXME: Figure out why this MessageBox never appears.
// It *used* to but it's not anymore and I don't know why.
// The function *is* always returning TRUE... <grumble>
MessageBox
(
NULL,
@@ -170,7 +178,8 @@ static BOOL CreateMiniDump( EXCEPTION_POINTERS* pExceptionPtrs )
_wmakepath( wszDumpPath, g_wszHercDrive, g_wszHercDir, L"Hercules", L".dmp" );
_tprintf( _T("Creating crash dump \"%S\"...\n"), wszDumpPath );
_tprintf( _T("(Please wait; this may take a few minutes)\n") );
_tprintf( _T("Please wait; this may take a few minutes...\n") );
_tprintf( _T("(another message will appear when the dump is complete)\n") );
hDumpFile = CreateFileW
(