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
34636b02
Commit
34636b02
authored
Mar 05, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Added type for array index.
- added type for array index - correctly parsing array index type in stabs, Dwarf2 and MSC formats - fixed SyGetTypeInfo accordingly
parent
f7441f9e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
21 deletions
+31
-21
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+3
-2
dwarf.c
dlls/dbghelp/dwarf.c
+3
-1
msc.c
dlls/dbghelp/msc.c
+7
-5
stabs.c
dlls/dbghelp/stabs.c
+6
-5
type.c
dlls/dbghelp/type.c
+12
-8
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
34636b02
...
...
@@ -197,7 +197,8 @@ struct symt_array
struct
symt
symt
;
int
start
;
int
end
;
struct
symt
*
basetype
;
struct
symt
*
base_type
;
struct
symt
*
index_type
;
};
struct
symt_basic
...
...
@@ -475,7 +476,7 @@ extern BOOL symt_add_enum_element(struct module* module,
const
char
*
name
,
int
value
);
extern
struct
symt_array
*
symt_new_array
(
struct
module
*
module
,
int
min
,
int
max
,
struct
symt
*
base
);
struct
symt
*
base
,
struct
symt
*
index
);
extern
struct
symt_function_signature
*
symt_new_function_signature
(
struct
module
*
module
,
struct
symt
*
ret_type
,
...
...
dlls/dbghelp/dwarf.c
View file @
34636b02
...
...
@@ -1050,6 +1050,7 @@ static void dwarf2_parse_array_subrange_type(struct module* module, dwarf2_abbre
}
parent
->
start
=
min
;
parent
->
end
=
max
;
parent
->
index_type
=
idx_type
;
TRACE
(
"found min:%u max:%u
\n
"
,
min
,
max
);
...
...
@@ -1087,7 +1088,8 @@ static struct symt_array* dwarf2_parse_array_type(struct module* module, dwarf2_
}
}
symt
=
symt_new_array
(
module
,
min
,
max
,
ref_type
);
/* FIXME: ugly as hell */
symt
=
symt_new_array
(
module
,
min
,
max
,
ref_type
,
NULL
);
if
(
entry
->
have_child
)
{
/** any interest to not have child ? */
++
ctx
->
level
;
...
...
dlls/dbghelp/msc.c
View file @
34636b02
...
...
@@ -388,10 +388,12 @@ static int codeview_add_type_pointer(struct module* module, unsigned int typeno,
static
int
codeview_add_type_array
(
struct
module
*
module
,
unsigned
int
typeno
,
const
char
*
name
,
unsigned
int
elemtype
,
unsigned
int
arr_len
)
unsigned
int
elemtype
,
unsigned
int
indextype
,
unsigned
int
arr_len
)
{
struct
symt
*
symt
;
struct
symt
*
elem
=
codeview_get_type
(
elemtype
,
FALSE
);
struct
symt
*
index
=
codeview_get_type
(
indextype
,
FALSE
);
DWORD
arr_max
=
0
;
if
(
elem
)
...
...
@@ -400,7 +402,7 @@ static int codeview_add_type_array(struct module* module,
symt_get_info
(
elem
,
TI_GET_LENGTH
,
&
elem_size
);
if
(
elem_size
)
arr_max
=
arr_len
/
(
DWORD
)
elem_size
;
}
symt
=
&
symt_new_array
(
module
,
0
,
arr_max
,
elem
)
->
symt
;
symt
=
&
symt_new_array
(
module
,
0
,
arr_max
,
elem
,
index
)
->
symt
;
return
codeview_add_type
(
typeno
,
symt
);
}
...
...
@@ -792,21 +794,21 @@ static int codeview_parse_type_table(struct module* module, const BYTE* table,
p_name
=
(
const
struct
p_string
*
)((
const
unsigned
char
*
)
&
type
->
array_v1
.
arrlen
+
leaf_len
);
retv
=
codeview_add_type_array
(
module
,
curr_type
,
terminate_string
(
p_name
),
type
->
array_v1
.
elemtype
,
value
);
type
->
array_v1
.
elemtype
,
type
->
array_v1
.
idxtype
,
value
);
break
;
case
LF_ARRAY_V2
:
leaf_len
=
numeric_leaf
(
&
value
,
&
type
->
array_v2
.
arrlen
);
p_name
=
(
const
struct
p_string
*
)((
const
unsigned
char
*
)
&
type
->
array_v2
.
arrlen
+
leaf_len
);
retv
=
codeview_add_type_array
(
module
,
curr_type
,
terminate_string
(
p_name
),
type
->
array_v2
.
elemtype
,
value
);
type
->
array_v2
.
elemtype
,
type
->
array_v2
.
idxtype
,
value
);
break
;
case
LF_ARRAY_V3
:
leaf_len
=
numeric_leaf
(
&
value
,
&
type
->
array_v3
.
arrlen
);
c_name
=
(
const
char
*
)
&
type
->
array_v3
.
arrlen
+
leaf_len
;
retv
=
codeview_add_type_array
(
module
,
curr_type
,
c_name
,
type
->
array_v3
.
elemtype
,
value
);
type
->
array_v3
.
elemtype
,
type
->
array_v3
.
idxtype
,
value
);
break
;
case
LF_BITFIELD_V1
:
...
...
dlls/dbghelp/stabs.c
View file @
34636b02
...
...
@@ -765,22 +765,23 @@ static inline int stabs_pts_read_array(struct ParseTypedefData* ptd,
struct
symt
**
adt
)
{
long
lo
,
hi
;
struct
symt
*
rdt
;
struct
symt
*
range_dt
;
struct
symt
*
base_dt
;
/* ar<typeinfo_nodef>;<int>;<int>;<typeinfo> */
PTS_ABORTIF
(
ptd
,
*
ptd
->
ptr
++
!=
'r'
);
/* FIXME: range type is lost, always assume int */
PTS_ABORTIF
(
ptd
,
stabs_pts_read_type_def
(
ptd
,
NULL
,
&
rdt
)
==
-
1
);
PTS_ABORTIF
(
ptd
,
stabs_pts_read_type_def
(
ptd
,
NULL
,
&
r
ange_
dt
)
==
-
1
);
PTS_ABORTIF
(
ptd
,
*
ptd
->
ptr
++
!=
';'
);
/* ';' */
PTS_ABORTIF
(
ptd
,
stabs_pts_read_number
(
ptd
,
&
lo
)
==
-
1
);
PTS_ABORTIF
(
ptd
,
*
ptd
->
ptr
++
!=
';'
);
/* ';' */
PTS_ABORTIF
(
ptd
,
stabs_pts_read_number
(
ptd
,
&
hi
)
==
-
1
);
PTS_ABORTIF
(
ptd
,
*
ptd
->
ptr
++
!=
';'
);
/* ';' */
PTS_ABORTIF
(
ptd
,
stabs_pts_read_type_def
(
ptd
,
NULL
,
&
r
dt
)
==
-
1
);
PTS_ABORTIF
(
ptd
,
stabs_pts_read_type_def
(
ptd
,
NULL
,
&
base_
dt
)
==
-
1
);
*
adt
=
&
symt_new_array
(
ptd
->
module
,
lo
,
hi
,
r
dt
)
->
symt
;
*
adt
=
&
symt_new_array
(
ptd
->
module
,
lo
,
hi
,
base_dt
,
range_
dt
)
->
symt
;
return
0
;
}
...
...
dlls/dbghelp/type.c
View file @
34636b02
...
...
@@ -282,16 +282,17 @@ BOOL symt_add_enum_element(struct module* module, struct symt_enum* enum_type,
}
struct
symt_array
*
symt_new_array
(
struct
module
*
module
,
int
min
,
int
max
,
struct
symt
*
base
)
struct
symt
*
base
,
struct
symt
*
index
)
{
struct
symt_array
*
sym
;
if
((
sym
=
pool_alloc
(
&
module
->
pool
,
sizeof
(
*
sym
))))
{
sym
->
symt
.
tag
=
SymTagArrayType
;
sym
->
start
=
min
;
sym
->
end
=
max
;
sym
->
basetype
=
base
;
sym
->
symt
.
tag
=
SymTagArrayType
;
sym
->
start
=
min
;
sym
->
end
=
max
;
sym
->
base_type
=
base
;
sym
->
index_type
=
index
;
symt_add_type
(
module
,
&
sym
->
symt
);
}
return
sym
;
...
...
@@ -597,7 +598,7 @@ BOOL symt_get_info(const struct symt* type, IMAGEHLP_SYMBOL_TYPE_INFO req,
X
(
DWORD64
)
=
((
const
struct
symt_data
*
)
type
)
->
u
.
s
.
length
;
break
;
case
SymTagArrayType
:
if
(
!
symt_get_info
(((
const
struct
symt_array
*
)
type
)
->
basetype
,
if
(
!
symt_get_info
(((
const
struct
symt_array
*
)
type
)
->
base
_
type
,
TI_GET_LENGTH
,
pInfo
))
return
FALSE
;
X
(
DWORD64
)
*=
((
const
struct
symt_array
*
)
type
)
->
end
-
...
...
@@ -702,7 +703,7 @@ BOOL symt_get_info(const struct symt* type, IMAGEHLP_SYMBOL_TYPE_INFO req,
{
/* hierarchical => hierarchical */
case
SymTagArrayType
:
X
(
DWORD
)
=
(
DWORD
)((
const
struct
symt_array
*
)
type
)
->
basetype
;
X
(
DWORD
)
=
(
DWORD
)((
const
struct
symt_array
*
)
type
)
->
base
_
type
;
break
;
case
SymTagPointerType
:
X
(
DWORD
)
=
(
DWORD
)((
const
struct
symt_pointer
*
)
type
)
->
pointsto
;
...
...
@@ -753,11 +754,14 @@ BOOL symt_get_info(const struct symt* type, IMAGEHLP_SYMBOL_TYPE_INFO req,
}
else
X
(
DWORD
)
=
((
const
struct
symt_function_signature
*
)
type
)
->
call_conv
;
break
;
case
TI_GET_ARRAYINDEXTYPEID
:
if
(
type
->
tag
!=
SymTagArrayType
)
return
FALSE
;
X
(
DWORD
)
=
(
DWORD
)((
const
struct
symt_array
*
)
type
)
->
index_type
;
break
;
#undef X
case
TI_GET_ADDRESSOFFSET
:
case
TI_GET_ARRAYINDEXTYPEID
:
case
TI_GET_CLASSPARENTID
:
case
TI_GET_SYMINDEX
:
case
TI_GET_THISADJUST
:
...
...
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