Comments (5)
The problem is that the anal plugin was only for 32 and 64.
We are using udis86 to disassemble and x86im to analyze.
I have pushed a commit that does some more work in anal.plugin=x86.udis86 and also added a hack on top of the default analysis of 32bits to fix that 16bit analysis.
Let me know if you find more oplen issues on 16bits.
The plan is to work on code analysis internals for the next release.
We should use the udis86 info for 16bits. But i dont think we can get a full implementation of the code analysis information.
We need more test cases also.
Thanks!
On Sep 24, 2012, at 20:33, Alexander [email protected] wrote:
[0x00000100]> e asm.bits
16
[0x00000100]> pd 1
0x00000100 e9010f jmp word 0x1004
[0x00000100]> ao 5
addr: 0x00000100
size: 5
type: 1 (jmp)
eob: 1
jump: 0xffffffffc9341006
fail: 0xffffffffffffffff
stack: 0
cond: 0
family: 0
So, "pd 1" reports that the opcode length is 3 (which is correct), but "ao 5" says "size: 5". Maybe it interprets it in 32-bit mode instead of 16-bit.I'm testing on:
./bin/r2 -v
radare2 0.9.1git @ darwin-little-x86-64 build 2012-09-24
commit: 757d692
—
Reply to this email directly or view it on GitHub.
from radare2.
Thanks for the quick update, but seems the patch isn't quite full. Even if the instruction in the 16-bit mode is 3 byte long, only "ao 5" shows it, along with a bit of the following one, for some reason.
[0x00000100]> pd 1
0x00000100 e9010f jmp word 0x1004
[0x00000100]> ao 3
Oops at 0x00000100 (e9 01 0f ...)
[0x00000100]> ao 4
Oops at 0x00000100 (e9 01 0f ...)
[0x00000100]> ao 5
addr: 0x00000100
size: 3
type: 1 (jmp)
eob: 1
jump: 0x00001004
fail: 0xffffffffffffffff
stack: 0
cond: 0
family: 0
addr: 0x00000103
size: 2
type: 67108864 (xor)
eob: 0
jump: 0xffffffffffffffff
fail: 0xffffffffffffffff
stack: 0
cond: 0
family: 0
from radare2.
I have written a test case for this issue, I will look at it tonight or
tomorrow.
see:
https://github.com/vext01/r2-regressions/commit/566b66e5312dc3568a67826e6ad32dd81e220c6a
Thanks
On 09/25/12 14:02, Alexander wrote:
Thanks for the quick update, but seems the patch isn't quite full.
Even if the instruction in the 16-bit mode is 3 byte long, only "ao 5"
shows it, along with a bit of the following one, for some reason.|[0x00000100]> pd 1
0x00000100 e9010f jmp word 0x1004[0x00000100]> ao 3
Oops at 0x00000100 (e9 01 0f ...)
[0x00000100]> ao 4
Oops at 0x00000100 (e9 01 0f ...)
[0x00000100]> ao 5
addr: 0x00000100
size: 3
type: 1 (jmp)
eob: 1
jump: 0x00001004
fail: 0xffffffffffffffff
stack: 0
cond: 0
family: 0addr: 0x00000103
size: 2
type: 67108864 (xor)
eob: 0
jump: 0xffffffffffffffff
fail: 0xffffffffffffffff
stack: 0
cond: 0
family: 0
|—
Reply to this email directly or view it on GitHub
#18 (comment).
from radare2.
It should be fixed now. Can you test again?
from radare2.
Works, thanks.
from radare2.
Related Issues (20)
- Different name for entry point field in rabin2 -H for 32bit and 64bit elfs HOT 3
- meson.build:55:8: ERROR: C++ shared or static library 'r_core' not found
- Header fields are incorrect in `ih` and `ihh` output for big-endian ELF files HOT 4
- implement handling of R_X86_64_TPOFF64 relocation HOT 10
- Crosplatform android build on Ubuntu HOT 5
- /R does not search with search.from and search.to HOT 3
- latest ndk complains about this HOT 1
- ADB shell showing weird chars HOT 5
- malloc bug? HOT 1
- s390x debugging warnings HOT 3
- radare2 fails to build on macOS High Sierra HOT 12
- R2DIR error in configuration on PowerPC Mac HOT 9
- relocs from the units
- crashes on `/ad li a7, 227`
- UB in the default riscv plugin
- Rename expressions functionality HOT 4
- http server: null headers break HTTP RFC HOT 2
- Instructions with relocated addresses are replaced with stmdaeq HOT 1
- breakpoints doesn't work on FreeBSD HOT 11
- Implement CDPATH env var the same way we handle PATH for executables
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from radare2.