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
5ad756fb
Commit
5ad756fb
authored
Sep 06, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Sep 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Use the correct size for global variable when searching for a symbol.
parent
a181ad5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
symbol.c
dlls/dbghelp/symbol.c
+14
-4
No files found.
dlls/dbghelp/symbol.c
View file @
5ad756fb
...
...
@@ -715,6 +715,18 @@ static BOOL resort_symbols(struct module* module)
return
module
->
sortlist_valid
=
TRUE
;
}
static
void
symt_get_length
(
struct
symt
*
symt
,
ULONG64
*
size
)
{
DWORD
type_index
;
if
(
symt_get_info
(
symt
,
TI_GET_LENGTH
,
size
)
&&
*
size
)
return
;
if
(
symt_get_info
(
symt
,
TI_GET_TYPE
,
&
type_index
)
&&
symt_get_info
((
struct
symt
*
)
type_index
,
TI_GET_LENGTH
,
size
))
return
;
*
size
=
0x1000
;
/* arbitrary value */
}
/* assume addr is in module */
struct
symt_ht
*
symt_find_nearest
(
struct
module
*
module
,
DWORD
addr
)
{
...
...
@@ -737,8 +749,7 @@ struct symt_ht* symt_find_nearest(struct module* module, DWORD addr)
if
(
high
)
{
symt_get_info
(
&
module
->
addr_sorttab
[
high
-
1
]
->
symt
,
TI_GET_ADDRESS
,
&
ref_addr
);
if
(
!
symt_get_info
(
&
module
->
addr_sorttab
[
high
-
1
]
->
symt
,
TI_GET_LENGTH
,
&
ref_size
)
||
!
ref_size
)
ref_size
=
0x1000
;
/* arbitrary value */
symt_get_length
(
&
module
->
addr_sorttab
[
high
-
1
]
->
symt
,
&
ref_size
);
if
(
addr
>=
ref_addr
+
ref_size
)
return
NULL
;
}
...
...
@@ -772,8 +783,7 @@ struct symt_ht* symt_find_nearest(struct module* module, DWORD addr)
/* finally check that we fit into the found symbol */
symt_get_info
(
&
module
->
addr_sorttab
[
low
]
->
symt
,
TI_GET_ADDRESS
,
&
ref_addr
);
if
(
addr
<
ref_addr
)
return
NULL
;
if
(
!
symt_get_info
(
&
module
->
addr_sorttab
[
high
-
1
]
->
symt
,
TI_GET_LENGTH
,
&
ref_size
)
||
!
ref_size
)
ref_size
=
0x1000
;
/* arbitrary value */
symt_get_length
(
&
module
->
addr_sorttab
[
low
]
->
symt
,
&
ref_size
);
if
(
addr
>=
ref_addr
+
ref_size
)
return
NULL
;
return
module
->
addr_sorttab
[
low
];
...
...
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