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
50dc4ad0
Commit
50dc4ad0
authored
Sep 28, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Sep 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: SymFromName* should first look in local context.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
3e0deb35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
symbol.c
dlls/dbghelp/symbol.c
+41
-0
No files found.
dlls/dbghelp/symbol.c
View file @
50dc4ad0
...
...
@@ -1653,6 +1653,7 @@ static BOOL find_name(struct process* pcs, struct module* module, const char* na
BOOL
WINAPI
SymFromName
(
HANDLE
hProcess
,
PCSTR
Name
,
PSYMBOL_INFO
Symbol
)
{
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
struct
module_pair
pair
;
struct
module
*
module
;
const
char
*
name
;
...
...
@@ -1669,6 +1670,45 @@ BOOL WINAPI SymFromName(HANDLE hProcess, PCSTR Name, PSYMBOL_INFO Symbol)
module
=
module_find_by_nameA
(
pcs
,
tmp
);
return
find_name
(
pcs
,
module
,
name
+
1
,
Symbol
);
}
/* search first in local context */
pair
.
pcs
=
pcs
;
pair
.
requested
=
module_find_by_addr
(
pair
.
pcs
,
pcs
->
localscope_pc
,
DMT_UNKNOWN
);
if
(
module_get_debug
(
&
pair
)
&&
(
symt_check_tag
(
pcs
->
localscope_symt
,
SymTagFunction
)
||
symt_check_tag
(
pcs
->
localscope_symt
,
SymTagInlineSite
)))
{
struct
symt_function
*
func
=
(
struct
symt_function
*
)
pcs
->
localscope_symt
;
struct
vector
*
v
=
&
func
->
vchildren
;
unsigned
i
;
for
(
i
=
0
;
i
<
vector_length
(
v
);
i
++
)
{
struct
symt
*
lsym
=
*
(
struct
symt
**
)
vector_at
(
v
,
i
);
switch
(
lsym
->
tag
)
{
case
SymTagBlock
:
/* no recursion */
break
;
case
SymTagData
:
name
=
symt_get_name
(
lsym
);
if
(
name
&&
!
strcmp
(
name
,
Name
))
{
symt_fill_sym_info
(
&
pair
,
func
,
lsym
,
Symbol
);
return
TRUE
;
}
break
;
case
SymTagLabel
:
/* not returned here */
case
SymTagFuncDebugStart
:
case
SymTagFuncDebugEnd
:
case
SymTagCustom
:
case
SymTagInlineSite
:
break
;
default:
WARN
(
"Unsupported tag: %u (%x)
\n
"
,
lsym
->
tag
,
lsym
->
tag
);
}
}
}
/* lookup at global scope */
for
(
module
=
pcs
->
lmodules
;
module
;
module
=
module
->
next
)
{
if
(
module
->
type
==
DMT_PE
&&
find_name
(
pcs
,
module
,
Name
,
Symbol
))
...
...
@@ -1686,6 +1726,7 @@ BOOL WINAPI SymFromName(HANDLE hProcess, PCSTR Name, PSYMBOL_INFO Symbol)
return
TRUE
;
}
}
SetLastError
(
ERROR_MOD_NOT_FOUND
);
return
FALSE
;
}
...
...
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