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
c8ab4004
Commit
c8ab4004
authored
Mar 08, 2016
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Use CONTAINING_RECORD instead of reimplementing it.
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8bd3e4cc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
16 deletions
+13
-16
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+0
-3
elf_module.c
dlls/dbghelp/elf_module.c
+1
-1
macho_module.c
dlls/dbghelp/macho_module.c
+1
-1
msc.c
dlls/dbghelp/msc.c
+5
-5
pe_module.c
dlls/dbghelp/pe_module.c
+1
-1
symbol.c
dlls/dbghelp/symbol.c
+4
-4
type.c
dlls/dbghelp/type.c
+1
-1
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
c8ab4004
...
...
@@ -112,9 +112,6 @@ void hash_table_iter_init(const struct hash_table* ht,
struct
hash_table_iter
*
hti
,
const
char
*
name
)
DECLSPEC_HIDDEN
;
void
*
hash_table_iter_up
(
struct
hash_table_iter
*
hti
)
DECLSPEC_HIDDEN
;
#define GET_ENTRY(__i, __t, __f) \
((__t*)((char*)(__i) - FIELD_OFFSET(__t,__f)))
extern
unsigned
dbghelp_options
DECLSPEC_HIDDEN
;
/* some more Wine extensions */
...
...
dlls/dbghelp/elf_module.c
View file @
c8ab4004
...
...
@@ -659,7 +659,7 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table
hash_table_iter_init
(
&
module
->
ht_symbols
,
&
hti
,
NULL
);
while
((
ptr
=
hash_table_iter_up
(
&
hti
)))
{
sym
=
GET_ENTRY
(
ptr
,
struct
symt_ht
,
hash_elt
);
sym
=
CONTAINING_RECORD
(
ptr
,
struct
symt_ht
,
hash_elt
);
switch
(
sym
->
symt
.
tag
)
{
case
SymTagFunction
:
...
...
dlls/dbghelp/macho_module.c
View file @
c8ab4004
...
...
@@ -920,7 +920,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt
hash_table_iter_init
(
&
module
->
ht_symbols
,
&
hti_modules
,
ste
->
ht_elt
.
name
);
while
((
ptr
=
hash_table_iter_up
(
&
hti_modules
)))
{
sym
=
GET_ENTRY
(
ptr
,
struct
symt_ht
,
hash_elt
);
sym
=
CONTAINING_RECORD
(
ptr
,
struct
symt_ht
,
hash_elt
);
if
(
strcmp
(
sym
->
hash_elt
.
name
,
ste
->
ht_elt
.
name
))
continue
;
...
...
dlls/dbghelp/msc.c
View file @
c8ab4004
...
...
@@ -1025,7 +1025,7 @@ static struct symt* codeview_add_type_struct(struct codeview_type_parse* ctp,
hash_table_iter_init
(
&
ctp
->
module
->
ht_types
,
&
hti
,
name
);
while
((
ptr
=
hash_table_iter_up
(
&
hti
)))
{
type
=
GET_ENTRY
(
ptr
,
struct
symt_ht
,
hash_elt
);
type
=
CONTAINING_RECORD
(
ptr
,
struct
symt_ht
,
hash_elt
);
if
(
type
->
symt
.
tag
==
SymTagUDT
&&
type
->
hash_elt
.
name
&&
!
strcmp
(
type
->
hash_elt
.
name
,
name
))
...
...
@@ -2982,9 +2982,9 @@ static BOOL pev_get_val(struct pevaluator* pev, const char* str, DWORD_PTR* val
hash_table_iter_init
(
&
pev
->
values
,
&
hti
,
str
);
while
((
ptr
=
hash_table_iter_up
(
&
hti
)))
{
if
(
!
strcmp
(
GET_ENTRY
(
ptr
,
struct
zvalue
,
elt
)
->
elt
.
name
,
str
))
if
(
!
strcmp
(
CONTAINING_RECORD
(
ptr
,
struct
zvalue
,
elt
)
->
elt
.
name
,
str
))
{
*
val
=
GET_ENTRY
(
ptr
,
struct
zvalue
,
elt
)
->
value
;
*
val
=
CONTAINING_RECORD
(
ptr
,
struct
zvalue
,
elt
)
->
value
;
return
TRUE
;
}
}
...
...
@@ -3037,9 +3037,9 @@ static BOOL pev_set_value(struct pevaluator* pev, const char* name, DWORD_PTR v
hash_table_iter_init
(
&
pev
->
values
,
&
hti
,
name
);
while
((
ptr
=
hash_table_iter_up
(
&
hti
)))
{
if
(
!
strcmp
(
GET_ENTRY
(
ptr
,
struct
zvalue
,
elt
)
->
elt
.
name
,
name
))
if
(
!
strcmp
(
CONTAINING_RECORD
(
ptr
,
struct
zvalue
,
elt
)
->
elt
.
name
,
name
))
{
GET_ENTRY
(
ptr
,
struct
zvalue
,
elt
)
->
value
=
val
;
CONTAINING_RECORD
(
ptr
,
struct
zvalue
,
elt
)
->
value
=
val
;
break
;
}
}
...
...
dlls/dbghelp/pe_module.c
View file @
c8ab4004
...
...
@@ -369,7 +369,7 @@ static BOOL pe_locate_with_coff_symbol_table(struct module* module)
hash_table_iter_init
(
&
module
->
ht_symbols
,
&
hti
,
name
);
while
((
ptr
=
hash_table_iter_up
(
&
hti
)))
{
sym
=
GET_ENTRY
(
ptr
,
struct
symt_data
,
hash_elt
);
sym
=
CONTAINING_RECORD
(
ptr
,
struct
symt_data
,
hash_elt
);
if
(
sym
->
symt
.
tag
==
SymTagData
&&
(
sym
->
kind
==
DataIsGlobal
||
sym
->
kind
==
DataIsFileStatic
)
&&
sym
->
u
.
var
.
kind
==
loc_absolute
&&
...
...
dlls/dbghelp/symbol.c
View file @
c8ab4004
...
...
@@ -422,7 +422,7 @@ struct symt_block* symt_close_func_block(struct module* module,
if
(
pc
)
block
->
size
=
func
->
address
+
pc
-
block
->
address
;
return
(
block
->
container
->
tag
==
SymTagBlock
)
?
GET_ENTRY
(
block
->
container
,
struct
symt_block
,
symt
)
:
NULL
;
CONTAINING_RECORD
(
block
->
container
,
struct
symt_block
,
symt
)
:
NULL
;
}
struct
symt_hierarchy_point
*
symt_add_function_point
(
struct
module
*
module
,
...
...
@@ -741,7 +741,7 @@ static BOOL symt_enum_module(struct module_pair* pair, const WCHAR* match,
hash_table_iter_init
(
&
pair
->
effective
->
ht_symbols
,
&
hti
,
NULL
);
while
((
ptr
=
hash_table_iter_up
(
&
hti
)))
{
sym
=
GET_ENTRY
(
ptr
,
struct
symt_ht
,
hash_elt
);
sym
=
CONTAINING_RECORD
(
ptr
,
struct
symt_ht
,
hash_elt
);
nameW
=
symt_get_nameW
(
&
sym
->
symt
);
ret
=
SymMatchStringW
(
nameW
,
match
,
FALSE
);
HeapFree
(
GetProcessHeap
(),
0
,
nameW
);
...
...
@@ -1329,7 +1329,7 @@ static BOOL find_name(struct process* pcs, struct module* module, const char* na
hash_table_iter_init
(
&
pair
.
effective
->
ht_symbols
,
&
hti
,
name
);
while
((
ptr
=
hash_table_iter_up
(
&
hti
)))
{
sym
=
GET_ENTRY
(
ptr
,
struct
symt_ht
,
hash_elt
);
sym
=
CONTAINING_RECORD
(
ptr
,
struct
symt_ht
,
hash_elt
);
if
(
!
strcmp
(
sym
->
hash_elt
.
name
,
name
))
{
...
...
@@ -2148,7 +2148,7 @@ BOOL WINAPI SymEnumLines(HANDLE hProcess, ULONG64 base, PCSTR compiland,
{
unsigned
int
i
;
sym
=
GET_ENTRY
(
ptr
,
struct
symt_ht
,
hash_elt
);
sym
=
CONTAINING_RECORD
(
ptr
,
struct
symt_ht
,
hash_elt
);
if
(
sym
->
symt
.
tag
!=
SymTagFunction
)
continue
;
sci
.
FileName
[
0
]
=
'\0'
;
...
...
dlls/dbghelp/type.c
View file @
c8ab4004
...
...
@@ -170,7 +170,7 @@ static struct symt* symt_find_type_by_name(const struct module* module,
hash_table_iter_init
(
&
module
->
ht_types
,
&
hti
,
typename
);
while
((
ptr
=
hash_table_iter_up
(
&
hti
)))
{
type
=
GET_ENTRY
(
ptr
,
struct
symt_ht
,
hash_elt
);
type
=
CONTAINING_RECORD
(
ptr
,
struct
symt_ht
,
hash_elt
);
if
((
sym_tag
==
SymTagNull
||
type
->
symt
.
tag
==
sym_tag
)
&&
type
->
hash_elt
.
name
&&
!
strcmp
(
type
->
hash_elt
.
name
,
typename
))
...
...
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