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
40fb62c9
Commit
40fb62c9
authored
Jan 17, 2011
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Dump streams names information out of ROOT object.
parent
b7635f96
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
8 deletions
+73
-8
pdb.c
tools/winedump/pdb.c
+73
-8
No files found.
tools/winedump/pdb.c
View file @
40fb62c9
...
...
@@ -599,16 +599,51 @@ static void pdb_jg_dump(void)
reader
.
u
.
jg
.
root
=
reader
.
read_file
(
&
reader
,
1
);
if
(
reader
.
u
.
jg
.
root
)
{
DWORD
*
pdw
;
DWORD
*
ok_bits
;
DWORD
numok
,
count
;
unsigned
i
;
printf
(
"Root:
\n
"
"
\t
Version: %u
\n
"
"
\t
TimeDateStamp: %08x
\n
"
"
\t
Age: %08x
\n
"
"
\t
names: %
.*s
\n
"
,
"
\t
names: %
d
\n
"
,
reader
.
u
.
jg
.
root
->
Version
,
reader
.
u
.
jg
.
root
->
TimeDateStamp
,
reader
.
u
.
jg
.
root
->
Age
,
(
unsigned
)
reader
.
u
.
jg
.
root
->
cbNames
,
reader
.
u
.
jg
.
root
->
names
);
(
unsigned
)
reader
.
u
.
jg
.
root
->
cbNames
);
pdw
=
(
DWORD
*
)(
&
reader
.
u
.
jg
.
root
->
names
[
0
]
+
reader
.
u
.
jg
.
root
->
cbNames
);
numok
=
*
pdw
++
;
count
=
*
pdw
++
;
printf
(
"
\t
Streams directory:
\n
"
"
\t\t
ok: %08x
\n
"
"
\t\t
count: %08x
\n
"
"
\t\t
table:
\n
"
,
numok
,
count
);
/* bitfield: first dword is len (in dword), then data */
ok_bits
=
pdw
;
pdw
+=
*
ok_bits
++
+
1
;
if
(
*
pdw
++
!=
0
)
{
printf
(
"unexpected value
\n
"
);
return
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
ok_bits
[
i
/
32
]
&
(
1
<<
(
i
%
32
)))
{
DWORD
string_idx
,
stream_idx
;
string_idx
=
*
pdw
++
;
stream_idx
=
*
pdw
++
;
printf
(
"
\t\t\t
%2d) %-20s => %x
\n
"
,
i
,
&
reader
.
u
.
jg
.
root
->
names
[
string_idx
],
stream_idx
);
numok
--
;
}
}
if
(
numok
)
printf
(
">>> unmatched present field with found
\n
"
);
/* Check for unknown versions */
switch
(
reader
.
u
.
jg
.
root
->
Version
)
...
...
@@ -644,7 +679,6 @@ static void pdb_jg_dump(void)
free(segs);
}
#endif
pdb_dump_symbols
(
&
reader
);
}
else
printf
(
"-Unable to get root
\n
"
);
...
...
@@ -737,7 +771,10 @@ static void pdb_ds_dump(void)
reader
.
u
.
ds
.
root
=
reader
.
read_file
(
&
reader
,
1
);
if
(
reader
.
u
.
ds
.
root
)
{
const
char
*
ptr
;
DWORD
*
pdw
;
DWORD
*
ok_bits
;
DWORD
numok
,
count
;
unsigned
i
;
printf
(
"Root:
\n
"
"
\t
Version: %u
\n
"
...
...
@@ -750,9 +787,37 @@ static void pdb_ds_dump(void)
reader
.
u
.
ds
.
root
->
Age
,
get_guid_str
(
&
reader
.
u
.
ds
.
root
->
guid
),
reader
.
u
.
ds
.
root
->
cbNames
);
for
(
ptr
=
&
reader
.
u
.
ds
.
root
->
names
[
0
];
ptr
<
&
reader
.
u
.
ds
.
root
->
names
[
0
]
+
reader
.
u
.
ds
.
root
->
cbNames
;
ptr
+=
strlen
(
ptr
)
+
1
)
printf
(
"
\t
String: %s
\n
"
,
ptr
);
/* follows an unknown list of DWORDs */
pdw
=
(
DWORD
*
)(
&
reader
.
u
.
ds
.
root
->
names
[
0
]
+
reader
.
u
.
ds
.
root
->
cbNames
);
numok
=
*
pdw
++
;
count
=
*
pdw
++
;
printf
(
"
\t
Streams directory:
\n
"
"
\t\t
ok: %08x
\n
"
"
\t\t
count: %08x
\n
"
"
\t\t
table:
\n
"
,
numok
,
count
);
/* bitfield: first dword is len (in dword), then data */
ok_bits
=
pdw
;
pdw
+=
*
ok_bits
++
+
1
;
if
(
*
pdw
++
!=
0
)
{
printf
(
"unexpected value
\n
"
);
return
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
ok_bits
[
i
/
32
]
&
(
1
<<
(
i
%
32
)))
{
DWORD
string_idx
,
stream_idx
;
string_idx
=
*
pdw
++
;
stream_idx
=
*
pdw
++
;
printf
(
"
\t\t\t
%2d) %-20s => %x
\n
"
,
i
,
&
reader
.
u
.
ds
.
root
->
names
[
string_idx
],
stream_idx
);
numok
--
;
}
}
if
(
numok
)
printf
(
">>> unmatched present field with found
\n
"
);
pdb_dump_types
(
&
reader
);
pdb_dump_symbols
(
&
reader
);
pdb_dump_fpo
(
&
reader
);
...
...
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