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
bde14eac
Commit
bde14eac
authored
Aug 21, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Aug 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Move string conversion of machine and language into dedicated helpers.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b6a20450
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
43 deletions
+53
-43
msc.c
tools/winedump/msc.c
+53
-43
No files found.
tools/winedump/msc.c
View file @
bde14eac
...
...
@@ -264,6 +264,54 @@ static const char* get_property(unsigned prop)
return
tmp
;
}
static
const
char
*
get_machine
(
unsigned
m
)
{
const
char
*
machine
;
switch
(
m
)
{
case
0x00
:
machine
=
"Intel 8080"
;
break
;
case
0x01
:
machine
=
"Intel 8086"
;
break
;
case
0x02
:
machine
=
"Intel 80286"
;
break
;
case
0x03
:
machine
=
"Intel 80386"
;
break
;
case
0x04
:
machine
=
"Intel 80486"
;
break
;
case
0x05
:
machine
=
"Intel Pentium"
;
break
;
case
0x10
:
machine
=
"MIPS R4000"
;
break
;
default:
{
static
char
tmp
[
16
];
sprintf
(
tmp
,
"machine=%x"
,
m
);
machine
=
tmp
;
}
break
;
}
return
machine
;
}
static
const
char
*
get_language
(
unsigned
l
)
{
const
char
*
lang
;
switch
(
l
)
{
case
0x00
:
lang
=
"C"
;
break
;
case
0x01
:
lang
=
"C++"
;
break
;
case
0x02
:
lang
=
"Fortran"
;
break
;
case
0x03
:
lang
=
"Masm"
;
break
;
case
0x04
:
lang
=
"Pascal"
;
break
;
case
0x05
:
lang
=
"Basic"
;
break
;
case
0x06
:
lang
=
"Cobol"
;
break
;
default:
{
static
char
tmp
[
16
];
sprintf
(
tmp
,
"lang=%x"
,
l
);
lang
=
tmp
;
}
break
;
}
return
lang
;
}
static
void
do_field
(
const
unsigned
char
*
start
,
const
unsigned
char
*
end
)
{
/*
...
...
@@ -1131,49 +1179,11 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
break
;
case
S_COMPILE
:
{
const
char
*
machine
;
const
char
*
lang
;
switch
(
sym
->
compiland_v1
.
unknown
&
0xFF
)
{
case
0x00
:
machine
=
"Intel 8080"
;
break
;
case
0x01
:
machine
=
"Intel 8086"
;
break
;
case
0x02
:
machine
=
"Intel 80286"
;
break
;
case
0x03
:
machine
=
"Intel 80386"
;
break
;
case
0x04
:
machine
=
"Intel 80486"
;
break
;
case
0x05
:
machine
=
"Intel Pentium"
;
break
;
case
0x10
:
machine
=
"MIPS R4000"
;
break
;
default:
{
static
char
tmp
[
16
];
sprintf
(
tmp
,
"machine=%x"
,
sym
->
compiland_v1
.
unknown
&
0xFF
);
machine
=
tmp
;
}
break
;
}
switch
((
sym
->
compiland_v1
.
unknown
>>
8
)
&
0xFF
)
{
case
0x00
:
lang
=
"C"
;
break
;
case
0x01
:
lang
=
"C++"
;
break
;
case
0x02
:
lang
=
"Fortran"
;
break
;
case
0x03
:
lang
=
"Masm"
;
break
;
case
0x04
:
lang
=
"Pascal"
;
break
;
case
0x05
:
lang
=
"Basic"
;
break
;
case
0x06
:
lang
=
"Cobol"
;
break
;
default:
{
static
char
tmp
[
16
];
sprintf
(
tmp
,
"language=%x"
,
(
sym
->
compiland_v1
.
unknown
>>
8
)
&
0xFF
);
lang
=
tmp
;
}
break
;
}
printf
(
"
\t
S-Compiland V1 '%s' %s %s unk:%x
\n
"
,
p_string
(
&
sym
->
compiland_v1
.
p_name
),
machine
,
lang
,
sym
->
compiland_v1
.
unknown
>>
16
);
}
printf
(
"
\t
S-Compiland V1 '%s' %s %s unk:%x
\n
"
,
p_string
(
&
sym
->
compiland_v1
.
p_name
),
get_machine
(
sym
->
compiland_v1
.
unknown
&
0xFF
),
get_language
((
sym
->
compiland_v1
.
unknown
>>
8
)
&
0xFF
),
sym
->
compiland_v1
.
unknown
>>
16
);
break
;
case
S_COMPILE2_ST
:
...
...
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