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
f763332b
Commit
f763332b
authored
Nov 17, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Create a single compiland instance by name in PDB.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
e37f1ada
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
msc.c
dlls/dbghelp/msc.c
+21
-7
No files found.
dlls/dbghelp/msc.c
View file @
f763332b
...
...
@@ -2245,6 +2245,24 @@ static struct symt_function* codeview_create_inline_site(const struct msc_debug_
return
inlined
;
}
static
struct
symt_compiland
*
codeview_new_compiland
(
const
struct
msc_debug_info
*
msc_dbg
,
const
char
*
objname
)
{
unsigned
int
src_idx
=
source_new
(
msc_dbg
->
module
,
NULL
,
objname
);
unsigned
int
i
;
/* In some cases MSVC generates several compiland entries with same pathname in PDB file.
* (for example: for an import library, one compiland entry per imported function is generated).
* But native dbghelp (in this case) merges in a single compiland instance.
*/
for
(
i
=
0
;
i
<
msc_dbg
->
module
->
top
->
vchildren
.
num_elts
;
i
++
)
{
struct
symt_compiland
**
p
=
vector_at
(
&
msc_dbg
->
module
->
top
->
vchildren
,
i
);
if
(
symt_check_tag
(
&
(
*
p
)
->
symt
,
SymTagCompiland
)
&&
(
*
p
)
->
source
==
src_idx
)
return
*
p
;
}
return
symt_new_compiland
(
msc_dbg
->
module
,
src_idx
);
}
static
BOOL
codeview_snarf
(
const
struct
msc_debug_info
*
msc_dbg
,
const
BYTE
*
root
,
unsigned
offset
,
unsigned
size
,
const
struct
cv_module_snarf
*
cvmod
,
...
...
@@ -2260,7 +2278,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg,
/* overwrite compiland name from outter context (if any) */
if
(
objname
)
compiland
=
symt_new_compiland
(
msc_dbg
->
module
,
source_new
(
msc_dbg
->
module
,
NULL
,
objname
)
);
compiland
=
codeview_new_compiland
(
msc_dbg
,
objname
);
/*
* Loop over the different types of records and whenever we
* find something we are interested in, record it and move on.
...
...
@@ -2522,17 +2540,13 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg,
case
S_OBJNAME
:
TRACE
(
"S-ObjName-V3 %s
\n
"
,
sym
->
objname_v3
.
name
);
if
(
!
compiland
)
compiland
=
symt_new_compiland
(
msc_dbg
->
module
,
source_new
(
msc_dbg
->
module
,
NULL
,
sym
->
objname_v3
.
name
));
compiland
=
codeview_new_compiland
(
msc_dbg
,
sym
->
objname_v3
.
name
);
break
;
case
S_OBJNAME_ST
:
TRACE
(
"S-ObjName-V1 %s
\n
"
,
terminate_string
(
&
sym
->
objname_v1
.
p_name
));
if
(
!
compiland
)
compiland
=
symt_new_compiland
(
msc_dbg
->
module
,
source_new
(
msc_dbg
->
module
,
NULL
,
terminate_string
(
&
sym
->
objname_v1
.
p_name
)));
compiland
=
codeview_new_compiland
(
msc_dbg
,
terminate_string
(
&
sym
->
objname_v1
.
p_name
));
break
;
case
S_LABEL32_ST
:
...
...
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