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
474791fd
Commit
474791fd
authored
Apr 19, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Apr 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Add "load address" and new nops to the Thumb disassembler.
parent
e744bf78
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
be_arm.c
programs/winedbg/be_arm.c
+20
-10
No files found.
programs/winedbg/be_arm.c
View file @
474791fd
...
...
@@ -332,6 +332,12 @@ static WORD thumb_disasm_hireg(WORD inst, ADDRESS64 *addr)
if
(
h1
)
dst
+=
8
;
if
(
h2
)
src
+=
8
;
if
(
op
==
2
&&
dst
==
src
)
/* mov rx, rx */
{
dbg_printf
(
"
\n\t
nop"
);
return
0
;
}
if
(
op
==
3
)
dbg_printf
(
"
\n\t
b%sx
\t
%s"
,
h1
?
"l"
:
""
,
tbl_regs
[
src
]);
else
...
...
@@ -398,6 +404,15 @@ static WORD thumb_disasm_condbranch(WORD inst, ADDRESS64 *addr)
return
0
;
}
static
WORD
thumb_disasm_loadadr
(
WORD
inst
,
ADDRESS64
*
addr
)
{
WORD
src
=
(
inst
>>
11
)
&
0x01
;
WORD
offset
=
(
inst
&
0xff
)
<<
2
;
dbg_printf
(
"
\n\t
add
\t
%s, %s, #%d"
,
tbl_regs
[(
inst
>>
8
)
&
0x07
],
src
?
"sp"
:
"pc"
,
offset
);
return
0
;
}
static
WORD
thumb_disasm_swi
(
WORD
inst
,
ADDRESS64
*
addr
)
{
WORD
comment
=
inst
&
0x00ff
;
...
...
@@ -506,6 +521,7 @@ static const struct inst_thumb16 tbl_thumb16[] = {
{
0xf600
,
0xb400
,
thumb_disasm_blocktrans
},
{
0xf800
,
0xf000
,
thumb_disasm_longbl
},
{
0xf000
,
0xd000
,
thumb_disasm_condbranch
},
{
0xf000
,
0xa000
,
thumb_disasm_loadadr
},
{
0xf800
,
0x4800
,
thumb_disasm_ldrpcrel
},
{
0xf000
,
0x9000
,
thumb_disasm_ldrsprel
},
{
0xff00
,
0xb000
,
thumb_disasm_addsprel
},
...
...
@@ -514,7 +530,7 @@ static const struct inst_thumb16 tbl_thumb16[] = {
{
0xf000
,
0xd000
,
thumb_disasm_condbranch
},
{
0xff00
,
0xdf00
,
thumb_disasm_swi
},
{
0xff00
,
0xbf00
,
thumb_disasm_nop
},
{
0xf
c00
,
0x1c
00
,
thumb_disasm_addsub
},
{
0xf
800
,
0x18
00
,
thumb_disasm_addsub
},
{
0xe000
,
0x0000
,
thumb_disasm_movshift
},
{
0x0000
,
0x0000
,
NULL
}
};
...
...
@@ -538,7 +554,7 @@ void be_arm_disasm_one_insn(ADDRESS64 *addr, int display)
DWORD_PTR
*
pval
;
if
(
!
memory_get_register
(
CV_ARM_CPSR
,
&
pval
,
tmp
,
sizeof
(
tmp
)))
dbg_printf
(
"
\n\t
memory_get_register failed: %s
\n
"
,
tmp
);
dbg_printf
(
"
\n\t
memory_get_register failed: %s
"
,
tmp
);
else
db_disasm_thumb
=
(
*
pval
&
0x20
)
?
TRUE
:
FALSE
;
...
...
@@ -559,17 +575,14 @@ void be_arm_disasm_one_insn(ADDRESS64 *addr, int display)
}
if
(
!
matched
)
{
dbg_printf
(
"
\n\t
Unknown Instruction: %08x
\n
"
,
inst
);
dbg_printf
(
"
\n\t
Unknown Instruction: %08x"
,
inst
);
addr
->
Offset
+=
size
;
return
;
}
else
{
if
(
!
a_ptr
->
func
(
inst
))
{
dbg_printf
(
"
\n
"
);
addr
->
Offset
+=
size
;
}
return
;
}
}
...
...
@@ -585,18 +598,15 @@ void be_arm_disasm_one_insn(ADDRESS64 *addr, int display)
}
if
(
!
matched
)
{
dbg_printf
(
"
\n\t
Unknown Instruction: %0
8x
\n
"
,
tinst
);
dbg_printf
(
"
\n\t
Unknown Instruction: %0
4x
"
,
tinst
);
addr
->
Offset
+=
size
;
return
;
}
else
{
if
(
!
t_ptr
->
func
(
tinst
,
addr
))
{
dbg_printf
(
"
\n
"
);
addr
->
Offset
+=
size
;
}
}
return
;
}
}
...
...
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