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
d3868239
Commit
d3868239
authored
Mar 17, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Move get_dos_file_name to path.c.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
171c6fad
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
23 deletions
+25
-23
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-0
elf_module.c
dlls/dbghelp/elf_module.c
+0
-23
path.c
dlls/dbghelp/path.c
+24
-0
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
d3868239
...
...
@@ -668,6 +668,7 @@ extern BOOL pdb_virtual_unwind(struct cpu_stack_walk *csw, DWORD_PTR ip,
extern
BOOL
path_find_symbol_file
(
const
struct
process
*
pcs
,
const
struct
module
*
module
,
PCSTR
full_path
,
const
GUID
*
guid
,
DWORD
dw1
,
DWORD
dw2
,
WCHAR
*
buffer
,
BOOL
*
is_unmatched
)
DECLSPEC_HIDDEN
;
extern
WCHAR
*
get_dos_file_name
(
const
WCHAR
*
filename
)
DECLSPEC_HIDDEN
;
/* pe_module.c */
extern
BOOL
pe_load_nt_header
(
HANDLE
hProc
,
DWORD64
base
,
IMAGE_NT_HEADERS
*
nth
)
DECLSPEC_HIDDEN
;
...
...
dlls/dbghelp/elf_module.c
View file @
d3868239
...
...
@@ -396,29 +396,6 @@ static BOOL elf_map_shdr(struct elf_map_file_data* emfd, struct image_file_map*
return
TRUE
;
}
static
WCHAR
*
get_dos_file_name
(
const
WCHAR
*
filename
)
{
WCHAR
*
dos_path
;
size_t
len
;
if
(
*
filename
==
'/'
)
{
char
*
unix_path
;
len
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
filename
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
unix_path
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
filename
,
-
1
,
unix_path
,
len
,
NULL
,
NULL
);
dos_path
=
wine_get_dos_file_name
(
unix_path
);
heap_free
(
unix_path
);
}
else
{
len
=
lstrlenW
(
filename
);
dos_path
=
heap_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
dos_path
,
filename
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
}
return
dos_path
;
}
/******************************************************************
* elf_map_file
*
...
...
dlls/dbghelp/path.c
View file @
d3868239
...
...
@@ -27,6 +27,7 @@
#include "winnls.h"
#include "winternl.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dbghelp
);
...
...
@@ -696,3 +697,26 @@ BOOL path_find_symbol_file(const struct process* pcs, const struct module* modul
}
return
FALSE
;
}
WCHAR
*
get_dos_file_name
(
const
WCHAR
*
filename
)
{
WCHAR
*
dos_path
;
size_t
len
;
if
(
*
filename
==
'/'
)
{
char
*
unix_path
;
len
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
filename
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
unix_path
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
filename
,
-
1
,
unix_path
,
len
,
NULL
,
NULL
);
dos_path
=
wine_get_dos_file_name
(
unix_path
);
heap_free
(
unix_path
);
}
else
{
len
=
lstrlenW
(
filename
);
dos_path
=
heap_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
dos_path
,
filename
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
}
return
dos_path
;
}
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