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
c918e80e
Commit
c918e80e
authored
Mar 01, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: process_io
- added ability to specify process_io at process creation/attachment time - created a process_io structure for gdbproxy
parent
f29d084c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
12 deletions
+20
-12
debugger.h
programs/winedbg/debugger.h
+2
-2
gdbproxy.c
programs/winedbg/gdbproxy.c
+10
-1
tgt_active.c
programs/winedbg/tgt_active.c
+5
-4
winedbg.c
programs/winedbg/winedbg.c
+3
-5
No files found.
programs/winedbg/debugger.h
View file @
c918e80e
...
...
@@ -375,6 +375,7 @@ extern void dbg_wait_next_exception(DWORD cont, int count, int mode)
extern
enum
dbg_start
dbg_active_attach
(
int
argc
,
char
*
argv
[]);
extern
enum
dbg_start
dbg_active_launch
(
int
argc
,
char
*
argv
[]);
extern
enum
dbg_start
dbg_active_auto
(
int
argc
,
char
*
argv
[]);
extern
BOOL
dbg_attach_debuggee
(
DWORD
pid
,
BOOL
cofe
,
BOOL
wfe
);
/* tgt_minidump.c */
extern
void
minidump_write
(
const
char
*
,
const
EXCEPTION_RECORD
*
);
...
...
@@ -401,9 +402,8 @@ extern int dbg_printf(const char* format, ...) __attribute__((format (pr
extern
int
dbg_printf
(
const
char
*
format
,
...);
#endif
extern
const
struct
dbg_internal_var
*
dbg_get_internal_var
(
const
char
*
);
extern
BOOL
dbg_attach_debuggee
(
DWORD
pid
,
BOOL
cofe
,
BOOL
wfe
);
extern
BOOL
dbg_interrupt_debuggee
(
void
);
extern
struct
dbg_process
*
dbg_add_process
(
DWORD
pid
,
HANDLE
h
);
extern
struct
dbg_process
*
dbg_add_process
(
const
struct
be_process_io
*
pio
,
DWORD
pid
,
HANDLE
h
);
extern
void
dbg_set_process_name
(
struct
dbg_process
*
p
,
const
char
*
name
);
extern
struct
dbg_process
*
dbg_get_process
(
DWORD
pid
);
extern
void
dbg_del_process
(
struct
dbg_process
*
p
);
...
...
programs/winedbg/gdbproxy.c
View file @
c918e80e
...
...
@@ -102,6 +102,8 @@ struct gdb_context
unsigned
long
wine_segs
[
3
];
/* load addresses of the ELF wine exec segments (text, bss and data) */
};
static
struct
be_process_io
be_process_gdbproxy_io
;
/* =============================================== *
* B A S I C M A N I P U L A T I O N S *
* =============================================== *
...
...
@@ -444,7 +446,7 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
switch
(
de
->
dwDebugEventCode
)
{
case
CREATE_PROCESS_DEBUG_EVENT
:
gdbctx
->
process
=
dbg_add_process
(
de
->
dwProcessId
,
gdbctx
->
process
=
dbg_add_process
(
&
be_process_gdbproxy_io
,
de
->
dwProcessId
,
de
->
u
.
CreateProcessInfo
.
hProcess
);
if
(
!
gdbctx
->
process
)
break
;
memory_get_string_indirect
(
gdbctx
->
process
,
...
...
@@ -2278,3 +2280,10 @@ int gdb_main(int argc, char* argv[])
return
gdb_remote
(
gdb_flags
);
return
-
1
;
}
static
struct
be_process_io
be_process_gdbproxy_io
=
{
NULL
,
/* we shouldn't use close_process() in gdbproxy */
ReadProcessMemory
,
WriteProcessMemory
};
programs/winedbg/tgt_active.c
View file @
c918e80e
...
...
@@ -33,6 +33,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
winedbg
);
static
char
*
dbg_last_cmd_line
;
static
struct
be_process_io
be_process_active_io
;
static
void
dbg_init_current_process
(
void
)
{
...
...
@@ -72,7 +73,7 @@ BOOL dbg_attach_debuggee(DWORD pid, BOOL cofe, BOOL wfe)
{
DEBUG_EVENT
de
;
if
(
!
(
dbg_curr_process
=
dbg_add_process
(
pid
,
0
)))
return
FALSE
;
if
(
!
(
dbg_curr_process
=
dbg_add_process
(
&
be_process_active_io
,
pid
,
0
)))
return
FALSE
;
if
(
!
DebugActiveProcess
(
pid
))
{
...
...
@@ -436,7 +437,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
break
;
case
CREATE_PROCESS_DEBUG_EVENT
:
dbg_curr_process
=
dbg_add_process
(
de
->
dwProcessId
,
dbg_curr_process
=
dbg_add_process
(
&
be_process_active_io
,
de
->
dwProcessId
,
de
->
u
.
CreateProcessInfo
.
hProcess
);
if
(
dbg_curr_process
==
NULL
)
{
...
...
@@ -698,7 +699,7 @@ static unsigned dbg_start_debuggee(LPSTR cmdLine)
return
TRUE
;
}
dbg_curr_pid
=
info
.
dwProcessId
;
if
(
!
(
dbg_curr_process
=
dbg_add_process
(
dbg_curr_pid
,
0
)))
return
FALSE
;
if
(
!
(
dbg_curr_process
=
dbg_add_process
(
&
be_process_active_io
,
dbg_curr_pid
,
0
)))
return
FALSE
;
dbg_wait_for_first_exception
();
return
TRUE
;
...
...
@@ -920,7 +921,7 @@ static BOOL tgt_process_active_close_process(struct dbg_process* pcs, BOOL kill)
return
TRUE
;
}
struct
be_process_io
be_process_active_io
=
st
atic
st
ruct
be_process_io
be_process_active_io
=
{
tgt_process_active_close_process
,
ReadProcessMemory
,
...
...
programs/winedbg/winedbg.c
View file @
c918e80e
...
...
@@ -250,11 +250,8 @@ struct dbg_process* dbg_get_process(DWORD pid)
return
p
;
}
struct
dbg_process
*
dbg_add_process
(
DWORD
pid
,
HANDLE
h
)
struct
dbg_process
*
dbg_add_process
(
const
struct
be_process_io
*
pio
,
DWORD
pid
,
HANDLE
h
)
{
/* FIXME: temporary */
extern
struct
be_process_io
be_process_active_io
;
struct
dbg_process
*
p
;
if
((
p
=
dbg_get_process
(
pid
)))
...
...
@@ -266,6 +263,7 @@ struct dbg_process* dbg_add_process(DWORD pid, HANDLE h)
else
{
p
->
handle
=
h
;
p
->
process_io
=
pio
;
p
->
imageName
=
NULL
;
}
return
p
;
...
...
@@ -274,7 +272,7 @@ struct dbg_process* dbg_add_process(DWORD pid, HANDLE h)
if
(
!
(
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
dbg_process
))))
return
NULL
;
p
->
handle
=
h
;
p
->
pid
=
pid
;
p
->
process_io
=
&
be_process_active_
io
;
p
->
process_io
=
p
io
;
p
->
imageName
=
NULL
;
p
->
threads
=
NULL
;
p
->
continue_on_first_exception
=
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