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
8c4f96d2
Commit
8c4f96d2
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: Store the file map in ELF's module specific data.
parent
9d7b6b65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
elf_module.c
dlls/dbghelp/elf_module.c
+22
-10
No files found.
dlls/dbghelp/elf_module.c
View file @
8c4f96d2
...
...
@@ -75,13 +75,6 @@
#include "wine/library.h"
#include "wine/debug.h"
struct
elf_module_info
{
DWORD_PTR
elf_addr
;
unsigned
short
elf_mark
:
1
,
elf_loader
:
1
;
};
#ifdef __ELF__
#define ELF_INFO_DEBUG_HEADER 0x0001
...
...
@@ -152,6 +145,14 @@ struct elf_thunk_area
unsigned
long
rva_end
;
};
struct
elf_module_info
{
unsigned
long
elf_addr
;
unsigned
short
elf_mark
:
1
,
elf_loader
:
1
;
struct
elf_file_map
file_map
;
};
/******************************************************************
* elf_map_section
*
...
...
@@ -258,6 +259,13 @@ static inline unsigned elf_get_map_size(const struct elf_section_map* esm)
return
esm
->
fmap
->
sect
[
esm
->
sidx
].
shdr
.
sh_size
;
}
static
inline
void
elf_reset_file_map
(
struct
elf_file_map
*
fmap
)
{
fmap
->
fd
=
-
1
;
fmap
->
shstrtab
=
ELF_NO_MAP
;
fmap
->
alternate
=
NULL
;
}
/******************************************************************
* elf_map_file
*
...
...
@@ -278,9 +286,7 @@ static BOOL elf_map_file(const WCHAR* filenameW, struct elf_file_map* fmap)
if
(
!
(
filename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
return
FALSE
;
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
filenameW
,
-
1
,
filename
,
len
,
NULL
,
NULL
);
fmap
->
fd
=
-
1
;
fmap
->
shstrtab
=
ELF_NO_MAP
;
fmap
->
alternate
=
NULL
;
elf_reset_file_map
(
fmap
);
/* check that the file exists, and that the module hasn't been loaded yet */
if
(
stat
(
filename
,
&
statbuf
)
==
-
1
||
S_ISDIR
(
statbuf
.
st_mode
))
goto
done
;
...
...
@@ -1044,6 +1050,12 @@ BOOL elf_load_debug_info(struct module* module, struct elf_file_map* fmap)
if
(
ret
)
ret
=
elf_load_debug_info_from_map
(
module
,
fmap
,
&
pool
,
&
ht_symtab
);
if
(
ret
)
{
module
->
elf_info
->
file_map
=
*
fmap
;
elf_reset_file_map
(
fmap
);
}
pool_destroy
(
&
pool
);
if
(
fmap
==
&
my_fmap
)
elf_unmap_file
(
fmap
);
return
ret
;
...
...
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