Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7694da86
Commit
7694da86
authored
Feb 21, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 22, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Some enhancements by using Unicode flavors.
parent
c0fa60f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
23 deletions
+19
-23
tgt_minidump.c
programs/winedbg/tgt_minidump.c
+19
-23
No files found.
programs/winedbg/tgt_minidump.c
View file @
7694da86
...
...
@@ -132,7 +132,7 @@ static BOOL WINAPI tgt_process_minidump_write(HANDLE hProcess, void* addr,
return
FALSE
;
}
BOOL
CALLBACK
validate_file
(
PSTR
name
,
void
*
user
)
BOOL
CALLBACK
validate_file
(
P
CW
STR
name
,
void
*
user
)
{
return
FALSE
;
/* get the first file we find !! */
}
...
...
@@ -149,7 +149,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
MINIDUMP_MODULE
*
mm
;
MINIDUMP_STRING
*
mds
;
char
exec_name
[
1024
];
char
name
[
1024
];
WCHAR
nameW
[
1024
];
unsigned
len
;
/* fetch PID */
...
...
@@ -173,17 +173,16 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
mds
=
(
MINIDUMP_STRING
*
)((
char
*
)
data
->
mapping
+
mm
->
ModuleNameRva
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
mds
->
Buffer
,
mds
->
Length
/
sizeof
(
WCHAR
),
name
,
sizeof
(
name
)
-
1
,
NULL
,
NULL
);
name
[
len
]
=
0
;
for
(
ptr
=
name
+
len
-
1
;
ptr
>=
name
;
ptr
--
)
exec_name
,
sizeof
(
exec_
name
)
-
1
,
NULL
,
NULL
);
exec_
name
[
len
]
=
0
;
for
(
ptr
=
exec_name
+
len
-
1
;
ptr
>=
exec_
name
;
ptr
--
)
{
if
(
*
ptr
==
'/'
||
*
ptr
==
'\\'
)
{
strcpy
(
exec_name
,
ptr
+
1
);
memmove
(
exec_name
,
ptr
+
1
,
strlen
(
ptr
+
1
)
+
1
);
break
;
}
}
if
(
ptr
<
name
)
strcpy
(
exec_name
,
name
);
}
}
...
...
@@ -294,22 +293,21 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
if
(
MiniDumpReadDumpStream
(
data
->
mapping
,
Wine_ElfModuleListStream
,
&
dir
,
&
stream
,
&
size
))
{
char
buffer
[
MAX_PATH
];
WCHAR
buffer
[
MAX_PATH
];
mml
=
(
MINIDUMP_MODULE_LIST
*
)
stream
;
for
(
i
=
0
,
mm
=
&
mml
->
Modules
[
0
];
i
<
mml
->
NumberOfModules
;
i
++
,
mm
++
)
{
mds
=
(
MINIDUMP_STRING
*
)((
char
*
)
data
->
mapping
+
mm
->
ModuleNameRva
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
mds
->
Buffer
,
mds
->
Length
/
sizeof
(
WCHAR
),
name
,
sizeof
(
name
)
-
1
,
NULL
,
NULL
);
name
[
len
]
=
0
;
if
(
SymFindFileInPath
(
hProc
,
NULL
,
name
,
(
void
*
)(
DWORD_PTR
)
mm
->
CheckSum
,
0
,
0
,
SSRVOPT_DWORD
,
buffer
,
validate_file
,
NULL
))
SymLoadModule
(
hProc
,
NULL
,
buffer
,
NULL
,
mm
->
BaseOfImage
,
mm
->
SizeOfImage
);
memcpy
(
nameW
,
mds
->
Buffer
,
mds
->
Length
);
nameW
[
mds
->
Length
/
sizeof
(
WCHAR
)]
=
0
;
if
(
SymFindFileInPathW
(
hProc
,
NULL
,
nameW
,
(
void
*
)(
DWORD_PTR
)
mm
->
CheckSum
,
0
,
0
,
SSRVOPT_DWORD
,
buffer
,
validate_file
,
NULL
))
SymLoadModuleExW
(
hProc
,
NULL
,
buffer
,
NULL
,
mm
->
BaseOfImage
,
mm
->
SizeOfImage
,
NULL
,
0
);
else
SymLoadModuleEx
(
hProc
,
NULL
,
name
,
NULL
,
mm
->
BaseOfImage
,
mm
->
SizeOfImage
,
NULL
,
SLMFLAG_VIRTUAL
);
SymLoadModuleEx
W
(
hProc
,
NULL
,
nameW
,
NULL
,
mm
->
BaseOfImage
,
mm
->
SizeOfImage
,
NULL
,
SLMFLAG_VIRTUAL
);
}
}
if
(
MiniDumpReadDumpStream
(
data
->
mapping
,
ModuleListStream
,
&
dir
,
&
stream
,
&
size
))
...
...
@@ -318,12 +316,10 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
for
(
i
=
0
,
mm
=
&
mml
->
Modules
[
0
];
i
<
mml
->
NumberOfModules
;
i
++
,
mm
++
)
{
mds
=
(
MINIDUMP_STRING
*
)((
char
*
)
data
->
mapping
+
mm
->
ModuleNameRva
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
mds
->
Buffer
,
mds
->
Length
/
sizeof
(
WCHAR
),
name
,
sizeof
(
name
)
-
1
,
NULL
,
NULL
);
name
[
len
]
=
0
;
SymLoadModule
(
hProc
,
NULL
,
name
,
NULL
,
mm
->
BaseOfImage
,
mm
->
SizeOfImage
);
memcpy
(
nameW
,
mds
->
Buffer
,
mds
->
Length
);
nameW
[
mds
->
Length
/
sizeof
(
WCHAR
)]
=
0
;
SymLoadModuleExW
(
hProc
,
NULL
,
nameW
,
NULL
,
mm
->
BaseOfImage
,
mm
->
SizeOfImage
,
NULL
,
0
);
}
}
if
(
MiniDumpReadDumpStream
(
data
->
mapping
,
ExceptionStream
,
&
dir
,
&
stream
,
&
size
))
...
...
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