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
f8380ba3
Commit
f8380ba3
authored
Sep 29, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Now dumping codeview source line information.
parent
864a60d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
0 deletions
+59
-0
msc.c
tools/winedump/msc.c
+54
-0
pdb.c
tools/winedump/pdb.c
+4
-0
winedump.h
tools/winedump/winedump.h
+1
-0
No files found.
tools/winedump/msc.c
View file @
f8380ba3
...
...
@@ -1311,3 +1311,57 @@ int codeview_dump_symbols(const void* root, unsigned long size)
}
return
0
;
}
void
codeview_dump_linetab
(
const
char
*
linetab
,
DWORD
size
,
BOOL
pascal_str
,
const
char
*
pfx
)
{
const
char
*
ptr
=
linetab
;
int
nfile
,
nseg
,
nline
;
int
i
,
j
,
k
;
const
unsigned
int
*
filetab
;
const
unsigned
int
*
lt_ptr
;
const
struct
startend
*
start
;
nfile
=
*
(
const
short
*
)
linetab
;
filetab
=
(
const
unsigned
int
*
)(
linetab
+
2
*
sizeof
(
short
));
printf
(
"%s%d files with %d ???
\n
"
,
pfx
,
nfile
,
*
(
const
short
*
)(
linetab
+
sizeof
(
short
)));
for
(
i
=
0
;
i
<
nfile
;
i
++
)
{
ptr
=
linetab
+
filetab
[
i
];
nseg
=
*
(
const
short
*
)
ptr
;
ptr
+=
2
*
sizeof
(
short
);
lt_ptr
=
(
const
unsigned
int
*
)
ptr
;
start
=
(
const
struct
startend
*
)(
lt_ptr
+
nseg
);
/*
* Now snarf the filename for all of the segments for this file.
*/
if
(
pascal_str
)
{
char
filename
[
MAX_PATH
];
const
struct
p_string
*
p_fn
;
p_fn
=
(
const
struct
p_string
*
)(
start
+
nseg
);
memset
(
filename
,
0
,
sizeof
(
filename
));
memcpy
(
filename
,
p_fn
->
name
,
p_fn
->
namelen
);
printf
(
"%slines for file #%d/%d %s %d
\n
"
,
pfx
,
i
,
nfile
,
filename
,
nseg
);
}
else
printf
(
"%slines for file #%d/%d %s %d
\n
"
,
pfx
,
i
,
nfile
,
(
const
char
*
)(
start
+
nseg
),
nseg
);
for
(
j
=
0
;
j
<
nseg
;
j
++
)
{
ptr
=
linetab
+
*
lt_ptr
++
;
nline
=
*
(
const
short
*
)(
ptr
+
2
);
printf
(
"%s %04x:%08x-%08x #%d
\n
"
,
pfx
,
*
(
const
short
*
)(
ptr
+
0
),
start
[
j
].
start
,
start
[
j
].
end
,
nline
);
ptr
+=
4
;
for
(
k
=
0
;
k
<
nline
;
k
++
)
{
printf
(
"%s %x %d
\n
"
,
pfx
,
((
const
unsigned
int
*
)
ptr
)[
k
],
((
const
unsigned
short
*
)((
const
unsigned
int
*
)
ptr
+
nline
))[
k
]);
}
}
}
}
tools/winedump/pdb.c
View file @
f8380ba3
...
...
@@ -405,6 +405,10 @@ static void pdb_dump_symbols(struct pdb_reader* reader)
if
(
symbol_size
)
codeview_dump_symbols
((
const
char
*
)
modimage
+
sizeof
(
DWORD
),
symbol_size
);
/* line number info */
if
(
lineno_size
)
codeview_dump_linetab
((
const
char
*
)
modimage
+
symbol_size
,
lineno_size
,
TRUE
,
" "
);
/* what's that part ??? */
if
(
0
)
dump_data
(
modimage
+
symbol_size
+
lineno_size
,
total_size
-
(
symbol_size
+
lineno_size
),
" "
);
...
...
tools/winedump/winedump.h
View file @
f8380ba3
...
...
@@ -255,6 +255,7 @@ void pdb_dump(void);
int
codeview_dump_symbols
(
const
void
*
root
,
unsigned
long
size
);
int
codeview_dump_types_from_offsets
(
const
void
*
table
,
const
DWORD
*
offsets
,
unsigned
num_types
);
int
codeview_dump_types_from_block
(
const
void
*
table
,
unsigned
long
len
);
void
codeview_dump_linetab
(
const
char
*
linetab
,
DWORD
size
,
BOOL
pascal_str
,
const
char
*
pfx
);
void
dump_stabs
(
const
void
*
pv_stabs
,
unsigned
szstabs
,
const
char
*
stabstr
,
unsigned
szstr
);
void
dump_codeview
(
unsigned
long
ptr
,
unsigned
long
len
);
...
...
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