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
27f13373
Commit
27f13373
authored
Oct 29, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Implement SymGetLineFromInlineContext(W) for inlined frame.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3d6b65dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
20 deletions
+32
-20
symbol.c
dlls/dbghelp/symbol.c
+32
-20
No files found.
dlls/dbghelp/symbol.c
View file @
27f13373
...
@@ -1844,28 +1844,14 @@ static BOOL internal_line_set_nameW(struct process* pcs, struct internal_line_t*
...
@@ -1844,28 +1844,14 @@ static BOOL internal_line_set_nameW(struct process* pcs, struct internal_line_t*
return
TRUE
;
return
TRUE
;
}
}
/******************************************************************
static
BOOL
get_line_from_function
(
struct
module_pair
*
pair
,
struct
symt_function
*
func
,
DWORD64
addr
,
* get_line_from_addr
PDWORD
pdwDisplacement
,
struct
internal_line_t
*
intl
)
*
* fills source file information from an address
*/
static
BOOL
get_line_from_addr
(
HANDLE
hProcess
,
DWORD64
addr
,
PDWORD
pdwDisplacement
,
struct
internal_line_t
*
intl
)
{
{
struct
line_info
*
dli
=
NULL
;
struct
line_info
*
dli
=
NULL
;
struct
line_info
*
found_dli
=
NULL
;
struct
line_info
*
found_dli
=
NULL
;
int
i
;
int
i
;
struct
module_pair
pair
;
struct
symt_ht
*
symt
;
struct
symt_function
*
func
;
if
(
!
module_init_pair
(
&
pair
,
hProcess
,
addr
))
return
FALSE
;
for
(
i
=
vector_length
(
&
func
->
vlines
)
-
1
;
i
>=
0
;
i
--
)
if
((
symt
=
symt_find_nearest
(
pair
.
effective
,
addr
))
==
NULL
)
return
FALSE
;
if
(
symt
->
symt
.
tag
!=
SymTagFunction
)
return
FALSE
;
func
=
(
struct
symt_function
*
)
symt
;
for
(
i
=
vector_length
(
&
func
->
vlines
)
-
1
;
i
>=
0
;
i
--
)
{
{
dli
=
vector_at
(
&
func
->
vlines
,
i
);
dli
=
vector_at
(
&
func
->
vlines
,
i
);
if
(
!
dli
->
is_source_file
)
if
(
!
dli
->
is_source_file
)
...
@@ -1883,12 +1869,12 @@ static BOOL get_line_from_addr(HANDLE hProcess, DWORD64 addr,
...
@@ -1883,12 +1869,12 @@ static BOOL get_line_from_addr(HANDLE hProcess, DWORD64 addr,
if
(
dbghelp_opt_native
)
if
(
dbghelp_opt_native
)
{
{
/* Return native file paths when using winedbg */
/* Return native file paths when using winedbg */
ret
=
internal_line_set_nameA
(
pair
.
pcs
,
intl
,
(
char
*
)
source_get
(
pair
.
effective
,
dli
->
u
.
source_file
),
FALSE
);
ret
=
internal_line_set_nameA
(
pair
->
pcs
,
intl
,
(
char
*
)
source_get
(
pair
->
effective
,
dli
->
u
.
source_file
),
FALSE
);
}
}
else
else
{
{
WCHAR
*
dospath
=
wine_get_dos_file_name
(
source_get
(
pair
.
effective
,
dli
->
u
.
source_file
));
WCHAR
*
dospath
=
wine_get_dos_file_name
(
source_get
(
pair
->
effective
,
dli
->
u
.
source_file
));
ret
=
internal_line_set_nameW
(
pair
.
pcs
,
intl
,
dospath
,
TRUE
);
ret
=
internal_line_set_nameW
(
pair
->
pcs
,
intl
,
dospath
,
TRUE
);
HeapFree
(
GetProcessHeap
(),
0
,
dospath
);
HeapFree
(
GetProcessHeap
(),
0
,
dospath
);
}
}
if
(
ret
)
*
pdwDisplacement
=
addr
-
found_dli
->
u
.
address
;
if
(
ret
)
*
pdwDisplacement
=
addr
-
found_dli
->
u
.
address
;
...
@@ -1898,6 +1884,24 @@ static BOOL get_line_from_addr(HANDLE hProcess, DWORD64 addr,
...
@@ -1898,6 +1884,24 @@ static BOOL get_line_from_addr(HANDLE hProcess, DWORD64 addr,
return
FALSE
;
return
FALSE
;
}
}
/******************************************************************
* get_line_from_addr
*
* fills source file information from an address
*/
static
BOOL
get_line_from_addr
(
HANDLE
hProcess
,
DWORD64
addr
,
PDWORD
pdwDisplacement
,
struct
internal_line_t
*
intl
)
{
struct
module_pair
pair
;
struct
symt_ht
*
symt
;
if
(
!
module_init_pair
(
&
pair
,
hProcess
,
addr
))
return
FALSE
;
if
((
symt
=
symt_find_nearest
(
pair
.
effective
,
addr
))
==
NULL
)
return
FALSE
;
if
(
symt
->
symt
.
tag
!=
SymTagFunction
&&
symt
->
symt
.
tag
!=
SymTagInlineSite
)
return
FALSE
;
return
get_line_from_function
(
&
pair
,
(
struct
symt_function
*
)
symt
,
addr
,
pdwDisplacement
,
intl
);
}
/***********************************************************************
/***********************************************************************
* SymGetSymNext64 (DBGHELP.@)
* SymGetSymNext64 (DBGHELP.@)
*/
*/
...
@@ -2699,9 +2703,17 @@ BOOL WINAPI SymFromInlineContextW(HANDLE hProcess, DWORD64 addr, ULONG inline_ct
...
@@ -2699,9 +2703,17 @@ BOOL WINAPI SymFromInlineContextW(HANDLE hProcess, DWORD64 addr, ULONG inline_ct
static
BOOL
get_line_from_inline_context
(
HANDLE
hProcess
,
DWORD64
addr
,
ULONG
inline_ctx
,
DWORD64
mod_addr
,
PDWORD
disp
,
static
BOOL
get_line_from_inline_context
(
HANDLE
hProcess
,
DWORD64
addr
,
ULONG
inline_ctx
,
DWORD64
mod_addr
,
PDWORD
disp
,
struct
internal_line_t
*
intl
)
struct
internal_line_t
*
intl
)
{
{
struct
module_pair
pair
;
struct
symt_inlinesite
*
inlined
;
if
(
!
module_init_pair
(
&
pair
,
hProcess
,
mod_addr
?
mod_addr
:
addr
))
return
FALSE
;
switch
(
IFC_MODE
(
inline_ctx
))
switch
(
IFC_MODE
(
inline_ctx
))
{
{
case
IFC_MODE_INLINE
:
case
IFC_MODE_INLINE
:
inlined
=
symt_find_inlined_site
(
pair
.
effective
,
addr
,
inline_ctx
);
if
(
inlined
&&
get_line_from_function
(
&
pair
,
&
inlined
->
func
,
addr
,
disp
,
intl
))
return
TRUE
;
/* fall through: check if we can find line info at top function level */
case
IFC_MODE_IGNORE
:
case
IFC_MODE_IGNORE
:
case
IFC_MODE_REGULAR
:
case
IFC_MODE_REGULAR
:
return
get_line_from_addr
(
hProcess
,
addr
,
disp
,
intl
);
return
get_line_from_addr
(
hProcess
,
addr
,
disp
,
intl
);
...
...
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