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
7b83b70b
Commit
7b83b70b
authored
Dec 14, 2009
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Rewrite the symt* <=> index wrappers to that they work on 64bit platforms.
parent
92b9b094
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
10 deletions
+36
-10
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+3
-10
module.c
dlls/dbghelp/module.c
+2
-0
symbol.c
dlls/dbghelp/symbol.c
+31
-0
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
7b83b70b
...
...
@@ -335,6 +335,7 @@ struct module
struct
pool
pool
;
/* symbols & symbol tables */
struct
vector
vsymt
;
int
sortlist_valid
;
unsigned
num_sorttab
;
/* number of symbols with addresses */
unsigned
num_symbols
;
...
...
@@ -418,16 +419,6 @@ struct pdb_lookup
}
u
;
};
static
inline
DWORD
symt_ptr2index
(
struct
module
*
module
,
const
struct
symt
*
sym
)
{
return
(
DWORD
)
sym
;
}
static
inline
struct
symt
*
symt_index2ptr
(
struct
module
*
module
,
DWORD
id
)
{
return
(
struct
symt
*
)
id
;
}
/* dbghelp.c */
extern
struct
process
*
process_find_by_handle
(
HANDLE
hProcess
);
extern
HANDLE
hMsvcrt
;
...
...
@@ -614,6 +605,8 @@ extern struct symt_hierarchy_point*
symt_new_label
(
struct
module
*
module
,
struct
symt_compiland
*
compiland
,
const
char
*
name
,
unsigned
long
address
);
extern
struct
symt
*
symt_index2ptr
(
struct
module
*
module
,
DWORD
id
);
extern
DWORD
symt_ptr2index
(
struct
module
*
module
,
const
struct
symt
*
sym
);
/* type.c */
extern
void
symt_init_basic
(
struct
module
*
module
);
...
...
dlls/dbghelp/module.c
View file @
7b83b70b
...
...
@@ -173,6 +173,8 @@ struct module* module_new(struct process* pcs, const WCHAR* name,
module
->
addr_sorttab
=
NULL
;
module
->
num_sorttab
=
0
;
module
->
num_symbols
=
0
;
vector_init
(
&
module
->
vsymt
,
sizeof
(
struct
symt
*
),
128
);
/* FIXME: this seems a bit too high (on a per module basis)
* need some statistics about this
*/
...
...
dlls/dbghelp/symbol.c
View file @
7b83b70b
...
...
@@ -69,6 +69,37 @@ int symt_cmp_addr(const void* p1, const void* p2)
return
cmp_addr
(
a1
,
a2
);
}
DWORD
symt_ptr2index
(
struct
module
*
module
,
const
struct
symt
*
sym
)
{
#ifdef _WIN64
const
struct
symt
**
c
;
int
len
=
vector_length
(
&
module
->
vsymt
),
i
;
/* FIXME: this is inefficient */
for
(
i
=
0
;
i
<
len
;
i
++
)
{
if
(
*
(
struct
symt
**
)
vector_at
(
&
module
->
vsymt
,
i
)
==
sym
)
return
i
+
1
;
}
/* not found */
c
=
vector_add
(
&
module
->
vsymt
,
&
module
->
pool
);
if
(
c
)
*
c
=
sym
;
return
len
+
1
;
#else
return
(
DWORD
)
sym
;
#endif
}
struct
symt
*
symt_index2ptr
(
struct
module
*
module
,
DWORD
id
)
{
#ifdef _WIN64
if
(
!
id
--
||
id
>=
vector_length
(
&
module
->
vsymt
))
return
NULL
;
return
*
(
struct
symt
**
)
vector_at
(
&
module
->
vsymt
,
id
);
#else
return
(
struct
symt
*
)
id
;
#endif
}
static
BOOL
symt_grow_sorttab
(
struct
module
*
module
,
unsigned
sz
)
{
struct
symt_ht
**
new
;
...
...
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