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
770f0d83
Commit
770f0d83
authored
Mar 18, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Make the ELF mapping code easier to use.
parent
6e487369
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
130 additions
and
93 deletions
+130
-93
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+0
-1
dwarf.c
dlls/dbghelp/dwarf.c
+2
-1
elf_module.c
dlls/dbghelp/elf_module.c
+34
-91
image_private.h
dlls/dbghelp/image_private.h
+94
-0
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
770f0d83
...
@@ -472,7 +472,6 @@ extern DWORD calc_crc32(int fd);
...
@@ -472,7 +472,6 @@ extern DWORD calc_crc32(int fd);
typedef
BOOL
(
*
enum_modules_cb
)(
const
WCHAR
*
,
unsigned
long
addr
,
void
*
user
);
typedef
BOOL
(
*
enum_modules_cb
)(
const
WCHAR
*
,
unsigned
long
addr
,
void
*
user
);
/* elf_module.c */
/* elf_module.c */
#define ELF_NO_MAP ((const void*)-1)
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
*
base
,
DWORD
*
size
,
DWORD
*
checksum
);
extern
BOOL
elf_fetch_file_info
(
const
WCHAR
*
name
,
DWORD
*
base
,
DWORD
*
size
,
DWORD
*
checksum
);
struct
elf_file_map
;
struct
elf_file_map
;
...
...
dlls/dbghelp/dwarf.c
View file @
770f0d83
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
#include "oleauto.h"
#include "oleauto.h"
#include "dbghelp_private.h"
#include "dbghelp_private.h"
#include "image_private.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -1951,7 +1952,7 @@ static BOOL dwarf2_parse_line_numbers(const dwarf2_section_t* sections,
...
@@ -1951,7 +1952,7 @@ static BOOL dwarf2_parse_line_numbers(const dwarf2_section_t* sections,
const
char
**
p
;
const
char
**
p
;
/* section with line numbers stripped */
/* section with line numbers stripped */
if
(
sections
[
section_line
].
address
==
ELF
_NO_MAP
)
if
(
sections
[
section_line
].
address
==
IMAGE
_NO_MAP
)
return
FALSE
;
return
FALSE
;
traverse
.
data
=
sections
[
section_line
].
address
+
offset
;
traverse
.
data
=
sections
[
section_line
].
address
+
offset
;
...
...
dlls/dbghelp/elf_module.c
View file @
770f0d83
This diff is collapsed.
Click to expand it.
dlls/dbghelp/image_private.h
0 → 100644
View file @
770f0d83
/*
* File elf_private.h - definitions for processing of ELF files
*
* Copyright (C) 1996, Eric Youngdale.
* 1999-2007 Eric Pouech
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef HAVE_ELF_H
# include <elf.h>
#endif
#ifdef HAVE_SYS_ELF32_H
# include <sys/elf32.h>
#endif
#ifdef HAVE_SYS_EXEC_ELF_H
# include <sys/exec_elf.h>
#endif
#if !defined(DT_NUM)
# if defined(DT_COUNT)
# define DT_NUM DT_COUNT
# else
/* this seems to be a satisfactory value on Solaris, which doesn't support this AFAICT */
# define DT_NUM 24
# endif
#endif
#ifdef HAVE_LINK_H
# include <link.h>
#endif
#ifdef HAVE_SYS_LINK_H
# include <sys/link.h>
#endif
#define IMAGE_NO_MAP ((void*)-1)
#ifdef __ELF__
#ifdef _WIN64
#define Elf_Ehdr Elf64_Ehdr
#define Elf_Shdr Elf64_Shdr
#define Elf_Phdr Elf64_Phdr
#define Elf_Dyn Elf64_Dyn
#define Elf_Sym Elf64_Sym
#else
#define Elf_Ehdr Elf32_Ehdr
#define Elf_Shdr Elf32_Shdr
#define Elf_Phdr Elf32_Phdr
#define Elf_Dyn Elf32_Dyn
#define Elf_Sym Elf32_Sym
#endif
/* structure holding information while handling an ELF image
* allows one by one section mapping for memory savings
*/
struct
elf_file_map
{
size_t
elf_size
;
size_t
elf_start
;
int
fd
;
const
char
*
shstrtab
;
struct
elf_file_map
*
alternate
;
/* another ELF file (linked to this one) */
Elf_Ehdr
elfhdr
;
struct
{
Elf_Shdr
shdr
;
const
char
*
mapped
;
}
*
sect
;
};
struct
elf_section_map
{
struct
elf_file_map
*
fmap
;
long
sidx
;
};
extern
BOOL
elf_find_section
(
struct
elf_file_map
*
fmap
,
const
char
*
name
,
unsigned
sht
,
struct
elf_section_map
*
esm
);
extern
const
char
*
elf_map_section
(
struct
elf_section_map
*
esm
);
extern
void
elf_unmap_section
(
struct
elf_section_map
*
esm
);
extern
unsigned
elf_get_map_size
(
const
struct
elf_section_map
*
esm
);
#endif
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