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
07d681b0
Commit
07d681b0
authored
Jan 05, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Added helper to convert a guid to a string.
parent
1fcb0c11
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
+17
-17
dump.c
tools/winedump/dump.c
+9
-0
lnk.c
tools/winedump/lnk.c
+3
-13
pdb.c
tools/winedump/pdb.c
+4
-4
winedump.h
tools/winedump/winedump.h
+1
-0
No files found.
tools/winedump/dump.c
View file @
07d681b0
...
...
@@ -131,6 +131,15 @@ void dump_unicode_str( const WCHAR *str, int len )
printf
(
"
\"
"
);
}
char
*
guid_to_string
(
const
GUID
*
guid
,
char
*
str
,
size_t
sz
)
{
snprintf
(
str
,
sz
,
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
return
str
;
}
const
void
*
PRD
(
unsigned
long
prd
,
unsigned
long
len
)
{
return
(
prd
+
len
>
dump_total_len
)
?
NULL
:
(
const
char
*
)
dump_base
+
prd
;
...
...
tools/winedump/lnk.c
View file @
07d681b0
...
...
@@ -106,14 +106,6 @@ typedef struct lnk_string_tag
static
unsigned
offset
;
static
void
guid_to_string
(
const
GUID
*
guid
,
char
*
str
)
{
sprintf
(
str
,
"{%08x-%04x-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
}
static
const
void
*
fetch_block
(
void
)
{
const
unsigned
*
u
;
...
...
@@ -292,7 +284,7 @@ static int dump_advertise_info(const char *type)
GUID
guid
;
if
(
base85_to_guid
(
avt
->
bufA
,
&
guid
))
guid_to_string
(
&
guid
,
prod_str
);
guid_to_string
(
&
guid
,
prod_str
,
sizeof
(
prod_str
)
);
else
strcpy
(
prod_str
,
"?"
);
...
...
@@ -311,7 +303,7 @@ static int dump_advertise_info(const char *type)
}
if
(
feat
&&
feat
[
0
]
==
'>'
&&
base85_to_guid
(
&
feat
[
1
],
&
guid
))
guid_to_string
(
&
guid
,
feat_str
);
guid_to_string
(
&
guid
,
feat_str
,
sizeof
(
feat_str
)
);
else
feat_str
[
0
]
=
0
;
...
...
@@ -345,12 +337,10 @@ void lnk_dump(void)
offset
=
0
;
hdr
=
fetch_block
();
guid_to_string
(
&
hdr
->
MagicGuid
,
guid
);
printf
(
"Header
\n
"
);
printf
(
"------
\n\n
"
);
printf
(
"Size: %04x
\n
"
,
hdr
->
dwSize
);
printf
(
"GUID: %s
\n
"
,
guid
);
printf
(
"GUID: %s
\n
"
,
guid
_to_string
(
&
hdr
->
MagicGuid
,
guid
,
sizeof
(
guid
))
);
printf
(
"FileAttr: %08x
\n
"
,
hdr
->
dwFileAttr
);
printf
(
"FileLength: %08x
\n
"
,
hdr
->
dwFileLength
);
...
...
tools/winedump/pdb.c
View file @
07d681b0
...
...
@@ -625,18 +625,18 @@ static void pdb_ds_dump(void)
if
(
root
)
{
const
char
*
ptr
;
char
guid_str
[
40
];
printf
(
"Root:
\n
"
"
\t
Version: %u
\n
"
"
\t
TimeDateStamp: %08x
\n
"
"
\t
Age: %08x
\n
"
"
\t
guid
{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}
\n
"
"
\t
guid
%s
\n
"
"
\t
cbNames: %08x
\n
"
,
root
->
Version
,
root
->
TimeDateStamp
,
root
->
Age
,
root
->
guid
.
Data1
,
root
->
guid
.
Data2
,
root
->
guid
.
Data3
,
root
->
guid
.
Data4
[
0
],
root
->
guid
.
Data4
[
1
],
root
->
guid
.
Data4
[
2
],
root
->
guid
.
Data4
[
3
],
root
->
guid
.
Data4
[
4
],
root
->
guid
.
Data4
[
5
],
root
->
guid
.
Data4
[
6
],
root
->
guid
.
Data4
[
7
],
guid_to_string
(
&
root
->
guid
,
guid_str
,
sizeof
(
guid_str
)),
root
->
cbNames
);
for
(
ptr
=
&
root
->
names
[
0
];
ptr
<
&
root
->
names
[
0
]
+
root
->
cbNames
;
ptr
+=
strlen
(
ptr
)
+
1
)
printf
(
"
\t
String: %s
\n
"
,
ptr
);
...
...
tools/winedump/winedump.h
View file @
07d681b0
...
...
@@ -239,6 +239,7 @@ void dump_unicode_str( const unsigned short *str, int len );
void
dump_file_header
(
const
IMAGE_FILE_HEADER
*
);
void
dump_optional_header
(
const
IMAGE_OPTIONAL_HEADER32
*
,
UINT
);
void
dump_section
(
const
IMAGE_SECTION_HEADER
*
);
char
*
guid_to_string
(
const
GUID
*
guid
,
char
*
str
,
size_t
sz
);
enum
FileSig
get_kind_exec
(
void
);
void
dos_dump
(
void
);
...
...
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