Better error reporting on DebugActiveProcess failure.
This commit is contained in:
parent
7614180e2d
commit
1ce1bef859
|
@ -142,7 +142,7 @@ command:
|
||||||
| tCOND tNUM expr tEOL { DEBUG_AddBPCondition($2, $3); }
|
| tCOND tNUM expr tEOL { DEBUG_AddBPCondition($2, $3); }
|
||||||
| tSYMBOLFILE pathname tEOL { DEBUG_ReadSymbolTable($2); }
|
| tSYMBOLFILE pathname tEOL { DEBUG_ReadSymbolTable($2); }
|
||||||
| tWHATIS expr_addr tEOL { DEBUG_PrintType(&$2); DEBUG_FreeExprMem(); }
|
| 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
|
| list_command
|
||||||
| disassemble_command
|
| disassemble_command
|
||||||
| set_command
|
| set_command
|
||||||
|
|
|
@ -277,8 +277,9 @@ BOOL DEBUG_Attach(DWORD pid, BOOL cofe)
|
||||||
if (!(DEBUG_CurrProcess = DEBUG_AddProcess(pid, 0))) return FALSE;
|
if (!(DEBUG_CurrProcess = DEBUG_AddProcess(pid, 0))) return FALSE;
|
||||||
|
|
||||||
if (!DebugActiveProcess(pid)) {
|
if (!DebugActiveProcess(pid)) {
|
||||||
DEBUG_Printf(DBG_CHN_ERR, "Can't attach process %ld: %ld\n",
|
DEBUG_Printf(DBG_CHN_MESG, "Can't attach process %lx: error %ld\n", pid, GetLastError());
|
||||||
pid, GetLastError());
|
DEBUG_DelProcess(DEBUG_CurrProcess);
|
||||||
|
DEBUG_CurrProcess = NULL;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
DEBUG_CurrProcess->continue_on_first_exception = cofe;
|
DEBUG_CurrProcess->continue_on_first_exception = cofe;
|
||||||
|
|
Loading…
Reference in New Issue