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
5ddcb94a
Commit
5ddcb94a
authored
Aug 24, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Aug 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Correct and update a couple of infos in PDB symbol stream header.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8a9117ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
20 deletions
+67
-20
msc.c
dlls/dbghelp/msc.c
+2
-2
mscvpdb.h
include/wine/mscvpdb.h
+8
-6
pdb.c
tools/winedump/pdb.c
+57
-12
No files found.
dlls/dbghelp/msc.c
View file @
5ddcb94a
...
...
@@ -2392,8 +2392,8 @@ static void pdb_convert_symbols_header(PDB_SYMBOLS* symbols,
symbols
->
hash_size
=
old
->
hash_size
;
symbols
->
srcmodule_size
=
old
->
srcmodule_size
;
symbols
->
pdbimport_size
=
0
;
symbols
->
hash1_file
=
old
->
hash1
_file
;
symbols
->
hash2_file
=
old
->
hash2
_file
;
symbols
->
global_file
=
old
->
global
_file
;
symbols
->
public_file
=
old
->
public
_file
;
symbols
->
gsym_file
=
old
->
gsym_file
;
*
header_size
=
sizeof
(
PDB_SYMBOLS_OLD
);
...
...
include/wine/mscvpdb.h
View file @
5ddcb94a
...
...
@@ -2367,8 +2367,8 @@ typedef struct _PDB_SYMBOL_IMPORT
typedef
struct
_PDB_SYMBOLS_OLD
{
WORD
hash1
_file
;
WORD
hash2
_file
;
WORD
global
_file
;
WORD
public
_file
;
WORD
gsym_file
;
WORD
pad
;
DWORD
module_size
;
...
...
@@ -2381,11 +2381,13 @@ typedef struct _PDB_SYMBOLS
{
DWORD
signature
;
DWORD
version
;
DWORD
unknown
;
DWORD
hash1_file
;
DWORD
hash2_file
;
DWORD
age
;
WORD
global_file
;
WORD
flags
;
WORD
public_file
;
WORD
bldVer
;
WORD
gsym_file
;
WORD
unknown1
;
WORD
rbldVer
;
DWORD
module_size
;
DWORD
offset_size
;
DWORD
hash_size
;
...
...
tools/winedump/pdb.c
View file @
5ddcb94a
...
...
@@ -222,6 +222,36 @@ static void *read_string_table(struct pdb_reader* reader)
return
NULL
;
}
static
void
dump_global_symbol
(
struct
pdb_reader
*
reader
,
unsigned
file
)
{
void
*
global
=
NULL
;
DWORD
size
;
global
=
reader
->
read_file
(
reader
,
file
);
if
(
!
global
)
return
;
size
=
pdb_get_file_size
(
reader
,
file
);
printf
(
"Global symbols table:
\n
"
);
dump_data
(
global
,
size
,
"
\t
"
);
free
(
global
);
}
static
void
dump_public_symbol
(
struct
pdb_reader
*
reader
,
unsigned
file
)
{
void
*
public
=
NULL
;
DWORD
size
;
public
=
reader
->
read_file
(
reader
,
file
);
if
(
!
public
)
return
;
size
=
pdb_get_file_size
(
reader
,
file
);
printf
(
"Public symbols table:
\n
"
);
dump_data
(
public
,
size
,
"
\t
"
);
free
(
public
);
}
static
void
pdb_dump_symbols
(
struct
pdb_reader
*
reader
,
PDB_STREAM_INDEXES
*
sidx
)
{
PDB_SYMBOLS
*
symbols
;
...
...
@@ -229,6 +259,7 @@ static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx
const
char
*
file
;
char
*
filesimage
;
DWORD
filessize
=
0
;
char
tcver
[
32
];
sidx
->
FPO
=
sidx
->
unk0
=
sidx
->
unk1
=
sidx
->
unk2
=
sidx
->
unk3
=
sidx
->
segments
=
sidx
->
unk4
=
sidx
->
unk5
=
sidx
->
unk6
=
sidx
->
FPO_EXT
=
sidx
->
unk7
=
-
1
;
...
...
@@ -246,14 +277,20 @@ static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx
default:
printf
(
"-Unknown symbol info version %d
\n
"
,
symbols
->
version
);
}
if
(
symbols
->
flags
&
0x8000
)
/* new */
snprintf
(
tcver
,
sizeof
(
tcver
),
"%u.%u"
,
(
symbols
->
flags
>>
8
)
&
0x7f
,
symbols
->
flags
&
0xff
);
else
snprintf
(
tcver
,
sizeof
(
tcver
),
"old-%x"
,
symbols
->
flags
);
printf
(
"Symbols:
\n
"
"
\t
signature: %08x
\n
"
"
\t
version: %u
\n
"
"
\t
unknown: %08x
\n
"
"
\t
hash1_file: %08x
\n
"
"
\t
hash2_file: %08x
\n
"
"
\t
gsym_file: %04x
\n
"
"
\t
unknown1: %04x
\n
"
"
\t
age: %08x
\n
"
"
\t
global_file: %u
\n
"
"
\t
builder: %s
\n
"
"
\t
public_file: %u
\n
"
"
\t
bldVer: %u
\n
"
"
\t
gsym_file: %u
\n
"
"
\t
rbldVer: %u
\n
"
"
\t
module_size: %08x
\n
"
"
\t
offset_size: %08x
\n
"
"
\t
hash_size: %08x
\n
"
...
...
@@ -264,14 +301,16 @@ static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx
"
\t
unknown2_size: %08x
\n
"
"
\t
resvd3: %04x
\n
"
"
\t
machine: %s
\n
"
"
\t
resvd
[4]
%08x
\n
"
,
"
\t
resvd
4
%08x
\n
"
,
symbols
->
signature
,
symbols
->
version
,
symbols
->
unknown
,
symbols
->
hash1_file
,
symbols
->
hash2_file
,
symbols
->
age
,
symbols
->
global_file
,
tcver
,
/* from symbols->flags */
symbols
->
public_file
,
symbols
->
bldVer
,
symbols
->
gsym_file
,
symbols
->
unknown1
,
symbols
->
rbldVer
,
symbols
->
module_size
,
symbols
->
offset_size
,
symbols
->
hash_size
,
...
...
@@ -558,6 +597,8 @@ static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx
file_name
+=
strlen
(
file_name
)
+
1
;
file
=
(
char
*
)((
DWORD_PTR
)(
file_name
+
strlen
(
file_name
)
+
1
+
3
)
&
~
3
);
}
dump_global_symbol
(
reader
,
symbols
->
global_file
);
dump_public_symbol
(
reader
,
symbols
->
public_file
);
free
(
symbols
);
free
(
filesimage
);
}
...
...
@@ -883,18 +924,22 @@ static void pdb_ds_dump(void)
reader
.
u
.
ds
.
header
->
unknown2
,
reader
.
u
.
ds
.
header
->
toc_page
);
/* files:
* 0: JG says old toc pages
, I'd say free pages (tbc, low prio)
/* files
with static indexes
:
* 0: JG says old toc pages
* 1: root structure
* 2: types
* 3: modules
* 4: types (second stream)
* other known streams:
* - string table: its index is in the stream table from ROOT object under "/names"
* - type hash table: its index is in the types header (2 and 4)
* - global and public streams: from symbol stream header
* those streams get their indexes out of the PDB_STREAM_INDEXES object
* - FPO data
* - segments
* - extended FPO data
*/
reader
.
file_used
[
0
]
|=
1
;
/* mark stream #0 as read */
reader
.
u
.
ds
.
root
=
reader
.
read_file
(
&
reader
,
1
);
if
(
reader
.
u
.
ds
.
root
)
{
...
...
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