Skip to content
Snippets Groups Projects
Commit 1ce1bef8 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

Better error reporting on DebugActiveProcess failure.

parent 7614180e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment