ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2021
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
173 discussions
Start a n
N
ew thread
[reactos] 18/29: [RTL] Use addressing relative to rip
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8abcd187423ca52235302…
commit 8abcd187423ca5223530252d26e71531a523276e Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Wed Apr 21 19:52:58 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Apr 28 13:10:23 2021 +0200 [RTL] Use addressing relative to rip --- sdk/lib/rtl/amd64/slist.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/lib/rtl/amd64/slist.S b/sdk/lib/rtl/amd64/slist.S index 928cb52cd43..08eb382351d 100644 --- a/sdk/lib/rtl/amd64/slist.S +++ b/sdk/lib/rtl/amd64/slist.S @@ -102,7 +102,7 @@ ExpInterlockedPopEntrySList: mov rax, [rcx] /* Check for 16 byte SList support */ - cmp byte ptr [RtlpUse16ByteSLists], 0 + cmp byte ptr [rip+RtlpUse16ByteSLists], 0 jne RtlInterlockedPopEntrySList16 /* Use the 8 byte header */ @@ -233,7 +233,7 @@ ExpInterlockedPushEntrySList: ExpInterlockedPushEntrySListChecked: /* Make sure RtlpUse16ByteSLists is initialized */ - cmp byte ptr [RtlpUse16ByteSLists], HEX(FF) + cmp byte ptr [rip+RtlpUse16ByteSLists], HEX(FF) jne ExpInterlockedPushEntrySListChecked2 /* Not initialized, raise an assertion */ int HEX(2C) @@ -247,7 +247,7 @@ ExpInterlockedPushEntrySListChecked2: mov r9, [rcx + 8] /* Check for 16 byte SList support */ - cmp byte ptr [RtlpUse16ByteSLists], 0 + cmp byte ptr [rip+RtlpUse16ByteSLists], 0 jne RtlInterlockedPushEntrySList16 /* Use the 8 byte header */ @@ -368,7 +368,7 @@ ExpInterlockedFlushSList: mov rax, [rcx] /* Check for 16 byte SList support */ - cmp byte ptr [RtlpUse16ByteSLists], 0 + cmp byte ptr [rip+RtlpUse16ByteSLists], 0 jne RtlInterlockedFlushSList16 /* Use the 8 byte header */
3 years, 8 months
1
0
0
0
[reactos] 17/29: [PSEH] Make the dummy PSEH at least usable.
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=96a2b1890390d3c8451df…
commit 96a2b1890390d3c8451dff6eff64ac13d6124d36 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Wed Apr 21 19:50:31 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Apr 28 13:10:23 2021 +0200 [PSEH] Make the dummy PSEH at least usable. Not screwing the code flow when no exception happens would be the least --- sdk/include/reactos/libs/pseh/pseh2.h | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/sdk/include/reactos/libs/pseh/pseh2.h b/sdk/include/reactos/libs/pseh/pseh2.h index 8437bbe2f7a..45f872e7757 100644 --- a/sdk/include/reactos/libs/pseh/pseh2.h +++ b/sdk/include/reactos/libs/pseh/pseh2.h @@ -42,15 +42,36 @@ extern int _SEH2_Volatile0; extern int _SEH2_VolatileExceptionCode; -#define _SEH2_TRY { -#define _SEH2_FINALLY } { -#define _SEH2_EXCEPT(...) } if (_SEH2_Volatile0 || (0 && (__VA_ARGS__))) { -#define _SEH2_END } +#define _SEH2_TRY \ +_Pragma("GCC diagnostic push") \ +_Pragma("GCC diagnostic ignored \"-Wunused-label\"")\ +{ \ + __label__ __seh2_scope_end__; + +#define _SEH2_FINALLY \ + __seh2_scope_end__:; \ + } \ + if (1) \ + { \ + __label__ __seh2_scope_end__; + +#define _SEH2_EXCEPT(...) \ + __seh2_scope_end__:; \ + } \ + if (_SEH2_Volatile0 || (0 && (__VA_ARGS__))) \ + { \ + __label__ __seh2_scope_end__; + +#define _SEH2_END \ + __seh2_scope_end__:; \ + } \ +_Pragma("GCC diagnostic pop") + #define _SEH2_GetExceptionInformation() ((struct _EXCEPTION_POINTERS*)0) #define _SEH2_GetExceptionCode() _SEH2_VolatileExceptionCode #define _SEH2_AbnormalTermination() (0) #define _SEH2_YIELD(STMT_) STMT_ -#define _SEH2_LEAVE +#define _SEH2_LEAVE goto __seh2_scope_end__; #define _SEH2_VOLATILE volatile #elif defined(_USE_PSEH3)
3 years, 8 months
1
0
0
0
[reactos] 16/29: [HALX86] Use addressing relative to RIP
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=617c7cc377017a58ca64a…
commit 617c7cc377017a58ca64a1e9155d1b765564ccd4 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Wed Apr 21 19:46:59 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Apr 28 13:10:23 2021 +0200 [HALX86] Use addressing relative to RIP --- hal/halx86/apic/tsccal.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hal/halx86/apic/tsccal.S b/hal/halx86/apic/tsccal.S index 66bde94896b..7fc28ce7393 100644 --- a/hal/halx86/apic/tsccal.S +++ b/hal/halx86/apic/tsccal.S @@ -69,7 +69,7 @@ FUNC TscCalibrationISR rdtsc /* Read the current phase */ - movzx rcx, byte ptr [TscCalibrationPhase] + movzx rcx, byte ptr [rip+TscCalibrationPhase] /* Check if we're already done */ cmp cl, NUM_SAMPLES @@ -77,12 +77,12 @@ FUNC TscCalibrationISR /* Store the current value */ shl rcx, 3 - lea rbx, [TscCalibrationArray] + lea rbx, [rip+TscCalibrationArray] mov dword ptr [rbx + rcx], eax mov dword ptr [rbx + rcx + 4], edx /* Advance phase */ - inc byte ptr [TscCalibrationPhase] + inc byte ptr [rip+TscCalibrationPhase] CalibrationISR_Exit: /* Read CMOS register C */
3 years, 8 months
1
0
0
0
[reactos] 15/29: [BTRFS] Use addressing relative to RIP
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6f000979eb2ffef884449…
commit 6f000979eb2ffef8844494ba52a7b7ca677ab615 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Wed Apr 21 19:46:30 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Apr 28 13:10:23 2021 +0200 [BTRFS] Use addressing relative to RIP --- drivers/filesystems/btrfs/crc32c-amd64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/filesystems/btrfs/crc32c-amd64.S b/drivers/filesystems/btrfs/crc32c-amd64.S index adfd988384f..dbe035487c7 100644 --- a/drivers/filesystems/btrfs/crc32c-amd64.S +++ b/drivers/filesystems/btrfs/crc32c-amd64.S @@ -45,7 +45,7 @@ mov r10b, byte ptr [rdx] xor al, r10b and rax, 255 shl rax, 2 -mov r10, offset crctable +lea r10, [rip+crctable] mov eax, dword ptr [r10 + rax] xor rax, rcx
3 years, 8 months
1
0
0
0
[reactos] 14/29: [KDGDB] Adapt to amd64
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0eea78648ce3235fb2506…
commit 0eea78648ce3235fb2506f561c0345f29fc241ee Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Wed Apr 14 13:36:17 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Apr 28 13:10:23 2021 +0200 [KDGDB] Adapt to amd64 --- drivers/base/kdgdb/CMakeLists.txt | 4 +- drivers/base/kdgdb/amd64_sup.c | 263 ++++++++++++++++++++++++++++++++++++++ drivers/base/kdgdb/gdb_input.c | 18 +-- drivers/base/kdgdb/kdgdb.h | 13 +- 4 files changed, 284 insertions(+), 14 deletions(-) diff --git a/drivers/base/kdgdb/CMakeLists.txt b/drivers/base/kdgdb/CMakeLists.txt index d783b3851da..05c2f8f6e2e 100644 --- a/drivers/base/kdgdb/CMakeLists.txt +++ b/drivers/base/kdgdb/CMakeLists.txt @@ -10,9 +10,11 @@ list(APPEND SOURCE utils.c kdgdb.h) -# TODO: AMD64, ARM... +# TODO: ARM... if(ARCH STREQUAL "i386") list(APPEND SOURCE i386_sup.c) +elseif(ARCH STREQUAL "amd64") + list(APPEND SOURCE amd64_sup.c) endif() add_library(kdcom MODULE diff --git a/drivers/base/kdgdb/amd64_sup.c b/drivers/base/kdgdb/amd64_sup.c new file mode 100644 index 00000000000..b497581a797 --- /dev/null +++ b/drivers/base/kdgdb/amd64_sup.c @@ -0,0 +1,263 @@ +/* + * PROJECT: ReactOS KD dll - GDB stub + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: Base functions for the kernel debugger + * COPYRIGHT: Copyright 2021 Jérôme Gardou + */ + +#include "kdgdb.h" + +enum reg_name +{ + RAX, RBX, RCX, RDX, RSI, RDI, RBP, RSP, + R8, R9, R10, R11, R12, R13, R14, R15, + RIP, + EFLAGS, + CS, SS, DS, ES, FS, GS, + ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, + FCTRL, FSTAT, FTAG, FISEG, FIOFF, FOSEG, FOOFF, FOP +}; + +static const unsigned char reg_size[] = +{ + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, + 4, + 4, 4, 4, 4, 4, 4, + 10, 10, 10, 10, 10, 10, 10, 10, + 8, 8, 8, 8, 8, 8, 8, 8 +}; + +static +void* +ctx_to_reg(CONTEXT* ctx, enum reg_name name) +{ + switch (name) + { + case RAX: return &ctx->Rax; + case RBX: return &ctx->Rbx; + case RCX: return &ctx->Rcx; + case RDX: return &ctx->Rdx; + case RSP: return &ctx->Rsp; + case RBP: return &ctx->Rbp; + case RSI: return &ctx->Rsi; + case RDI: return &ctx->Rdi; + case RIP: return &ctx->Rip; + case R8: return &ctx->R8; + case R9: return &ctx->R9; + case R10: return &ctx->R10; + case R11: return &ctx->R11; + case R12: return &ctx->R12; + case R13: return &ctx->R13; + case R14: return &ctx->R14; + case R15: return &ctx->R15; + case EFLAGS: return &ctx->EFlags; + case CS: return &ctx->SegCs; + case DS: return &ctx->SegSs; + case ES: return &ctx->SegEs; + case FS: return &ctx->SegFs; + case GS: return &ctx->SegGs; + case SS: return &ctx->SegSs; + } +#undef return_reg + return 0; +} + +static +void* +thread_to_reg(PETHREAD Thread, enum reg_name reg_name) +{ + static const void* NullValue = NULL; + +#if 0 + if (Thread->Tcb.TrapFrame) + { + PKTRAP_FRAME TrapFrame = Thread->Tcb.TrapFrame; + + switch (reg_name) + { + case RAX: return &TrapFrame->Rax; + case RBX: return &TrapFrame->Rbx; + case RCX: return &TrapFrame->Rcx; + case RDX: return &TrapFrame->Rdx; + case RSP: return &TrapFrame->Rsp; + case RBP: return &TrapFrame->Rbp; + case RSI: return &TrapFrame->Rsi; + case RDI: return &TrapFrame->Rdi; + case RIP: return &TrapFrame->Rip; + case R8: return &TrapFrame->R8; + case R9: return &TrapFrame->R9; + case R10: return &TrapFrame->R10; + case R11: return &TrapFrame->R11; + case EFLAGS: return &TrapFrame->EFlags; + case CS: return &TrapFrame->SegCs; + case DS: return &TrapFrame->SegSs; + case ES: return &TrapFrame->SegEs; + case FS: return &TrapFrame->SegFs; + case GS: return &TrapFrame->SegGs; + case SS: return &TrapFrame->SegSs; + default: + KDDBGPRINT("Unhandled regname: %d.\n", reg_name); + } + } + else +#endif + if (!Thread->Tcb.InitialStack) + { + /* Terminated thread ? */ + switch (reg_name) + { + case RSP: + case RBP: + case RIP: + KDDBGPRINT("Returning NULL for register %d.\n", reg_name); + return &NullValue; + default: + return NULL; + } + } + else + { + switch(reg_name) + { + case RSP: return &Thread->Tcb.KernelStack; + case RIP: + { + PULONG_PTR Rsp = Thread->Tcb.KernelStack; + return &Rsp[3]; + } + case RBP: + { + PULONG_PTR Rsp = Thread->Tcb.KernelStack; + return &Rsp[4]; + } + default: + return NULL; + } + } + + return NULL; +} + +KDSTATUS +gdb_send_registers(void) +{ + CHAR RegisterStr[17]; + UCHAR* RegisterPtr; + unsigned short i; + unsigned short size; + + start_gdb_packet(); + + KDDBGPRINT("Sending registers of thread %" PRIxPTR ".\n", gdb_dbg_tid); + KDDBGPRINT("Current thread_id: %p.\n", PsGetThreadId((PETHREAD)(ULONG_PTR)CurrentStateChange.Thread)); + if (((gdb_dbg_pid == 0) && (gdb_dbg_tid == 0)) || + gdb_tid_to_handle(gdb_dbg_tid) == PsGetThreadId((PETHREAD)(ULONG_PTR)CurrentStateChange.Thread)) + { + for (i = 0; i < 24; i++) + { + RegisterPtr = ctx_to_reg(&CurrentContext, i); + size = reg_size[i] * 2; + RegisterStr[size] = 0; + while (size) + { + size--; + RegisterStr[size] = hex_chars[RegisterPtr[size/2] & 0xF]; + size--; + RegisterStr[size] = hex_chars[RegisterPtr[size/2] >> 4]; + } + + send_gdb_partial_packet(RegisterStr); + } + } + else + { + PETHREAD DbgThread; + + DbgThread = find_thread(gdb_dbg_pid, gdb_dbg_tid); + + if (DbgThread == NULL) + { + /* Thread is dead */ + send_gdb_partial_packet("E03"); + return finish_gdb_packet(); + } + + for (i = 0; i < 24; i++) + { + RegisterPtr = thread_to_reg(DbgThread, i); + size = reg_size[i] * 2; + RegisterStr[size] = 0; + + while (size) + { + if (RegisterPtr) + { + size--; + RegisterStr[size] = hex_chars[RegisterPtr[size/2] & 0xF]; + size--; + RegisterStr[size] = hex_chars[RegisterPtr[size/2] >> 4]; + } + else + { + size--; + RegisterStr[size] = 'x'; + size--; + RegisterStr[size] = 'x'; + } + } + + send_gdb_partial_packet(RegisterStr); + } + } + + return finish_gdb_packet(); +} + +KDSTATUS +gdb_send_register(void) +{ + enum reg_name reg_name; + void *ptr; + + /* Get the GDB register name (gdb_input = "pXX") */ + reg_name = (hex_value(gdb_input[1]) << 4) | hex_value(gdb_input[2]); + + if (((gdb_dbg_pid == 0) && (gdb_dbg_tid == 0)) || + gdb_tid_to_handle(gdb_dbg_tid) == PsGetThreadId((PETHREAD)(ULONG_PTR)CurrentStateChange.Thread)) + { + /* We can get it from the context of the current exception */ + ptr = ctx_to_reg(&CurrentContext, reg_name); + } + else + { + PETHREAD DbgThread; + + DbgThread = find_thread(gdb_dbg_pid, gdb_dbg_tid); + + if (DbgThread == NULL) + { + /* Thread is dead */ + return send_gdb_packet("E03"); + } + + ptr = thread_to_reg(DbgThread, reg_name); + } + + if (!ptr) + { + unsigned char size = reg_size[reg_name]; + start_gdb_packet(); + while (size--) + send_gdb_partial_packet("xx"); + return finish_gdb_packet(); + } + else + { + KDDBGPRINT("KDDBG : Sending registers as memory.\n"); + return send_gdb_memory(ptr, reg_size[reg_name]); + } +} + + diff --git a/drivers/base/kdgdb/gdb_input.c b/drivers/base/kdgdb/gdb_input.c index 3b898c46829..23f030686d4 100644 --- a/drivers/base/kdgdb/gdb_input.c +++ b/drivers/base/kdgdb/gdb_input.c @@ -301,12 +301,6 @@ handle_gdb_query(void) return gdb_send_debug_io(&String, FALSE); } - if (strncmp(gdb_input, "qOffsets", 8) == 0) - { - /* We load ntoskrnl at 0x80800000 while compiling it at 0x00800000 base address */ - return send_gdb_packet("TextSeg=80000000"); - } - if (strcmp(gdb_input, "qTStatus") == 0) { /* No tracepoint support */ @@ -323,7 +317,7 @@ handle_gdb_query(void) { static LIST_ENTRY* CurrentEntry = NULL; char str_helper[256]; - char name_helper[64]; + char name_helper[64]; ULONG_PTR Offset = hex_to_address(&gdb_input[22]); ULONG_PTR ToSend = hex_to_address(strstr(&gdb_input[22], ",") + 1); ULONG Sent = 0; @@ -381,7 +375,7 @@ handle_gdb_query(void) /* GDB doesn't load the file if you don't prefix it with a drive letter... */ mem_length = _snprintf(str_helper, 256, "<library name=\"C:\\%s\"><segment address=\"0x%p\"/></library>", &name_helper, DllBase); - + /* DLL name must be too long. */ if (mem_length < 0) { @@ -639,7 +633,7 @@ handle_gdb_write_mem( /* Nothing to do */ return LOOP_IF_SUCCESS(send_gdb_packet("OK")); } - + State->u.WriteMemory.TransferCount = BufferLength; MessageData->Length = BufferLength; MessageData->Buffer = (CHAR*)OutBuffer; @@ -794,7 +788,7 @@ RestoreBreakPointSendHandler( KDDBGPRINT("Wrong API number (%lu) after DbgKdRestoreBreakPointApi request.\n", State->ApiNumber); } - /* We ignore failure here. If DbgKdRestoreBreakPointApi fails, + /* We ignore failure here. If DbgKdRestoreBreakPointApi fails, * this means that the breakpoint was already invalid for KD. So clean it up on our side. */ for (i = 0; i < (sizeof(BreakPointHandles) / sizeof(BreakPointHandles[0])); i++) { @@ -879,7 +873,7 @@ handle_gdb_c( Status = send_gdb_packet("OK"); if (Status != KdPacketReceived) return Status; - + if (CurrentStateChange.NewState == DbgKdExceptionStateChange) { @@ -967,7 +961,7 @@ handle_gdb_v( if (strncmp(gdb_input, "vCont;s", 7) == 0) { - + return handle_gdb_s(State, MessageData, MessageLength, KdContext); } } diff --git a/drivers/base/kdgdb/kdgdb.h b/drivers/base/kdgdb/kdgdb.h index d09ef74593b..a260e570319 100644 --- a/drivers/base/kdgdb/kdgdb.h +++ b/drivers/base/kdgdb/kdgdb.h @@ -19,7 +19,7 @@ #include <pstypes.h> -// #define KDDEBUG /* uncomment to enable debugging this dll */ +#define KDDEBUG /* uncomment to enable debugging this dll */ /* To undefine once
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
is resolved */ #define MONOPROCESS 1 @@ -132,6 +132,17 @@ extern KDSTATUS gdb_send_registers(void); # define KD_BREAKPOINT_SIZE sizeof(UCHAR) # define KD_BREAKPOINT_VALUE 0xCC /* Single step mode */ +# define KdpSetSingleStep(Context) \ + ((Context)->EFlags |= EFLAGS_TF) +#elif defined(_M_AMD64) +# define KdpGetContextPc(Context) \ + ((Context)->Rip) +# define KdpSetContextPc(Context, ProgramCounter) \ + ((Context)->Rip = (ProgramCounter)) +# define KD_BREAKPOINT_TYPE UCHAR +# define KD_BREAKPOINT_SIZE sizeof(UCHAR) +# define KD_BREAKPOINT_VALUE 0xCC +/* Single step mode */ # define KdpSetSingleStep(Context) \ ((Context)->EFlags |= EFLAGS_TF) #else
3 years, 8 months
1
0
0
0
[reactos] 13/29: [REGEDIT] Fix declaration of DbgPrint
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=97858f3c87caacb9718ac…
commit 97858f3c87caacb9718ac7df6b7f1619b010a063 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Wed Apr 14 10:07:16 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Apr 28 13:10:23 2021 +0200 [REGEDIT] Fix declaration of DbgPrint --- base/applications/regedit/settings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/applications/regedit/settings.c b/base/applications/regedit/settings.c index 5d82a64625b..ae9254d6a2f 100644 --- a/base/applications/regedit/settings.c +++ b/base/applications/regedit/settings.c @@ -23,9 +23,9 @@ #include <strsafe.h> const WCHAR g_szGeneralRegKey[] = L"Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit"; -DECLSPEC_IMPORT ULONG WINAPIV DbgPrint(PCH Format,...); +DECLSPEC_IMPORT ULONG WINAPIV DbgPrint(PCCH Format,...); -/* +/* VV,VV,VV,VV,WA,WA,WA,WA,WB,WB,WB,WB,R1,R1,R1,R1 R2,R2,R2,R2,R3,R3,R3,R3,R4,R4,R4,r4,LL,LL,LL,LL TT,TT,TT,TT,RR,RR,RR,RR,BB,BB,BB,BB,SS,SS,SS,SS
3 years, 8 months
1
0
0
0
[reactos] 12/29: [CRT] Fix __ll_lshift, __ll_rshift and __ull_rshift intrinsics on gcc-amd64
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=955b5c27b19c813580070…
commit 955b5c27b19c81358007003b076e60079a2e2e84 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Tue Apr 13 10:45:10 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Apr 28 13:10:23 2021 +0200 [CRT] Fix __ll_lshift, __ll_rshift and __ull_rshift intrinsics on gcc-amd64 --- sdk/include/crt/mingw32/intrin_x86.h | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/sdk/include/crt/mingw32/intrin_x86.h b/sdk/include/crt/mingw32/intrin_x86.h index c772338d3fa..5cf6c2884b3 100644 --- a/sdk/include/crt/mingw32/intrin_x86.h +++ b/sdk/include/crt/mingw32/intrin_x86.h @@ -1298,6 +1298,46 @@ __INTRIN_INLINE unsigned long __cdecl _lrotr(unsigned long value, int shift) } #endif +#ifdef __x86_64__ +__INTRIN_INLINE unsigned long long __ll_lshift(unsigned long long Mask, int Bit) +{ + unsigned long long retval; + unsigned char shift = Bit & 0x3F; + + __asm__ + ( + "shlq %[shift], %[Mask]" : "=r"(retval) : [Mask] "0"(Mask), [shift] "c"(shift) + ); + + return retval; +} + +__INTRIN_INLINE long long __ll_rshift(long long Mask, int Bit) +{ + long long retval; + unsigned char shift = Bit & 0x3F; + + __asm__ + ( + "sarq %[shift], %[Mask]" : "=r"(retval) : [Mask] "0"(Mask), [shift] "c"(shift) + ); + + return retval; +} + +__INTRIN_INLINE unsigned long long __ull_rshift(unsigned long long Mask, int Bit) +{ + long long retval; + unsigned char shift = Bit & 0x3F; + + __asm__ + ( + "shrq %[shift], %[Mask]" : "=r"(retval) : [Mask] "0"(Mask), [shift] "c"(shift) + ); + + return retval; +} +#else /* NOTE: in __ll_lshift, __ll_rshift and __ull_rshift we use the "A" constraint (edx:eax) for the Mask argument, because it's the only way GCC @@ -1346,6 +1386,7 @@ __INTRIN_INLINE unsigned long long __ull_rshift(unsigned long long Mask, int Bit return retval; } +#endif __INTRIN_INLINE unsigned short __cdecl _byteswap_ushort(unsigned short value) {
3 years, 8 months
1
0
0
0
[reactos] 11/29: [CMAKE:GCC] Enforce file alignment on driver & kernel images
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=97a8953538ac48240f0f9…
commit 97a8953538ac48240f0f9c4b102c9ecbfbac7c1d Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Mon Apr 12 19:59:52 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Apr 28 13:10:23 2021 +0200 [CMAKE:GCC] Enforce file alignment on driver & kernel images --- sdk/cmake/init-section.lds | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/cmake/init-section.lds b/sdk/cmake/init-section.lds index a40433ae91b..51f8299dbd0 100644 --- a/sdk/cmake/init-section.lds +++ b/sdk/cmake/init-section.lds @@ -1,13 +1,13 @@ /* Make sure the INIT & .rsrc sections are at the end of the module so we can reclaim the space */ SECTIONS { - INIT BLOCK(__section_alignment__) : + INIT BLOCK(__section_alignment__) : ALIGN(__file_alignment__) { __init_start__ = . ; *(INIT) __init_end__ = . ; } - .rsrc BLOCK(__section_alignment__) : + .rsrc BLOCK(__section_alignment__) : ALIGN(__file_alignment__) { __rsrc_start__ = . ; *(.rsrc)
3 years, 8 months
1
0
0
0
[reactos] 10/29: [NDK] Add some missing defines for EFLAGS on amd64
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=382426f02e86c464af43a…
commit 382426f02e86c464af43adde080bf0a0e99e73f0 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Mon Apr 12 15:51:33 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Apr 28 13:10:23 2021 +0200 [NDK] Add some missing defines for EFLAGS on amd64 --- sdk/include/ndk/amd64/ketypes.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/include/ndk/amd64/ketypes.h b/sdk/include/ndk/amd64/ketypes.h index c989b4be0ca..cd2083e20e3 100644 --- a/sdk/include/ndk/amd64/ketypes.h +++ b/sdk/include/ndk/amd64/ketypes.h @@ -125,11 +125,15 @@ typedef enum #define EFLAGS_TF 0x100L #define EFLAGS_INTERRUPT_MASK 0x200L #define EFLAGS_DF 0x400L +#define EFLAGS_IOPL 0x3000L #define EFLAGS_NESTED_TASK 0x4000L +//#define EFLAGS_NF 0x4000 +#define EFLAGS_RF 0x10000 #define EFLAGS_V86_MASK 0x20000 #define EFLAGS_ALIGN_CHECK 0x40000 #define EFLAGS_VIF 0x80000 #define EFLAGS_VIP 0x100000 +#define EFLAGS_ID 0x200000 #define EFLAGS_USER_SANITIZE 0x3F4DD7 #define EFLAG_SIGN 0x8000 #define EFLAG_ZERO 0x4000
3 years, 8 months
1
0
0
0
[reactos] 09/29: [NTOS] Do not force-align an integer value
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=662774bca3ab4e0d3fb48…
commit 662774bca3ab4e0d3fb484074bad4cfb50a530f6 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Mon Apr 12 14:17:14 2021 +0200 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Apr 28 13:10:23 2021 +0200 [NTOS] Do not force-align an integer value --- ntoskrnl/include/internal/io.h | 2 +- ntoskrnl/io/pnpmgr/pnpirp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ntoskrnl/include/internal/io.h b/ntoskrnl/include/internal/io.h index e43f4769c94..12f9ebea0bc 100644 --- a/ntoskrnl/include/internal/io.h +++ b/ntoskrnl/include/internal/io.h @@ -1389,7 +1389,7 @@ PiIrpQueryDeviceRelations( NTSTATUS PiIrpQueryDeviceText( _In_ PDEVICE_NODE DeviceNode, - _In_ LCID POINTER_ALIGNMENT LocaleId, + _In_ LCID LocaleId, _In_ DEVICE_TEXT_TYPE Type, _Out_ PWSTR *DeviceText); diff --git a/ntoskrnl/io/pnpmgr/pnpirp.c b/ntoskrnl/io/pnpmgr/pnpirp.c index 48d924d6c7c..66e4382bdc6 100644 --- a/ntoskrnl/io/pnpmgr/pnpirp.c +++ b/ntoskrnl/io/pnpmgr/pnpirp.c @@ -200,7 +200,7 @@ PiIrpQueryDeviceRelations( NTSTATUS PiIrpQueryDeviceText( _In_ PDEVICE_NODE DeviceNode, - _In_ LCID POINTER_ALIGNMENT LocaleId, + _In_ LCID LocaleId, _In_ DEVICE_TEXT_TYPE Type, _Out_ PWSTR *DeviceText) { @@ -236,7 +236,7 @@ PiIrpQueryPnPDeviceState( PAGED_CODE(); ASSERT(DeviceNode); - ASSERT(DeviceNode->State == DeviceNodeStartPostWork || + ASSERT(DeviceNode->State == DeviceNodeStartPostWork || DeviceNode->State == DeviceNodeStarted); ULONG_PTR longState;
3 years, 8 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
18
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Results per page:
10
25
50
100
200