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
707a2273
Commit
707a2273
authored
Sep 07, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Sep 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Set is_first and is_last flags on the fly in symt_add_func_line.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cd8b85e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
symbol.c
dlls/dbghelp/symbol.c
+10
-12
No files found.
dlls/dbghelp/symbol.c
View file @
707a2273
...
...
@@ -320,6 +320,8 @@ void symt_add_func_line(struct module* module, struct symt_function* func,
unsigned
source_idx
,
int
line_num
,
ULONG_PTR
offset
)
{
struct
line_info
*
dli
;
unsigned
vlen
;
struct
line_info
*
prev
;
BOOL
last_matches
=
FALSE
;
int
i
;
...
...
@@ -340,19 +342,24 @@ void symt_add_func_line(struct module* module, struct symt_function* func,
break
;
}
}
vlen
=
vector_length
(
&
func
->
vlines
);
prev
=
vlen
?
vector_at
(
&
func
->
vlines
,
vlen
-
1
)
:
NULL
;
if
(
!
last_matches
)
{
/* we shouldn't have line changes on first line of function */
dli
=
vector_add
(
&
func
->
vlines
,
&
module
->
pool
);
dli
->
is_source_file
=
1
;
dli
->
is_first
=
dli
->
is_last
=
0
;
dli
->
is_first
=
(
prev
==
NULL
);
dli
->
is_last
=
0
;
dli
->
line_number
=
0
;
dli
->
u
.
source_file
=
source_idx
;
}
/* clear previous last */
if
(
prev
)
prev
->
is_last
=
0
;
dli
=
vector_add
(
&
func
->
vlines
,
&
module
->
pool
);
dli
->
is_source_file
=
0
;
dli
->
is_first
=
dli
->
is_last
=
0
;
dli
->
is_first
=
0
;
/* only a source file can be first */
dli
->
is_last
=
1
;
dli
->
line_number
=
line_num
;
dli
->
u
.
pc_offset
=
func
->
address
+
offset
;
}
...
...
@@ -465,9 +472,6 @@ struct symt_hierarchy_point* symt_add_function_point(struct module* module,
BOOL
symt_normalize_function
(
struct
module
*
module
,
const
struct
symt_function
*
func
)
{
unsigned
len
;
struct
line_info
*
dli
;
assert
(
func
);
/* We aren't adding any more locals or line numbers to this function.
* Free any spare memory that we might have allocated.
...
...
@@ -477,12 +481,6 @@ BOOL symt_normalize_function(struct module* module, const struct symt_function*
/* EPP vector_pool_normalize(&func->vlines, &module->pool); */
/* EPP vector_pool_normalize(&func->vchildren, &module->pool); */
len
=
vector_length
(
&
func
->
vlines
);
if
(
len
--
)
{
dli
=
vector_at
(
&
func
->
vlines
,
0
);
dli
->
is_first
=
1
;
dli
=
vector_at
(
&
func
->
vlines
,
len
);
dli
->
is_last
=
1
;
}
return
TRUE
;
}
...
...
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