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
69869758
Commit
69869758
authored
Aug 30, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Sep 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Search default debuggee dir for symbol information.
parent
07baf690
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
4 deletions
+44
-4
debugger.h
programs/winedbg/debugger.h
+1
-0
gdbproxy.c
programs/winedbg/gdbproxy.c
+1
-1
tgt_active.c
programs/winedbg/tgt_active.c
+1
-1
tgt_minidump.c
programs/winedbg/tgt_minidump.c
+1
-1
tgt_module.c
programs/winedbg/tgt_module.c
+1
-1
winedbg.c
programs/winedbg/winedbg.c
+39
-0
No files found.
programs/winedbg/debugger.h
View file @
69869758
...
...
@@ -446,6 +446,7 @@ extern void dbg_del_process(struct dbg_process* p);
struct
dbg_thread
*
dbg_add_thread
(
struct
dbg_process
*
p
,
DWORD
tid
,
HANDLE
h
,
void
*
teb
);
extern
struct
dbg_thread
*
dbg_get_thread
(
struct
dbg_process
*
p
,
DWORD
tid
);
extern
void
dbg_del_thread
(
struct
dbg_thread
*
t
);
extern
BOOL
dbg_init
(
HANDLE
hProc
,
const
char
*
in
,
BOOL
invade
);
extern
BOOL
dbg_get_debuggee_info
(
HANDLE
hProcess
,
IMAGEHLP_MODULE
*
imh_mod
);
/* gdbproxy.c */
...
...
programs/winedbg/gdbproxy.c
View file @
69869758
...
...
@@ -505,7 +505,7 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
de
->
u
.
CreateProcessInfo
.
nDebugInfoSize
);
/* de->u.CreateProcessInfo.lpStartAddress; */
if
(
!
SymInitialize
(
gdbctx
->
process
->
handle
,
NULL
,
TRUE
))
if
(
!
dbg_init
(
gdbctx
->
process
->
handle
,
buffer
,
TRUE
))
fprintf
(
stderr
,
"Couldn't initiate DbgHelp
\n
"
);
if
(
gdbctx
->
trace
&
GDBPXY_TRC_WIN32_EVENT
)
...
...
programs/winedbg/tgt_active.c
View file @
69869758
...
...
@@ -509,7 +509,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
de
->
u
.
CreateProcessInfo
.
nDebugInfoSize
);
dbg_set_process_name
(
dbg_curr_process
,
buffer
);
if
(
!
SymInitialize
(
dbg_curr_process
->
handle
,
NULL
,
FALSE
))
if
(
!
dbg_init
(
dbg_curr_process
->
handle
,
buffer
,
FALSE
))
dbg_printf
(
"Couldn't initiate DbgHelp
\n
"
);
if
(
!
SymLoadModule
(
dbg_curr_process
->
handle
,
de
->
u
.
CreateProcessInfo
.
hFile
,
buffer
,
NULL
,
(
unsigned
long
)
de
->
u
.
CreateProcessInfo
.
lpBaseOfImage
,
0
))
...
...
programs/winedbg/tgt_minidump.c
View file @
69869758
...
...
@@ -304,7 +304,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
dbg_curr_process
->
pio_data
=
data
;
dbg_set_process_name
(
dbg_curr_process
,
exec_name
);
SymInitialize
(
hProc
,
NULL
,
FALSE
);
dbg_init
(
hProc
,
NULL
,
FALSE
);
if
(
MiniDumpReadDumpStream
(
data
->
mapping
,
ThreadListStream
,
&
dir
,
&
stream
,
&
size
))
{
...
...
programs/winedbg/tgt_module.c
View file @
69869758
...
...
@@ -55,7 +55,7 @@ enum dbg_start tgt_module_load(const char* name, BOOL keep)
SymSetOptions
((
opts
&
~
(
SYMOPT_UNDNAME
|
SYMOPT_DEFERRED_LOADS
))
|
SYMOPT_LOAD_LINES
|
SYMOPT_AUTO_PUBLICS
|
0x40000000
);
if
(
!
SymInitialize
(
hDummy
,
NULL
,
FALSE
))
if
(
!
dbg_init
(
hDummy
,
NULL
,
FALSE
))
return
start_error_init
;
if
(
!
SymLoadModule
(
hDummy
,
NULL
,
name
,
NULL
,
0
,
0
))
{
...
...
programs/winedbg/winedbg.c
View file @
69869758
...
...
@@ -346,6 +346,45 @@ void dbg_del_process(struct dbg_process* p)
HeapFree
(
GetProcessHeap
(),
0
,
p
);
}
/******************************************************************
* dbg_init
*
* Initializes the dbghelp library, and also sets the application directory
* as a place holder for symbol searches.
*/
BOOL
dbg_init
(
HANDLE
hProc
,
const
char
*
in
,
BOOL
invade
)
{
BOOL
ret
;
ret
=
SymInitialize
(
hProc
,
NULL
,
invade
);
if
(
ret
&&
in
)
{
const
char
*
last
;
for
(
last
=
in
+
strlen
(
in
)
-
1
;
last
>=
in
;
last
--
)
{
if
(
*
last
==
'/'
||
*
last
==
'\\'
)
{
char
*
tmp
;
tmp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
1024
+
1
+
(
last
-
in
)
+
1
);
if
(
tmp
&&
SymGetSearchPath
(
hProc
,
tmp
,
1024
))
{
char
*
x
=
tmp
+
strlen
(
tmp
);
*
x
++
=
';'
;
memcpy
(
x
,
in
,
last
-
in
);
x
[
last
-
in
]
=
'\0'
;
ret
=
SymSetSearchPath
(
hProc
,
tmp
);
}
else
ret
=
FALSE
;
HeapFree
(
GetProcessHeap
(),
0
,
tmp
);
break
;
}
}
}
return
ret
;
}
struct
mod_loader_info
{
HANDLE
handle
;
...
...
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