Comments (3)
Hi! Thanks for a quick fix :) Now everything seems to work correctly!
from triton.
Hi @m4drat !
It seems the issue comes from the fact that the instruction is decoded differently by Capstone depending on the mode. In ARM mode, it includes the pc
among its operands (this is where the comment you pointed out comes from) while in Thumb mode it doesn't, as shown below:
$ cstool -d thumb "08 A0" # ADR R0, 0x20
0 08 a0 adr r0, #0x20
ID: 4 (adr)
op_count: 2
operands[0].type: REG = r0
operands[0].access: WRITE
operands[1].type: IMM = 0x20
Registers modified: r0
Groups: thumb thumb1only
$ cstool -d arm "20 00 8F E2" # ADR R0, 0x20
0 20 00 8f e2 add r0, pc, #0x20
ID: 2 (add)
op_count: 3
operands[0].type: REG = r0
operands[0].access: WRITE
operands[1].type: REG = pc
operands[1].access: READ
operands[2].type: IMM = 0x20
Registers read: pc
Registers modified: r0
Groups: arm
I will update the semantics (function adr_s
) to fix the behavior when in Thumb mode.
This issue does not seem to affect the instruction for the ARM64
arch.
from triton.
Hi @m4drat ! I fixed this issue in the following PR: #1300.
Could you confirm it fixes the issue?
from triton.
Related Issues (20)
- Support for ARM32 ldm<amode> HOT 5
- No "rflags" register in x86_64 architecture HOT 2
- bitwuzla error: no matching function HOT 11
- python setup.py install bug HOT 9
- Old cmake in dockerfile (release build 0.9) HOT 2
- alternative pintools HOT 10
- Missing header files in releases? HOT 1
- Call to getStackPointer in release build of triton.dll fails when main program is in debug mode HOT 1
- Taint resulting from a dereference HOT 2
- Taint propagation on conditional jumps HOT 1
- Once contain “inc edi” or “dec edi”,TritonContext.disassembly(block, start) generate TypeError: x8664Cpu::disassembly(): Failed to disassemble the given code. HOT 3
- Will a new official version be released soon? HOT 3
- Problem with getWrittenRegisters() in aarch64
- Why is this POC yielding these results? HOT 2
- Failed to build with the library HOT 5
- Clarification regarding MEMORY_ARRAY mode HOT 7
- symbolizeRegister result is different with setConcreteRegisterValue result ?
- How to determine if a concrete register value is known? HOT 2
- fails to build against LLVM-18
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 triton.