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
982775dd
Commit
982775dd
authored
Jan 08, 2011
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Added support for dumping FPO streams.
parent
cca319d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
4 deletions
+78
-4
mscvpdb.h
include/wine/mscvpdb.h
+16
-0
pdb.c
tools/winedump/pdb.c
+62
-4
No files found.
include/wine/mscvpdb.h
View file @
982775dd
...
...
@@ -1917,6 +1917,22 @@ typedef struct _PDB_SYMBOLS
DWORD
resvd
[
5
];
}
PDB_SYMBOLS
,
*
PPDB_SYMBOLS
;
typedef
struct
_PDB_FPO_DATA
{
DWORD
start
;
DWORD
func_size
;
DWORD
locals_size
;
DWORD
params_size
;
DWORD
maxstack_size
;
DWORD
str_offset
;
WORD
prolog_size
;
WORD
savedregs_size
;
#define PDB_FPO_DFL_SEH 0x00000001
#define PDB_FPO_DFL_EH 0x00000002
#define PDB_FPO_DFL_IN_BLOCK 0x00000004
DWORD
flags
;
}
PDB_FPO_DATA
;
#include "poppack.h"
/* ----------------------------------------------
...
...
tools/winedump/pdb.c
View file @
982775dd
...
...
@@ -508,6 +508,59 @@ static void pdb_dump_types(struct pdb_reader* reader)
free
(
types
);
}
static
void
pdb_dump_fpo
(
struct
pdb_reader
*
reader
)
{
FPO_DATA
*
fpo
;
PDB_FPO_DATA
*
fpoext
;
unsigned
i
,
size
,
strsize
;
char
*
strbase
;
const
char
*
frame_type
[
4
]
=
{
"Fpo"
,
"Trap"
,
"Tss"
,
"NonFpo"
};
fpo
=
reader
->
read_file
(
reader
,
5
);
size
=
pdb_get_file_size
(
reader
,
5
);
if
(
fpo
&&
(
size
%
sizeof
(
*
fpo
))
==
0
)
{
size
/=
sizeof
(
*
fpo
);
printf
(
"FPO data:
\n\t
Start Length #loc #pmt #prolog #reg frame SEH /BP
\n
"
);
for
(
i
=
0
;
i
<
size
;
i
++
)
{
printf
(
"
\t
%08x %08x %4d %4d %7d %4d %6s %c %c
\n
"
,
fpo
[
i
].
ulOffStart
,
fpo
[
i
].
cbProcSize
,
fpo
[
i
].
cdwLocals
,
fpo
[
i
].
cdwParams
,
fpo
[
i
].
cbProlog
,
fpo
[
i
].
cbRegs
,
frame_type
[
fpo
[
i
].
cbFrame
],
fpo
[
i
].
fHasSEH
?
'Y'
:
'N'
,
fpo
[
i
].
fUseBP
?
'Y'
:
'N'
);
}
}
free
(
fpo
);
strbase
=
reader
->
read_file
(
reader
,
12
);
/* FIXME: really fixed ??? */
if
(
!
strbase
)
return
;
if
(
*
(
const
DWORD
*
)
strbase
!=
0xeffeeffe
)
{
printf
(
"wrong header %x expecting 0xeffeeffe
\n
"
,
*
(
const
DWORD
*
)
strbase
);
free
(
strbase
);
return
;
}
strsize
=
*
(
const
DWORD
*
)(
strbase
+
8
);
fpoext
=
reader
->
read_file
(
reader
,
10
);
size
=
pdb_get_file_size
(
reader
,
10
);
if
(
fpoext
&&
(
size
%
sizeof
(
*
fpoext
))
==
0
)
{
size
/=
sizeof
(
*
fpoext
);
printf
(
"FPO data (extended):
\n
"
"
\t
Start Length Locals Params MaxStack Prolog #SavedRegs Flags Command
\n
"
);
for
(
i
=
0
;
i
<
size
;
i
++
)
{
printf
(
"
\t
%08x %08x %8x %8x %8x %6x %8x %08x %s
\n
"
,
fpoext
[
i
].
start
,
fpoext
[
i
].
func_size
,
fpoext
[
i
].
locals_size
,
fpoext
[
i
].
params_size
,
fpoext
[
i
].
maxstack_size
,
fpoext
[
i
].
prolog_size
,
fpoext
[
i
].
savedregs_size
,
fpoext
[
i
].
flags
,
fpoext
[
i
].
str_offset
<
strsize
?
strbase
+
12
+
fpoext
[
i
].
str_offset
:
"<out of bounds>"
);
}
}
free
(
fpoext
);
free
(
strbase
);
}
static
const
char
pdb2
[]
=
"Microsoft C/C++ program database 2.00"
;
static
void
pdb_jg_dump
(
void
)
...
...
@@ -662,10 +715,14 @@ static void pdb_ds_dump(void)
reader
.
u
.
ds
.
header
->
toc_page
);
/* files:
* 0: JG says old toc pages, I'd say free pages (tbc, low prio)
* 1: root structure
* 2: types
* 3: modules
* 0: JG says old toc pages, I'd say free pages (tbc, low prio)
* 1: root structure
* 2: types
* 3: modules
* 5: FPO data
* 8: segments
* 10: extended FPO data
* 12: string table (FPO unwinder, files for linetab2...)
*/
root
=
reader
.
read_file
(
&
reader
,
1
);
if
(
root
)
...
...
@@ -692,6 +749,7 @@ static void pdb_ds_dump(void)
pdb_dump_types
(
&
reader
);
pdb_dump_symbols
(
&
reader
);
pdb_dump_fpo
(
&
reader
);
pdb_exit
(
&
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