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
2a87a896
Commit
2a87a896
authored
Oct 09, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Only map an ELF file once.
parent
580cab9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
22 deletions
+8
-22
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-1
elf_module.c
dlls/dbghelp/elf_module.c
+6
-20
module.c
dlls/dbghelp/module.c
+1
-1
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
2a87a896
...
@@ -511,7 +511,7 @@ typedef BOOL (*enum_modules_cb)(const WCHAR*, unsigned long addr, void* user);
...
@@ -511,7 +511,7 @@ typedef BOOL (*enum_modules_cb)(const WCHAR*, unsigned long addr, void* user);
extern
BOOL
elf_enum_modules
(
HANDLE
hProc
,
enum_modules_cb
,
void
*
);
extern
BOOL
elf_enum_modules
(
HANDLE
hProc
,
enum_modules_cb
,
void
*
);
extern
BOOL
elf_fetch_file_info
(
const
WCHAR
*
name
,
DWORD_PTR
*
base
,
DWORD
*
size
,
DWORD
*
checksum
);
extern
BOOL
elf_fetch_file_info
(
const
WCHAR
*
name
,
DWORD_PTR
*
base
,
DWORD
*
size
,
DWORD
*
checksum
);
struct
image_file_map
;
struct
image_file_map
;
extern
BOOL
elf_load_debug_info
(
struct
module
*
module
,
struct
image_file_map
*
fmap
);
extern
BOOL
elf_load_debug_info
(
struct
module
*
module
);
extern
struct
module
*
extern
struct
module
*
elf_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
);
elf_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
);
extern
BOOL
elf_read_wine_loader_dbg_info
(
struct
process
*
pcs
);
extern
BOOL
elf_read_wine_loader_dbg_info
(
struct
process
*
pcs
);
...
...
dlls/dbghelp/elf_module.c
View file @
2a87a896
...
@@ -948,12 +948,11 @@ static BOOL elf_load_debug_info_from_map(struct module* module,
...
@@ -948,12 +948,11 @@ static BOOL elf_load_debug_info_from_map(struct module* module,
*
*
* Loads ELF debugging information from the module image file.
* Loads ELF debugging information from the module image file.
*/
*/
BOOL
elf_load_debug_info
(
struct
module
*
module
,
struct
image_file_map
*
fmap
)
BOOL
elf_load_debug_info
(
struct
module
*
module
)
{
{
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
struct
pool
pool
;
struct
pool
pool
;
struct
hash_table
ht_symtab
;
struct
hash_table
ht_symtab
;
struct
image_file_map
my_fmap
;
struct
module_format
*
modfmt
;
struct
module_format
*
modfmt
;
if
(
module
->
type
!=
DMT_ELF
||
!
(
modfmt
=
module
->
format_info
[
DFI_ELF
])
||
!
modfmt
->
u
.
elf_info
)
if
(
module
->
type
!=
DMT_ELF
||
!
(
modfmt
=
module
->
format_info
[
DFI_ELF
])
||
!
modfmt
->
u
.
elf_info
)
...
@@ -965,22 +964,9 @@ BOOL elf_load_debug_info(struct module* module, struct image_file_map* fmap)
...
@@ -965,22 +964,9 @@ BOOL elf_load_debug_info(struct module* module, struct image_file_map* fmap)
pool_init
(
&
pool
,
65536
);
pool_init
(
&
pool
,
65536
);
hash_table_init
(
&
pool
,
&
ht_symtab
,
256
);
hash_table_init
(
&
pool
,
&
ht_symtab
,
256
);
if
(
!
fmap
)
ret
=
elf_load_debug_info_from_map
(
module
,
&
modfmt
->
u
.
elf_info
->
file_map
,
&
pool
,
&
ht_symtab
);
{
fmap
=
&
my_fmap
;
ret
=
elf_map_file
(
module
->
module
.
LoadedImageName
,
fmap
);
}
if
(
ret
)
ret
=
elf_load_debug_info_from_map
(
module
,
fmap
,
&
pool
,
&
ht_symtab
);
if
(
ret
)
{
modfmt
->
u
.
elf_info
->
file_map
=
*
fmap
;
elf_reset_file_map
(
fmap
);
}
pool_destroy
(
&
pool
);
pool_destroy
(
&
pool
);
if
(
fmap
==
&
my_fmap
)
elf_unmap_file
(
fmap
);
return
ret
;
return
ret
;
}
}
...
@@ -1090,14 +1076,14 @@ static BOOL elf_load_file(struct process* pcs, const WCHAR* filename,
...
@@ -1090,14 +1076,14 @@ static BOOL elf_load_file(struct process* pcs, const WCHAR* filename,
elf_module_info
->
elf_addr
=
load_offset
;
elf_module_info
->
elf_addr
=
load_offset
;
elf_module_info
->
file_map
=
fmap
;
elf_reset_file_map
(
&
fmap
);
if
(
dbghelp_options
&
SYMOPT_DEFERRED_LOADS
)
if
(
dbghelp_options
&
SYMOPT_DEFERRED_LOADS
)
{
{
elf_info
->
module
->
module
.
SymType
=
SymDeferred
;
elf_info
->
module
->
module
.
SymType
=
SymDeferred
;
elf_module_info
->
file_map
=
fmap
;
elf_reset_file_map
(
&
fmap
);
ret
=
TRUE
;
ret
=
TRUE
;
}
}
else
ret
=
elf_load_debug_info
(
elf_info
->
module
,
&
fmap
);
else
ret
=
elf_load_debug_info
(
elf_info
->
module
);
elf_module_info
->
elf_mark
=
1
;
elf_module_info
->
elf_mark
=
1
;
elf_module_info
->
elf_loader
=
0
;
elf_module_info
->
elf_loader
=
0
;
...
@@ -1523,7 +1509,7 @@ struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned
...
@@ -1523,7 +1509,7 @@ struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned
return
NULL
;
return
NULL
;
}
}
BOOL
elf_load_debug_info
(
struct
module
*
module
,
struct
image_file_map
*
fmap
)
BOOL
elf_load_debug_info
(
struct
module
*
module
)
{
{
return
FALSE
;
return
FALSE
;
}
}
...
...
dlls/dbghelp/module.c
View file @
2a87a896
...
@@ -310,7 +310,7 @@ BOOL module_get_debug(struct module_pair* pair)
...
@@ -310,7 +310,7 @@ BOOL module_get_debug(struct module_pair* pair)
else
switch
(
pair
->
effective
->
type
)
else
switch
(
pair
->
effective
->
type
)
{
{
case
DMT_ELF
:
case
DMT_ELF
:
ret
=
elf_load_debug_info
(
pair
->
effective
,
NULL
);
ret
=
elf_load_debug_info
(
pair
->
effective
);
break
;
break
;
case
DMT_PE
:
case
DMT_PE
:
idslW64
.
SizeOfStruct
=
sizeof
(
idslW64
);
idslW64
.
SizeOfStruct
=
sizeof
(
idslW64
);
...
...
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