https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bf54369dbbc77947a9ad8…
commit bf54369dbbc77947a9ad8979f9e3a49d085cb383
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sat Apr 18 15:18:19 2020 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Apr 19 15:18:51 2020 +0200
[LOADCONFIG_APITEST] Tell GCC that the .def is not just included for fun,
but that it should actually use it.
---
modules/rostests/apitests/loadconfig/CMakeLists.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/rostests/apitests/loadconfig/CMakeLists.txt b/modules/rostests/apitests/loadconfig/CMakeLists.txt
index 8c0860b7c13..d4327e5622d 100644
--- a/modules/rostests/apitests/loadconfig/CMakeLists.txt
+++ b/modules/rostests/apitests/loadconfig/CMakeLists.txt
@@ -13,4 +13,10 @@ add_importlibs(loadconfig_apitest msvcrt kernel32 ntdll)
#add_pch(loadconfig_apitest loadconfig.h SOURCE)
add_rostests_file(TARGET loadconfig_apitest)
+# Tell GCC again that we are really interested in exporting symols (who would have figured that we want to use the .def we specified before?)
+set_target_properties(loadconfig_apitest
+ PROPERTIES
+ ENABLE_EXPORTS TRUE
+ DEFINE_SYMBOL "")
+
fixup_load_config(loadconfig_apitest)
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=309e9c13e14e3e3a4ddf5…
commit 309e9c13e14e3e3a4ddf55d0698b3772b762c9b9
Author: Sylvain Deverre <deverre.sylv(a)gmail.com>
AuthorDate: Sun Apr 19 14:20:58 2020 +0200
Commit: Sylvain Deverre <deverre.sylv(a)gmail.com>
CommitDate: Sun Apr 19 15:01:41 2020 +0200
[KDGDB] Allow kdgdb to continue when hit by a first-chance exception.
When gdb receives a fault, it converts it to "signal", and send "C"
command to server to transfer the signal it couldn't handle.
On ReactOS (and Windows ?) side, we tell KD API that we continue with an
error code, so the exception handler can be called.
This is useful when playing with gflags, especially +soe, with KDGDB.
---
drivers/base/kdgdb/gdb_input.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/base/kdgdb/gdb_input.c b/drivers/base/kdgdb/gdb_input.c
index ab2efdc10a4..e729beb37e1 100644
--- a/drivers/base/kdgdb/gdb_input.c
+++ b/drivers/base/kdgdb/gdb_input.c
@@ -902,6 +902,32 @@ handle_gdb_c(
return ContinueManipulateStateHandler(State, MessageData, MessageLength, KdContext);
}
+static
+KDSTATUS
+handle_gdb_C(
+ _Out_ DBGKD_MANIPULATE_STATE64* State,
+ _Out_ PSTRING MessageData,
+ _Out_ PULONG MessageLength,
+ _Inout_ PKD_CONTEXT KdContext)
+{
+ KDSTATUS Status;
+
+ /* Tell GDB everything is fine, we will handle it */
+ Status = send_gdb_packet("OK");
+ if (Status != KdPacketReceived)
+ return Status;
+
+ if (CurrentStateChange.NewState == DbgKdExceptionStateChange)
+ {
+ /* Debugger didn't handle the exception, report it back to the kernel */
+ State->u.Continue2.ContinueStatus = CurrentStateChange.u.Exception.ExceptionRecord.ExceptionCode;
+ State->ApiNumber = DbgKdContinueApi2;
+ return KdPacketReceived;
+ }
+ /* We should never reach this ? */
+ return ContinueManipulateStateHandler(State, MessageData, MessageLength, KdContext);
+}
+
static
KDSTATUS
handle_gdb_s(
@@ -982,6 +1008,9 @@ gdb_receive_and_interpret_packet(
case 'c':
Status = handle_gdb_c(State, MessageData, MessageLength, KdContext);
break;
+ case 'C':
+ Status = handle_gdb_C(State, MessageData, MessageLength, KdContext);
+ break;
case 'g':
Status = LOOP_IF_SUCCESS(gdb_send_registers());
break;