Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6085ab88
Commit
6085ab88
authored
Jan 23, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use a .seh handler for the process breakpoint.
parent
1414adfa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
26 deletions
+48
-26
signal_arm.c
dlls/ntdll/signal_arm.c
+14
-0
signal_arm64.c
dlls/ntdll/signal_arm64.c
+11
-13
signal_arm64ec.c
dlls/ntdll/signal_arm64ec.c
+11
-13
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+12
-0
No files found.
dlls/ntdll/signal_arm.c
View file @
6085ab88
...
...
@@ -1619,6 +1619,19 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unk2, ULONG_PTR unk3
/***********************************************************************
* process_breakpoint
*/
#ifdef __WINE_PE_BUILD
__ASM_GLOBAL_FUNC
(
process_breakpoint
,
".seh_endprologue
\n\t
"
".seh_handler process_breakpoint_handler, %except
\n\t
"
"udf #0xfe
\n\t
"
"bx lr
\n
"
"process_breakpoint_handler:
\n\t
"
"ldr r0, [r2, #0x40]
\n\t
"
/* context->Pc */
"add r0, r0, #2
\n\t
"
"str r0, [r2, #0x40]
\n\t
"
"mov r0, #0
\n\t
"
/* ExceptionContinueExecution */
"bx lr"
)
#else
void
WINAPI
process_breakpoint
(
void
)
{
__TRY
...
...
@@ -1631,6 +1644,7 @@ void WINAPI process_breakpoint(void)
}
__ENDTRY
}
#endif
/**********************************************************************
* DbgBreakPoint (NTDLL.@)
...
...
dlls/ntdll/signal_arm64.c
View file @
6085ab88
...
...
@@ -1589,19 +1589,17 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unk2, ULONG_PTR unk3
/***********************************************************************
* process_breakpoint
*/
void
WINAPI
process_breakpoint
(
void
)
{
__TRY
{
DbgBreakPoint
();
}
__EXCEPT_ALL
{
/* do nothing */
}
__ENDTRY
}
__ASM_GLOBAL_FUNC
(
process_breakpoint
,
".seh_endprologue
\n\t
"
".seh_handler process_breakpoint_handler, @except
\n\t
"
"brk #0xf000
\n\t
"
"ret
\n
"
"process_breakpoint_handler:
\n\t
"
"ldr x4, [x2, #0x108]
\n\t
"
/* context->Pc */
"add x4, x4, #4
\n\t
"
"str x4, [x2, #0x108]
\n\t
"
"mov w0, #0
\n\t
"
/* ExceptionContinueExecution */
"ret"
)
/**********************************************************************
* DbgBreakPoint (NTDLL.@)
...
...
dlls/ntdll/signal_arm64ec.c
View file @
6085ab88
...
...
@@ -2004,19 +2004,17 @@ void WINAPI LdrInitializeThunk( CONTEXT *arm_context, ULONG_PTR unk2, ULONG_PTR
/***********************************************************************
* process_breakpoint
*/
void
WINAPI
process_breakpoint
(
void
)
{
__TRY
{
DbgBreakPoint
();
}
__EXCEPT_ALL
{
/* do nothing */
}
__ENDTRY
}
__ASM_GLOBAL_FUNC
(
"#process_breakpoint"
,
".seh_endprologue
\n\t
"
".seh_handler process_breakpoint_handler, @except
\n\t
"
"brk #0xf000
\n\t
"
"ret
\n
"
"process_breakpoint_handler:
\n\t
"
"ldr x4, [x2, #0x108]
\n\t
"
/* context->Pc */
"add x4, x4, #4
\n\t
"
"str x4, [x2, #0x108]
\n\t
"
"mov w0, #0
\n\t
"
/* ExceptionContinueExecution */
"ret"
)
/**********************************************************************
* DbgBreakPoint (NTDLL.@)
...
...
dlls/ntdll/signal_x86_64.c
View file @
6085ab88
...
...
@@ -1728,6 +1728,17 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unk2, ULONG_PTR unk3
/***********************************************************************
* process_breakpoint
*/
#ifdef __WINE_PE_BUILD
__ASM_GLOBAL_FUNC
(
process_breakpoint
,
".seh_endprologue
\n\t
"
".seh_handler process_breakpoint_handler, @except
\n\t
"
"int $3
\n\t
"
"ret
\n
"
"process_breakpoint_handler:
\n\t
"
"incq 0xf8(%r8)
\n\t
"
/* context->Rip */
"xorl %eax,%eax
\n\t
"
/* ExceptionContinueExecution */
"ret"
)
#else
void
WINAPI
process_breakpoint
(
void
)
{
__TRY
...
...
@@ -1740,6 +1751,7 @@ void WINAPI process_breakpoint(void)
}
__ENDTRY
}
#endif
/**********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment