forked from Mirrors/wine-wine
winedbg: Use debug event code in packet_reply_status.
This will help expand later the cases to tell gdb about the cause of the break. Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>feature/deterministic
parent
86ed5e563d
commit
dafa8b52d0
|
@ -874,10 +874,11 @@ static enum packet_return packet_reply_status(struct gdb_context* gdbctx)
|
||||||
dbg_ctx_t ctx;
|
dbg_ctx_t ctx;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (process != NULL)
|
switch (gdbctx->de.dwDebugEventCode)
|
||||||
{
|
{
|
||||||
|
default:
|
||||||
|
if (!process) return packet_error;
|
||||||
if (!(backend = process->be_cpu)) return packet_error;
|
if (!(backend = process->be_cpu)) return packet_error;
|
||||||
|
|
||||||
if (!(thread = dbg_get_thread(process, gdbctx->de.dwThreadId)) ||
|
if (!(thread = dbg_get_thread(process, gdbctx->de.dwThreadId)) ||
|
||||||
!backend->get_context(thread->handle, &ctx))
|
!backend->get_context(thread->handle, &ctx))
|
||||||
return packet_error;
|
return packet_error;
|
||||||
|
@ -900,13 +901,13 @@ static enum packet_return packet_reply_status(struct gdb_context* gdbctx)
|
||||||
|
|
||||||
packet_reply_close(gdbctx);
|
packet_reply_close(gdbctx);
|
||||||
return packet_done;
|
return packet_done;
|
||||||
}
|
|
||||||
else
|
case EXIT_PROCESS_DEBUG_EVENT:
|
||||||
{
|
packet_reply_open(gdbctx);
|
||||||
/* Try to put an exit code
|
packet_reply_add(gdbctx, "W");
|
||||||
* Cannot use GetExitCodeProcess, wouldn't fit in a 8 bit value, so
|
packet_reply_val(gdbctx, gdbctx->de.u.ExitProcess.dwExitCode, 4);
|
||||||
* just indicate the end of process and exit */
|
packet_reply_close(gdbctx);
|
||||||
return packet_reply(gdbctx, "W00") | packet_last_f;
|
return packet_done | packet_last_f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue