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
8d096fb5
Commit
8d096fb5
authored
Nov 25, 2018
by
Andreas Maier
Committed by
Alexandre Julliard
Nov 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Set correct values in symt_fill_sym_info (SYMBOL_INFO).
Signed-off-by:
Andreas Maier
<
staubim@quantentunnel.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3b01149d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
10 deletions
+25
-10
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+4
-1
elf_module.c
dlls/dbghelp/elf_module.c
+1
-0
msc.c
dlls/dbghelp/msc.c
+4
-1
pe_module.c
dlls/dbghelp/pe_module.c
+6
-5
symbol.c
dlls/dbghelp/symbol.c
+10
-3
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
8d096fb5
...
...
@@ -227,6 +227,7 @@ struct symt_public
struct
symt
symt
;
struct
hash_table_elt
hash_elt
;
struct
symt
*
container
;
/* compiland */
BOOL
is_function
;
unsigned
long
address
;
unsigned
long
size
;
};
...
...
@@ -716,7 +717,9 @@ extern struct symt_public*
symt_new_public
(
struct
module
*
module
,
struct
symt_compiland
*
parent
,
const
char
*
typename
,
unsigned
long
address
,
unsigned
size
)
DECLSPEC_HIDDEN
;
BOOL
is_function
,
unsigned
long
address
,
unsigned
size
)
DECLSPEC_HIDDEN
;
extern
struct
symt_data
*
symt_new_global_variable
(
struct
module
*
module
,
struct
symt_compiland
*
parent
,
...
...
dlls/dbghelp/elf_module.c
View file @
8d096fb5
...
...
@@ -927,6 +927,7 @@ static int elf_new_public_symbols(struct module* module, const struct hash_table
while
((
ste
=
hash_table_iter_up
(
&
hti
)))
{
symt_new_public
(
module
,
ste
->
compiland
,
ste
->
ht_elt
.
name
,
FALSE
,
module
->
reloc_delta
+
ste
->
sym
.
st_value
,
ste
->
sym
.
st_size
);
}
...
...
dlls/dbghelp/msc.c
View file @
8d096fb5
...
...
@@ -2072,6 +2072,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
{
symt_new_public
(
msc_dbg
->
module
,
compiland
,
terminate_string
(
&
sym
->
public_v1
.
p_name
),
sym
->
public_v1
.
symtype
==
SYMTYPE_FUNCTION
,
codeview_get_address
(
msc_dbg
,
sym
->
public_v1
.
segment
,
sym
->
public_v1
.
offset
),
1
);
}
break
;
...
...
@@ -2080,6 +2081,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
{
symt_new_public
(
msc_dbg
->
module
,
compiland
,
terminate_string
(
&
sym
->
public_v2
.
p_name
),
sym
->
public_v2
.
symtype
==
SYMTYPE_FUNCTION
,
codeview_get_address
(
msc_dbg
,
sym
->
public_v2
.
segment
,
sym
->
public_v2
.
offset
),
1
);
}
break
;
...
...
@@ -2089,6 +2091,7 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
{
symt_new_public
(
msc_dbg
->
module
,
compiland
,
sym
->
public_v3
.
name
,
sym
->
public_v3
.
symtype
==
SYMTYPE_FUNCTION
,
codeview_get_address
(
msc_dbg
,
sym
->
public_v3
.
segment
,
sym
->
public_v3
.
offset
),
1
);
}
break
;
...
...
@@ -2885,7 +2888,7 @@ static BOOL pdb_process_file(const struct process* pcs,
if
(
ret
)
{
struct
pdb_module_info
*
pdb_info
=
msc_dbg
->
module
->
format_info
[
DFI_PDB
]
->
u
.
pdb_info
;
msc_dbg
->
module
->
module
.
SymType
=
Sym
Cv
;
msc_dbg
->
module
->
module
.
SymType
=
Sym
Pdb
;
if
(
pdb_info
->
pdb_files
[
0
].
kind
==
PDB_JG
)
msc_dbg
->
module
->
module
.
PdbSig
=
pdb_info
->
pdb_files
[
0
].
u
.
jg
.
timestamp
;
else
...
...
dlls/dbghelp/pe_module.c
View file @
8d096fb5
...
...
@@ -442,7 +442,7 @@ static BOOL pe_load_coff_symbol_table(struct module* module)
source_new
(
module
,
NULL
,
lastfilename
));
if
(
!
(
dbghelp_options
&
SYMOPT_NO_PUBLICS
))
symt_new_public
(
module
,
compiland
,
name
,
symt_new_public
(
module
,
compiland
,
name
,
FALSE
,
module
->
module
.
BaseOfImage
+
sect
[
isym
->
SectionNumber
-
1
].
VirtualAddress
+
isym
->
Value
,
1
);
...
...
@@ -635,11 +635,11 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, struct module*
#if 0
/* Add start of DLL (better use the (yet unimplemented) Exe SymTag for this) */
/* FIXME: module.ModuleName isn't correctly set yet if it's passed in SymLoadModule */
symt_new_public(module, NULL, module->module.ModuleName, base, 1);
symt_new_public(module, NULL, module->module.ModuleName,
FALSE,
base, 1);
#endif
/* Add entry point */
symt_new_public
(
module
,
NULL
,
"EntryPoint"
,
symt_new_public
(
module
,
NULL
,
"EntryPoint"
,
FALSE
,
base
+
nth
->
OptionalHeader
.
AddressOfEntryPoint
,
1
);
#if 0
/* FIXME: we'd better store addresses linked to sections rather than
...
...
@@ -650,7 +650,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, struct module*
((char*)&nth->OptionalHeader + nth->FileHeader.SizeOfOptionalHeader);
for (i = 0; i < nth->FileHeader.NumberOfSections; i++, section++)
{
symt_new_public(module, NULL, section->Name,
symt_new_public(module, NULL, section->Name,
FALSE,
RtlImageRvaToVa(nth, mapping, section->VirtualAddress, NULL), 1);
}
#endif
...
...
@@ -676,6 +676,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, struct module*
if
(
!
names
[
i
])
continue
;
symt_new_public
(
module
,
NULL
,
RtlImageRvaToVa
(
nth
,
mapping
,
names
[
i
],
NULL
),
FALSE
,
base
+
functions
[
ordinals
[
i
]],
1
);
}
...
...
@@ -687,7 +688,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs, struct module*
if
((
ordinals
[
j
]
==
i
)
&&
names
[
j
])
break
;
if
(
j
<
exports
->
NumberOfNames
)
continue
;
snprintf
(
buffer
,
sizeof
(
buffer
),
"%d"
,
i
+
exports
->
Base
);
symt_new_public
(
module
,
NULL
,
buffer
,
base
+
(
DWORD
)
functions
[
i
],
1
);
symt_new_public
(
module
,
NULL
,
buffer
,
FALSE
,
base
+
(
DWORD
)
functions
[
i
],
1
);
}
}
}
...
...
dlls/dbghelp/symbol.c
View file @
8d096fb5
...
...
@@ -202,6 +202,7 @@ struct symt_compiland* symt_new_compiland(struct module* module,
struct
symt_public
*
symt_new_public
(
struct
module
*
module
,
struct
symt_compiland
*
compiland
,
const
char
*
name
,
BOOL
is_function
,
unsigned
long
address
,
unsigned
size
)
{
struct
symt_public
*
sym
;
...
...
@@ -217,6 +218,7 @@ struct symt_public* symt_new_public(struct module* module,
sym
->
symt
.
tag
=
SymTagPublicSymbol
;
sym
->
hash_elt
.
name
=
pool_strdup
(
&
module
->
pool
,
name
);
sym
->
container
=
compiland
?
&
compiland
->
symt
:
NULL
;
sym
->
is_function
=
is_function
;
sym
->
address
=
address
;
sym
->
size
=
size
;
symt_add_module_ht
(
module
,
(
struct
symt_ht
*
)
sym
);
...
...
@@ -673,11 +675,16 @@ static void symt_fill_sym_info(struct module_pair* pair,
}
break
;
case
SymTagPublicSymbol
:
sym_info
->
Flags
|=
SYMFLAG_EXPORT
;
symt_get_address
(
sym
,
&
sym_info
->
Address
);
{
const
struct
symt_public
*
pub
=
(
const
struct
symt_public
*
)
sym
;
if
(
pub
->
is_function
)
sym_info
->
Flags
|=
SYMFLAG_PUBLIC_CODE
;
else
sym_info
->
Flags
|=
SYMFLAG_EXPORT
;
symt_get_address
(
sym
,
&
sym_info
->
Address
);
}
break
;
case
SymTagFunction
:
sym_info
->
Flags
|=
SYMFLAG_FUNCTION
;
symt_get_address
(
sym
,
&
sym_info
->
Address
);
break
;
case
SymTagThunk
:
...
...
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