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
9d7b6b65
Commit
9d7b6b65
authored
Mar 15, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Added helper to free module's specific data (ELF, MSC...) upon removal.
parent
09a7e2d3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-0
elf_module.c
dlls/dbghelp/elf_module.c
+6
-0
module.c
dlls/dbghelp/module.c
+3
-0
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
9d7b6b65
...
...
@@ -326,6 +326,7 @@ struct module
/* specific information for debug types */
struct
elf_module_info
*
elf_info
;
struct
dwarf2_module_info_s
*
dwarf2_info
;
void
(
*
module_remove
)(
struct
process
*
pcs
,
struct
module
*
module
);
struct
macho_module_info
*
macho_info
;
...
...
dlls/dbghelp/elf_module.c
View file @
9d7b6b65
...
...
@@ -358,6 +358,11 @@ static void elf_unmap_file(struct elf_file_map* fmap)
}
}
static
void
elf_module_remove
(
struct
process
*
pcs
,
struct
module
*
module
)
{
HeapFree
(
GetProcessHeap
(),
0
,
module
->
elf_info
);
}
/******************************************************************
* elf_is_in_thunk_area
*
...
...
@@ -1132,6 +1137,7 @@ static BOOL elf_load_file(struct process* pcs, const WCHAR* filename,
elf_info
->
module
=
module_new
(
pcs
,
filename
,
DMT_ELF
,
FALSE
,
(
load_offset
)
?
load_offset
:
fmap
.
elf_start
,
fmap
.
elf_size
,
0
,
calc_crc32
(
fmap
.
fd
));
elf_info
->
module
->
module_remove
=
elf_module_remove
;
if
(
!
elf_info
->
module
)
{
HeapFree
(
GetProcessHeap
(),
0
,
elf_module_info
);
...
...
dlls/dbghelp/module.c
View file @
9d7b6b65
...
...
@@ -168,6 +168,7 @@ struct module* module_new(struct process* pcs, const WCHAR* name,
module
->
type
=
type
;
module
->
is_virtual
=
virtual
?
TRUE
:
FALSE
;
module
->
module_remove
=
NULL
;
module
->
sortlist_valid
=
FALSE
;
module
->
sorttab_size
=
0
;
module
->
addr_sorttab
=
NULL
;
...
...
@@ -624,6 +625,8 @@ BOOL module_remove(struct process* pcs, struct module* module)
struct
module
**
p
;
TRACE
(
"%s (%p)
\n
"
,
debugstr_w
(
module
->
module
.
ModuleName
),
module
);
if
(
module
->
module_remove
)
module
->
module_remove
(
pcs
,
module
);
hash_table_destroy
(
&
module
->
ht_symbols
);
hash_table_destroy
(
&
module
->
ht_types
);
HeapFree
(
GetProcessHeap
(),
0
,
module
->
sources
);
...
...
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