Better error reporting on DebugActiveProcess failure.

This commit is contained in:
Alexandre Julliard 2001-07-11 17:33:08 +00:00
parent 7614180e2d
commit 1ce1bef859
2 changed files with 4 additions and 3 deletions

View File

@ -142,7 +142,7 @@ command:
| tCOND tNUM expr tEOL { DEBUG_AddBPCondition($2, $3); }
| tSYMBOLFILE pathname tEOL { DEBUG_ReadSymbolTable($2); }
| tWHATIS expr_addr tEOL { DEBUG_PrintType(&$2); DEBUG_FreeExprMem(); }
| tATTACH tNUM tEOL { DEBUG_Attach($2, FALSE); return TRUE; }
| tATTACH tNUM tEOL { if (DEBUG_Attach($2, FALSE)) return TRUE; }
| list_command
| disassemble_command
| set_command

View File

@ -277,8 +277,9 @@ BOOL DEBUG_Attach(DWORD pid, BOOL cofe)
if (!(DEBUG_CurrProcess = DEBUG_AddProcess(pid, 0))) return FALSE;
if (!DebugActiveProcess(pid)) {
DEBUG_Printf(DBG_CHN_ERR, "Can't attach process %ld: %ld\n",
pid, GetLastError());
DEBUG_Printf(DBG_CHN_MESG, "Can't attach process %lx: error %ld\n", pid, GetLastError());
DEBUG_DelProcess(DEBUG_CurrProcess);
DEBUG_CurrProcess = NULL;
return FALSE;
}
DEBUG_CurrProcess->continue_on_first_exception = cofe;