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
8d0cb61b
Commit
8d0cb61b
authored
Jun 05, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Add wrappers for Read/WriteProcessMemory to fix the mingw build.
parent
84ccadee
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
18 deletions
+47
-18
debugger.h
programs/winedbg/debugger.h
+3
-3
gdbproxy.c
programs/winedbg/gdbproxy.c
+14
-2
tgt_active.c
programs/winedbg/tgt_active.c
+20
-3
tgt_minidump.c
programs/winedbg/tgt_minidump.c
+5
-5
tgt_module.c
programs/winedbg/tgt_module.c
+5
-5
No files found.
programs/winedbg/debugger.h
View file @
8d0cb61b
...
@@ -237,9 +237,9 @@ struct dbg_process
...
@@ -237,9 +237,9 @@ struct dbg_process
struct
be_process_io
struct
be_process_io
{
{
BOOL
(
*
close_process
)(
struct
dbg_process
*
,
BOOL
);
BOOL
(
*
close_process
)(
struct
dbg_process
*
,
BOOL
);
BOOL
(
WINAPI
*
read
)(
HANDLE
,
const
void
*
,
void
*
,
SIZE_T
,
SIZE_T
*
);
BOOL
(
*
read
)(
HANDLE
,
const
void
*
,
void
*
,
SIZE_T
,
SIZE_T
*
);
BOOL
(
WINAPI
*
write
)(
HANDLE
,
void
*
,
const
void
*
,
SIZE_T
,
SIZE_T
*
);
BOOL
(
*
write
)(
HANDLE
,
void
*
,
const
void
*
,
SIZE_T
,
SIZE_T
*
);
BOOL
(
WINAPI
*
get_selector
)(
HANDLE
,
DWORD
,
LDT_ENTRY
*
);
BOOL
(
*
get_selector
)(
HANDLE
,
DWORD
,
LDT_ENTRY
*
);
};
};
extern
struct
dbg_process
*
dbg_curr_process
;
extern
struct
dbg_process
*
dbg_curr_process
;
...
...
programs/winedbg/gdbproxy.c
View file @
8d0cb61b
...
@@ -111,11 +111,23 @@ struct gdb_context
...
@@ -111,11 +111,23 @@ struct gdb_context
unsigned
long
wine_segs
[
3
];
/* load addresses of the ELF wine exec segments (text, bss and data) */
unsigned
long
wine_segs
[
3
];
/* load addresses of the ELF wine exec segments (text, bss and data) */
};
};
static
BOOL
tgt_process_gdbproxy_read
(
HANDLE
hProcess
,
const
void
*
addr
,
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
rlen
)
{
return
ReadProcessMemory
(
hProcess
,
addr
,
buffer
,
len
,
rlen
);
}
static
BOOL
tgt_process_gdbproxy_write
(
HANDLE
hProcess
,
void
*
addr
,
const
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
wlen
)
{
return
WriteProcessMemory
(
hProcess
,
addr
,
buffer
,
len
,
wlen
);
}
static
struct
be_process_io
be_process_gdbproxy_io
=
static
struct
be_process_io
be_process_gdbproxy_io
=
{
{
NULL
,
/* we shouldn't use close_process() in gdbproxy */
NULL
,
/* we shouldn't use close_process() in gdbproxy */
ReadProcessMemory
,
tgt_process_gdbproxy_read
,
WriteProcessMemory
tgt_process_gdbproxy_write
};
};
/* =============================================== *
/* =============================================== *
...
...
programs/winedbg/tgt_active.c
View file @
8d0cb61b
...
@@ -1004,10 +1004,27 @@ static BOOL tgt_process_active_close_process(struct dbg_process* pcs, BOOL kill)
...
@@ -1004,10 +1004,27 @@ static BOOL tgt_process_active_close_process(struct dbg_process* pcs, BOOL kill)
return
TRUE
;
return
TRUE
;
}
}
static
BOOL
tgt_process_active_read
(
HANDLE
hProcess
,
const
void
*
addr
,
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
rlen
)
{
return
ReadProcessMemory
(
hProcess
,
addr
,
buffer
,
len
,
rlen
);
}
static
BOOL
tgt_process_active_write
(
HANDLE
hProcess
,
void
*
addr
,
const
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
wlen
)
{
return
WriteProcessMemory
(
hProcess
,
addr
,
buffer
,
len
,
wlen
);
}
static
BOOL
tgt_process_active_get_selector
(
HANDLE
hThread
,
DWORD
sel
,
LDT_ENTRY
*
le
)
{
return
GetThreadSelectorEntry
(
hThread
,
sel
,
le
);
}
static
struct
be_process_io
be_process_active_io
=
static
struct
be_process_io
be_process_active_io
=
{
{
tgt_process_active_close_process
,
tgt_process_active_close_process
,
ReadProcessMemory
,
tgt_process_active_read
,
WriteProcessMemory
,
tgt_process_active_write
,
GetThreadSelectorEntry
,
tgt_process_active_get_selector
};
};
programs/winedbg/tgt_minidump.c
View file @
8d0cb61b
...
@@ -84,8 +84,8 @@ static inline struct tgt_process_minidump_data* private_data(struct dbg_process*
...
@@ -84,8 +84,8 @@ static inline struct tgt_process_minidump_data* private_data(struct dbg_process*
return
pcs
->
pio_data
;
return
pcs
->
pio_data
;
}
}
static
BOOL
WINAPI
tgt_process_minidump_read
(
HANDLE
hProcess
,
const
void
*
addr
,
static
BOOL
tgt_process_minidump_read
(
HANDLE
hProcess
,
const
void
*
addr
,
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
rlen
)
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
rlen
)
{
{
void
*
stream
;
void
*
stream
;
...
@@ -125,8 +125,8 @@ static BOOL WINAPI tgt_process_minidump_read(HANDLE hProcess, const void* addr,
...
@@ -125,8 +125,8 @@ static BOOL WINAPI tgt_process_minidump_read(HANDLE hProcess, const void* addr,
return
FALSE
;
return
FALSE
;
}
}
static
BOOL
WINAPI
tgt_process_minidump_write
(
HANDLE
hProcess
,
void
*
addr
,
static
BOOL
tgt_process_minidump_write
(
HANDLE
hProcess
,
void
*
addr
,
const
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
wlen
)
const
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
wlen
)
{
{
return
FALSE
;
return
FALSE
;
}
}
...
@@ -447,7 +447,7 @@ static BOOL tgt_process_minidump_close_process(struct dbg_process* pcs, BOOL kil
...
@@ -447,7 +447,7 @@ static BOOL tgt_process_minidump_close_process(struct dbg_process* pcs, BOOL kil
return
TRUE
;
return
TRUE
;
}
}
static
BOOL
WINAPI
tgt_process_minidump_get_selector
(
HANDLE
hThread
,
DWORD
sel
,
LDT_ENTRY
*
le
)
static
BOOL
tgt_process_minidump_get_selector
(
HANDLE
hThread
,
DWORD
sel
,
LDT_ENTRY
*
le
)
{
{
/* so far, pretend all selectors are valid, and mapped to a 32bit flat address space */
/* so far, pretend all selectors are valid, and mapped to a 32bit flat address space */
memset
(
le
,
0
,
sizeof
(
*
le
));
memset
(
le
,
0
,
sizeof
(
*
le
));
...
...
programs/winedbg/tgt_module.c
View file @
8d0cb61b
...
@@ -33,14 +33,14 @@
...
@@ -33,14 +33,14 @@
static
struct
be_process_io
be_process_module_io
;
static
struct
be_process_io
be_process_module_io
;
static
BOOL
WINAPI
tgt_process_module_read
(
HANDLE
hProcess
,
const
void
*
addr
,
static
BOOL
tgt_process_module_read
(
HANDLE
hProcess
,
const
void
*
addr
,
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
rlen
)
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
rlen
)
{
{
return
FALSE
;
return
FALSE
;
}
}
static
BOOL
WINAPI
tgt_process_module_write
(
HANDLE
hProcess
,
void
*
addr
,
static
BOOL
tgt_process_module_write
(
HANDLE
hProcess
,
void
*
addr
,
const
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
wlen
)
const
void
*
buffer
,
SIZE_T
len
,
SIZE_T
*
wlen
)
{
{
return
FALSE
;
return
FALSE
;
}
}
...
@@ -102,7 +102,7 @@ static BOOL tgt_process_module_close_process(struct dbg_process* pcs, BOOL kill)
...
@@ -102,7 +102,7 @@ static BOOL tgt_process_module_close_process(struct dbg_process* pcs, BOOL kill)
return
TRUE
;
return
TRUE
;
}
}
static
BOOL
WINAPI
tgt_process_module_get_selector
(
HANDLE
hThread
,
DWORD
sel
,
LDT_ENTRY
*
le
)
static
BOOL
tgt_process_module_get_selector
(
HANDLE
hThread
,
DWORD
sel
,
LDT_ENTRY
*
le
)
{
{
return
FALSE
;
return
FALSE
;
}
}
...
...
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