X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdrivers%2Fbase%2Fkdgdb%2Fgdb_send.c;h=87aeca160c4d064b42af6cc4e0ef1f7ef2c62488;hp=b31faebf002d9fbb0647b80cf3a109acb2c92460;hb=31965e9804622cc653d51980092e3418a93f42e6;hpb=38ca96eb96d3ffc31ba548a2c5fde1a0ab1b8108 diff --git a/reactos/drivers/base/kdgdb/gdb_send.c b/reactos/drivers/base/kdgdb/gdb_send.c index b31faebf002..87aeca160c4 100644 --- a/reactos/drivers/base/kdgdb/gdb_send.c +++ b/reactos/drivers/base/kdgdb/gdb_send.c @@ -168,17 +168,12 @@ gdb_send_exception(void) { char gdb_out[1024]; char* ptr = gdb_out; - DBGKM_EXCEPTION64* Exception = NULL; - - if (CurrentStateChange.NewState == DbgKdExceptionStateChange) - Exception = &CurrentStateChange.u.Exception; + DBGKM_EXCEPTION64* Exception = &CurrentStateChange.u.Exception; /* Report to GDB */ *ptr++ = 'T'; - if (Exception) - ptr = exception_code_to_gdb(Exception->ExceptionRecord.ExceptionCode, ptr); - else - ptr += sprintf(ptr, "05"); + + ptr = exception_code_to_gdb(Exception->ExceptionRecord.ExceptionCode, ptr); ptr += sprintf(ptr, "thread:p%p.%p;", PsGetThreadProcessId((PETHREAD)(ULONG_PTR)CurrentStateChange.Thread), PsGetThreadId((PETHREAD)(ULONG_PTR)CurrentStateChange.Thread));