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
0d16a7bb
Commit
0d16a7bb
authored
Mar 12, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some compilation issues on Mac OS X Leopard.
parent
a2808903
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
7 deletions
+50
-7
signal_i386.c
dlls/ntdll/signal_i386.c
+23
-5
mach.c
server/mach.c
+27
-2
No files found.
dlls/ntdll/signal_i386.c
View file @
0d16a7bb
...
...
@@ -243,6 +243,27 @@ typedef struct ucontext SIGCONTEXT;
typedef
ucontext_t
SIGCONTEXT
;
/* work around silly renaming of struct members in OS X 10.5 */
#if __DARWIN_UNIX03 && defined(_STRUCT_X86_EXCEPTION_STATE32)
#define EAX_sig(context) ((context)->uc_mcontext->__ss.__eax)
#define EBX_sig(context) ((context)->uc_mcontext->__ss.__ebx)
#define ECX_sig(context) ((context)->uc_mcontext->__ss.__ecx)
#define EDX_sig(context) ((context)->uc_mcontext->__ss.__edx)
#define ESI_sig(context) ((context)->uc_mcontext->__ss.__esi)
#define EDI_sig(context) ((context)->uc_mcontext->__ss.__edi)
#define EBP_sig(context) ((context)->uc_mcontext->__ss.__ebp)
#define CS_sig(context) ((context)->uc_mcontext->__ss.__cs)
#define DS_sig(context) ((context)->uc_mcontext->__ss.__ds)
#define ES_sig(context) ((context)->uc_mcontext->__ss.__es)
#define FS_sig(context) ((context)->uc_mcontext->__ss.__fs)
#define GS_sig(context) ((context)->uc_mcontext->__ss.__gs)
#define SS_sig(context) ((context)->uc_mcontext->__ss.__ss)
#define EFL_sig(context) ((context)->uc_mcontext->__ss.__eflags)
#define EIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->__ss.__eip))
#define ESP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->__ss.__esp))
#define TRAP_sig(context) ((context)->uc_mcontext->__es.__trapno)
#define ERROR_sig(context) ((context)->uc_mcontext->__es.__err)
#else
#define EAX_sig(context) ((context)->uc_mcontext->ss.eax)
#define EBX_sig(context) ((context)->uc_mcontext->ss.ebx)
#define ECX_sig(context) ((context)->uc_mcontext->ss.ecx)
...
...
@@ -250,21 +271,18 @@ typedef ucontext_t SIGCONTEXT;
#define ESI_sig(context) ((context)->uc_mcontext->ss.esi)
#define EDI_sig(context) ((context)->uc_mcontext->ss.edi)
#define EBP_sig(context) ((context)->uc_mcontext->ss.ebp)
#define CS_sig(context) ((context)->uc_mcontext->ss.cs)
#define DS_sig(context) ((context)->uc_mcontext->ss.ds)
#define ES_sig(context) ((context)->uc_mcontext->ss.es)
#define FS_sig(context) ((context)->uc_mcontext->ss.fs)
#define GS_sig(context) ((context)->uc_mcontext->ss.gs)
#define SS_sig(context) ((context)->uc_mcontext->ss.ss)
#define EFL_sig(context) ((context)->uc_mcontext->ss.eflags)
#define EIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->ss.eip))
#define ESP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->ss.esp))
#define TRAP_sig(context) ((context)->uc_mcontext->es.trapno)
#define ERROR_sig(context) ((context)->uc_mcontext->es.err)
#endif
#endif
/* __APPLE__ */
...
...
@@ -1335,7 +1353,7 @@ BOOL SIGNAL_Init(void)
struct
sigaction
sig_act
;
#ifdef HAVE_SIGALTSTACK
st
ruct
sigaltstack
ss
;
st
ack_t
ss
;
#ifdef __APPLE__
int
mib
[
2
],
val
=
1
;
...
...
server/mach.c
View file @
0d16a7bb
...
...
@@ -162,7 +162,8 @@ void finish_process_tracing( struct process *process )
/* retrieve the thread x86 registers */
void
get_thread_context
(
struct
thread
*
thread
,
CONTEXT
*
context
,
unsigned
int
flags
)
{
struct
x86_debug_state32
state
;
#ifdef __i386__
x86_debug_state32_t
state
;
mach_msg_type_number_t
count
=
sizeof
(
state
)
/
sizeof
(
int
);
mach_msg_type_name_t
type
;
mach_port_t
port
,
process_port
=
get_process_port
(
thread
->
process
);
...
...
@@ -180,21 +181,33 @@ void get_thread_context( struct thread *thread, CONTEXT *context, unsigned int f
if
(
!
thread_get_state
(
port
,
x86_DEBUG_STATE32
,
(
thread_state_t
)
&
state
,
&
count
))
{
/* work around silly renaming of struct members in OS X 10.5 */
#if __DARWIN_UNIX03 && defined(_STRUCT_X86_DEBUG_STATE32)
context
->
Dr0
=
state
.
__dr0
;
context
->
Dr1
=
state
.
__dr1
;
context
->
Dr2
=
state
.
__dr2
;
context
->
Dr3
=
state
.
__dr3
;
context
->
Dr6
=
state
.
__dr6
;
context
->
Dr7
=
state
.
__dr7
;
#else
context
->
Dr0
=
state
.
dr0
;
context
->
Dr1
=
state
.
dr1
;
context
->
Dr2
=
state
.
dr2
;
context
->
Dr3
=
state
.
dr3
;
context
->
Dr6
=
state
.
dr6
;
context
->
Dr7
=
state
.
dr7
;
#endif
context
->
ContextFlags
|=
CONTEXT_DEBUG_REGISTERS
;
}
mach_port_deallocate
(
mach_task_self
(),
port
);
#endif
}
/* set the thread x86 registers */
void
set_thread_context
(
struct
thread
*
thread
,
const
CONTEXT
*
context
,
unsigned
int
flags
)
{
struct
x86_debug_state32
state
;
#ifdef __i386__
x86_debug_state32_t
state
;
mach_msg_type_number_t
count
=
sizeof
(
state
)
/
sizeof
(
int
);
mach_msg_type_name_t
type
;
mach_port_t
port
,
process_port
=
get_process_port
(
thread
->
process
);
...
...
@@ -210,6 +223,16 @@ void set_thread_context( struct thread *thread, const CONTEXT *context, unsigned
return
;
}
#if __DARWIN_UNIX03 && defined(_STRUCT_X86_DEBUG_STATE32)
state
.
__dr0
=
context
->
Dr0
;
state
.
__dr1
=
context
->
Dr1
;
state
.
__dr2
=
context
->
Dr2
;
state
.
__dr3
=
context
->
Dr3
;
state
.
__dr4
=
0
;
state
.
__dr5
=
0
;
state
.
__dr6
=
context
->
Dr6
;
state
.
__dr7
=
context
->
Dr7
;
#else
state
.
dr0
=
context
->
Dr0
;
state
.
dr1
=
context
->
Dr1
;
state
.
dr2
=
context
->
Dr2
;
...
...
@@ -218,6 +241,7 @@ void set_thread_context( struct thread *thread, const CONTEXT *context, unsigned
state
.
dr5
=
0
;
state
.
dr6
=
context
->
Dr6
;
state
.
dr7
=
context
->
Dr7
;
#endif
if
(
!
thread_set_state
(
port
,
x86_DEBUG_STATE32
,
(
thread_state_t
)
&
state
,
count
))
{
if
(
thread
->
context
)
/* update the cached values */
...
...
@@ -231,6 +255,7 @@ void set_thread_context( struct thread *thread, const CONTEXT *context, unsigned
}
}
mach_port_deallocate
(
mach_task_self
(),
port
);
#endif
}
int
send_thread_signal
(
struct
thread
*
thread
,
int
sig
)
...
...
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