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
c1269392
Commit
c1269392
authored
Feb 21, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 22, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Move elf_fetch_file_info to Unicode.
parent
039d54a4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
22 deletions
+17
-22
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-1
elf_module.c
dlls/dbghelp/elf_module.c
+6
-3
minidump.c
dlls/dbghelp/minidump.c
+1
-3
path.c
dlls/dbghelp/path.c
+9
-15
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
c1269392
...
...
@@ -418,7 +418,7 @@ extern void* fetch_buffer(struct process* pcs, unsigned size);
#define ELF_NO_MAP ((const void*)0xffffffff)
typedef
BOOL
(
*
elf_enum_modules_cb
)(
const
WCHAR
*
,
unsigned
long
addr
,
void
*
user
);
extern
BOOL
elf_enum_modules
(
HANDLE
hProc
,
elf_enum_modules_cb
,
void
*
);
extern
BOOL
elf_fetch_file_info
(
const
char
*
name
,
DWORD
*
base
,
DWORD
*
size
,
DWORD
*
checksum
);
extern
BOOL
elf_fetch_file_info
(
const
WCHAR
*
name
,
DWORD
*
base
,
DWORD
*
size
,
DWORD
*
checksum
);
struct
elf_file_map
;
extern
BOOL
elf_load_debug_info
(
struct
module
*
module
,
struct
elf_file_map
*
fmap
);
extern
struct
module
*
...
...
dlls/dbghelp/elf_module.c
View file @
c1269392
...
...
@@ -1128,11 +1128,14 @@ BOOL elf_load_debug_info(struct module* module, struct elf_file_map* fmap)
*
* Gathers some more information for an ELF module from a given file
*/
BOOL
elf_fetch_file_info
(
const
char
*
name
,
DWORD
*
base
,
BOOL
elf_fetch_file_info
(
const
WCHAR
*
name
,
DWORD
*
base
,
DWORD
*
size
,
DWORD
*
checksum
)
{
struct
elf_file_map
fmap
;
if
(
!
elf_map_file
(
name
,
&
fmap
))
return
FALSE
;
char
tmp
[
MAX_PATH
];
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
name
,
-
1
,
tmp
,
sizeof
(
tmp
),
0
,
0
);
if
(
!
elf_map_file
(
tmp
,
&
fmap
))
return
FALSE
;
if
(
base
)
*
base
=
fmap
.
elf_start
;
*
size
=
fmap
.
elf_size
;
*
checksum
=
calc_crc32
(
&
fmap
);
...
...
@@ -1594,7 +1597,7 @@ BOOL elf_synchronize_module_list(struct process* pcs)
return
FALSE
;
}
BOOL
elf_fetch_file_info
(
const
char
*
name
,
DWORD
*
base
,
BOOL
elf_fetch_file_info
(
const
WCHAR
*
name
,
DWORD
*
base
,
DWORD
*
size
,
DWORD
*
checksum
)
{
return
FALSE
;
...
...
dlls/dbghelp/minidump.c
View file @
c1269392
...
...
@@ -275,15 +275,13 @@ static BOOL fetch_elf_module_info_cb(const WCHAR* name, unsigned long base,
{
struct
dump_context
*
dc
=
(
struct
dump_context
*
)
user
;
DWORD
rbase
,
size
,
checksum
;
char
tmp
[
MAX_PATH
];
/* FIXME: there's no relevant timestamp on ELF modules */
/* NB: if we have a non-null base from the live-target use it (whenever
* the ELF module is relocatable or not). If we have a null base (ELF
* module isn't relocatable) then grab its base address from ELF file
*/
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
name
,
-
1
,
tmp
,
sizeof
(
tmp
),
0
,
0
);
if
(
!
elf_fetch_file_info
(
tmp
,
&
rbase
,
&
size
,
&
checksum
))
if
(
!
elf_fetch_file_info
(
name
,
&
rbase
,
&
size
,
&
checksum
))
size
=
checksum
=
0
;
add_module
(
dc
,
name
,
base
?
base
:
rbase
,
size
,
0
/* FIXME */
,
checksum
,
TRUE
);
return
TRUE
;
...
...
dlls/dbghelp/path.c
View file @
c1269392
...
...
@@ -392,26 +392,20 @@ static BOOL CALLBACK sffip_cb(LPCWSTR buffer, void* user)
}
break
;
case
DMT_ELF
:
if
(
elf_fetch_file_info
(
buffer
,
0
,
&
size
,
&
checksum
))
{
char
fn
[
MAX_PATH
];
WideCharToMultiByte
(
CP_ACP
,
0
,
buffer
,
-
1
,
fn
,
MAX_PATH
,
NULL
,
NULL
);
if
(
elf_fetch_file_info
(
fn
,
0
,
&
size
,
&
checksum
))
{
if
(
checksum
!=
(
DWORD_PTR
)
s
->
id
)
{
WARN
(
"Found %s, but wrong checksums: %08x %08lx
\n
"
,
debugstr_w
(
buffer
),
checksum
,
(
DWORD_PTR
)
s
->
id
);
return
FALSE
;
}
}
else
if
(
checksum
!=
(
DWORD_PTR
)
s
->
id
)
{
WARN
(
"Couldn't read %s
\n
"
,
debugstr_w
(
buffer
));
WARN
(
"Found %s, but wrong checksums: %08x %08lx
\n
"
,
debugstr_w
(
buffer
),
checksum
,
(
DWORD_PTR
)
s
->
id
);
return
FALSE
;
}
}
else
{
WARN
(
"Couldn't read %s
\n
"
,
debugstr_w
(
buffer
));
return
FALSE
;
}
break
;
case
DMT_PDB
:
{
...
...
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