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
9c2cedab
Commit
9c2cedab
authored
Mar 29, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Pass stab size to stabs_parse.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f48f8cc3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
17 deletions
+6
-17
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-1
elf_module.c
dlls/dbghelp/elf_module.c
+1
-1
macho_module.c
dlls/dbghelp/macho_module.c
+1
-1
pe_module.c
dlls/dbghelp/pe_module.c
+1
-1
stabs.c
dlls/dbghelp/stabs.c
+2
-13
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
9c2cedab
...
...
@@ -694,7 +694,7 @@ typedef void (*stabs_def_cb)(struct module* module, ULONG_PTR load_offset,
BOOL
is_public
,
BOOL
is_global
,
unsigned
char
other
,
struct
symt_compiland
*
compiland
,
void
*
user
);
extern
BOOL
stabs_parse
(
struct
module
*
module
,
ULONG_PTR
load_offset
,
const
char
*
stabs
,
int
stablen
,
const
char
*
stabs
,
size_t
nstab
,
size_t
stabsize
,
const
char
*
strs
,
int
strtablen
,
stabs_def_cb
callback
,
void
*
user
)
DECLSPEC_HIDDEN
;
...
...
dlls/dbghelp/elf_module.c
View file @
9c2cedab
...
...
@@ -1007,7 +1007,7 @@ static BOOL elf_load_debug_info_from_map(struct module* module,
{
/* OK, now just parse all of the stabs. */
lret
=
stabs_parse
(
module
,
module
->
format_info
[
DFI_ELF
]
->
u
.
elf_info
->
elf_addr
,
stab
,
image_get_map_size
(
&
stab_sect
),
stab
,
image_get_map_size
(
&
stab_sect
)
/
sizeof
(
struct
stab_nlist
),
sizeof
(
struct
stab_nlist
)
,
stabstr
,
image_get_map_size
(
&
stabstr_sect
),
NULL
,
NULL
);
if
(
lret
)
...
...
dlls/dbghelp/macho_module.c
View file @
9c2cedab
...
...
@@ -944,7 +944,7 @@ static int macho_parse_symtab(struct image_file_map* ifm,
if
(
!
stabs_parse
(
mdi
->
module
,
mdi
->
module
->
format_info
[
DFI_MACHO
]
->
u
.
macho_info
->
load_addr
-
fmap
->
segs_start
,
stab
,
sc
->
nsyms
*
stabsize
,
stab
,
sc
->
nsyms
,
stabsize
,
stabstr
,
sc
->
strsize
,
macho_stabs_def_cb
,
mdi
))
ret
=
-
1
;
...
...
dlls/dbghelp/pe_module.c
View file @
9c2cedab
...
...
@@ -500,7 +500,7 @@ static BOOL pe_load_stabs(const struct process* pcs, struct module* module)
{
ret
=
stabs_parse
(
module
,
module
->
module
.
BaseOfImage
-
fmap
->
u
.
pe
.
ntheader
.
OptionalHeader
.
ImageBase
,
stab
,
image_get_map_size
(
&
sect_stabs
),
stab
,
image_get_map_size
(
&
sect_stabs
)
/
sizeof
(
struct
stab_nlist
),
sizeof
(
struct
stab_nlist
)
,
stabstr
,
image_get_map_size
(
&
sect_stabstr
),
NULL
,
NULL
);
}
...
...
dlls/dbghelp/stabs.c
View file @
9c2cedab
...
...
@@ -1247,7 +1247,7 @@ static inline void stabbuf_append(char **buf, unsigned *buf_size, const char *st
}
BOOL
stabs_parse
(
struct
module
*
module
,
ULONG_PTR
load_offset
,
const
char
*
pv_stab_ptr
,
int
stablen
,
const
char
*
pv_stab_ptr
,
size_t
nstab
,
size_t
stabsize
,
const
char
*
strs
,
int
strtablen
,
stabs_def_cb
callback
,
void
*
user
)
{
...
...
@@ -1256,7 +1256,6 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset,
struct
symt_compiland
*
compiland
=
NULL
;
char
*
srcpath
=
NULL
;
int
i
;
int
nstab
;
const
char
*
ptr
;
char
*
stabbuff
;
unsigned
int
stabbufflen
;
...
...
@@ -1272,14 +1271,8 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset,
BOOL
ret
=
TRUE
;
struct
location
loc
;
unsigned
char
type
;
size_t
stabsize
=
sizeof
(
struct
stab_nlist
);
uint64_t
n_value
;
#ifdef __APPLE__
if
(
module
->
process
->
is_64bit
)
stabsize
=
sizeof
(
struct
macho64_nlist
);
#endif
nstab
=
stablen
/
stabsize
;
strs_end
=
strs
+
strtablen
;
memset
(
stabs_basic
,
0
,
sizeof
(
stabs_basic
));
...
...
@@ -1298,11 +1291,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset,
for
(
i
=
0
;
i
<
nstab
;
i
++
)
{
stab_ptr
=
(
struct
stab_nlist
*
)(
pv_stab_ptr
+
i
*
stabsize
);
n_value
=
stab_ptr
->
n_value
;
#ifdef __APPLE__
if
(
module
->
process
->
is_64bit
)
n_value
=
((
struct
macho64_nlist
*
)
stab_ptr
)
->
n_value
;
#endif
n_value
=
stabsize
==
sizeof
(
struct
macho64_nlist
)
?
((
struct
macho64_nlist
*
)
stab_ptr
)
->
n_value
:
stab_ptr
->
n_value
;
ptr
=
strs
+
stab_ptr
->
n_strx
;
if
((
ptr
>
strs_end
)
||
(
ptr
+
strlen
(
ptr
)
>
strs_end
))
{
...
...
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