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
ae48ede9
Commit
ae48ede9
authored
Feb 10, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Simplify guid dumping.
parent
72c52d6d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
28 deletions
+28
-28
debug.c
tools/winedump/debug.c
+1
-3
dump.c
tools/winedump/dump.c
+18
-14
lnk.c
tools/winedump/lnk.c
+7
-8
pdb.c
tools/winedump/pdb.c
+1
-2
winedump.h
tools/winedump/winedump.h
+1
-1
No files found.
tools/winedump/debug.c
View file @
ae48ede9
...
...
@@ -425,11 +425,9 @@ static void dump_codeview_headers(unsigned long base, unsigned long len)
if
(
memcmp
(
signature
,
"RSDS"
,
4
)
==
0
)
{
const
OMFSignatureRSDS
*
rsds_data
;
char
guid_str
[
40
];
rsds_data
=
(
const
void
*
)
cv_base
;
printf
(
" Guid: %s
\n
"
,
guid_to_string
(
&
rsds_data
->
guid
,
guid_str
,
sizeof
(
guid_str
)));
printf
(
" Guid: %s
\n
"
,
get_guid_str
(
&
rsds_data
->
guid
));
printf
(
" Dunno: %08X
\n
"
,
rsds_data
->
unknown
);
printf
(
" Filename: %s
\n
"
,
rsds_data
->
name
);
return
;
...
...
tools/winedump/dump.c
View file @
ae48ede9
/*
* File dumping utility
*
* Copyright 2001,200
5
Eric Pouech
* Copyright 2001,200
7
Eric Pouech
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -96,13 +96,9 @@ const char *get_time_str(unsigned long _t)
const
time_t
t
=
(
const
time_t
)
_t
;
const
char
*
str
=
ctime
(
&
t
);
size_t
len
;
static
char
buf
[
128
]
;
char
*
buf
;
if
(
!
str
)
/* not valid time */
{
strcpy
(
buf
,
"not valid time"
);
return
buf
;
}
if
(
!
str
)
return
"not valid time"
;
len
=
strlen
(
str
);
/* FIXME: I don't get the same values from MS' pedump running under Wine...
...
...
@@ -110,8 +106,12 @@ const char *get_time_str(unsigned long _t)
*/
if
(
len
&&
str
[
len
-
1
]
==
'\n'
)
len
--
;
if
(
len
>=
sizeof
(
buf
))
len
=
sizeof
(
buf
)
-
1
;
memcpy
(
buf
,
str
,
len
);
buf
[
len
]
=
0
;
buf
=
dump_want_n
(
len
+
1
);
if
(
buf
)
{
memcpy
(
buf
,
str
,
len
);
buf
[
len
]
=
0
;
}
return
buf
;
}
...
...
@@ -200,12 +200,16 @@ const char* get_symbol_str(const char* symname)
return
ret
;
}
c
har
*
guid_to_string
(
const
GUID
*
guid
,
char
*
str
,
size_t
sz
)
c
onst
char
*
get_guid_str
(
const
GUID
*
guid
)
{
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
]);
char
*
str
;
str
=
dump_want_n
(
39
);
if
(
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
]);
return
str
;
}
...
...
tools/winedump/lnk.c
View file @
ae48ede9
...
...
@@ -279,14 +279,14 @@ static int dump_advertise_info(const char *type)
printf
(
"%s = %s
\n
"
,
type
,
avt
->
bufA
);
if
(
avt
->
magic
==
0xa0000006
)
{
char
prod_str
[
40
],
comp_str
[
40
],
feat
_str
[
40
];
const
char
*
feat
,
*
comp
;
char
comp
_str
[
40
];
const
char
*
feat
,
*
comp
,
*
prod_str
,
*
feat_str
;
GUID
guid
;
if
(
base85_to_guid
(
avt
->
bufA
,
&
guid
))
guid_to_string
(
&
guid
,
prod_str
,
sizeof
(
prod_str
)
);
prod_str
=
get_guid_str
(
&
guid
);
else
strcpy
(
prod_str
,
"?"
)
;
prod_str
=
"?"
;
comp
=
&
avt
->
bufA
[
20
];
feat
=
strchr
(
comp
,
'>'
);
...
...
@@ -303,9 +303,9 @@ static int dump_advertise_info(const char *type)
}
if
(
feat
&&
feat
[
0
]
==
'>'
&&
base85_to_guid
(
&
feat
[
1
],
&
guid
))
guid_to_string
(
&
guid
,
feat_str
,
sizeof
(
feat_str
)
);
feat_str
=
get_guid_str
(
&
guid
);
else
feat_str
[
0
]
=
0
;
feat_str
=
""
;
printf
(
" product: %s
\n
"
,
prod_str
);
printf
(
" component: %s
\n
"
,
comp_str
);
...
...
@@ -332,7 +332,6 @@ enum FileSig get_kind_lnk(void)
void
lnk_dump
(
void
)
{
const
LINK_HEADER
*
hdr
;
char
guid
[
40
];
offset
=
0
;
hdr
=
fetch_block
();
...
...
@@ -340,7 +339,7 @@ void lnk_dump(void)
printf
(
"Header
\n
"
);
printf
(
"------
\n\n
"
);
printf
(
"Size: %04x
\n
"
,
hdr
->
dwSize
);
printf
(
"GUID: %s
\n
"
,
g
uid_to_string
(
&
hdr
->
MagicGuid
,
guid
,
sizeof
(
guid
)
));
printf
(
"GUID: %s
\n
"
,
g
et_guid_str
(
&
hdr
->
MagicGuid
));
printf
(
"FileAttr: %08x
\n
"
,
hdr
->
dwFileAttr
);
printf
(
"FileLength: %08x
\n
"
,
hdr
->
dwFileLength
);
...
...
tools/winedump/pdb.c
View file @
ae48ede9
...
...
@@ -625,7 +625,6 @@ static void pdb_ds_dump(void)
if
(
root
)
{
const
char
*
ptr
;
char
guid_str
[
40
];
printf
(
"Root:
\n
"
"
\t
Version: %u
\n
"
...
...
@@ -636,7 +635,7 @@ static void pdb_ds_dump(void)
root
->
Version
,
root
->
TimeDateStamp
,
root
->
Age
,
g
uid_to_string
(
&
root
->
guid
,
guid_str
,
sizeof
(
guid_str
)
),
g
et_guid_str
(
&
root
->
guid
),
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 @
ae48ede9
...
...
@@ -236,11 +236,11 @@ void dump_data( const unsigned char *ptr, unsigned int size, const ch
const
char
*
get_time_str
(
unsigned
long
);
unsigned
int
strlenW
(
const
unsigned
short
*
str
);
void
dump_unicode_str
(
const
unsigned
short
*
str
,
int
len
);
const
char
*
get_guid_str
(
const
GUID
*
guid
);
const
char
*
get_symbol_str
(
const
char
*
symname
);
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