Comments (2)
A possible patch like this untested one below should work:
diff --git a/libudis86/decode.c b/libudis86/decode.c
index a7a4896..b625c47 100644
--- a/libudis86/decode.c
+++ b/libudis86/decode.c
@@ -622,6 +622,7 @@ decode_operand(struct ud *u,
unsigned int size)
{
operand->_oprcode = type;
+ operand->opoffset = u->inp_ctr;
switch (type) {
case OP_A :
diff --git a/libudis86/types.h b/libudis86/types.h
index bdfd4d9..7e32b2e 100644
--- a/libudis86/types.h
+++ b/libudis86/types.h
@@ -154,6 +154,7 @@ struct ud_operand {
uint8_t offset;
union ud_lval lval;
uint64_t disp;
+ uint16_t opoffset;
/*
* internal use only
*/
from udis86.
There is another assignment of the current offset required after decoding the possibly optional Mod/RM byte of the instruction, before reading its actual operand value.
Example: 89 57 2a -> should result in OP1 at opoffset 2, not 1 as returned by the initial patch suggestion.
from udis86.
Related Issues (20)
- ATT syntax decode is ambiguous HOT 2
- ATT syntax drops the enter and bound mnemonics HOT 1
- decode_prefixes, variable used but not initialized
- Windows DLLs Export Nothing HOT 1
- How to cross compile i686 on x86_64 HOT 1
- Compatibility with ud_opcode.py and Python 3.5 HOT 2
- REX prefix maybe not quite right?
- TypeError: %x format: an integer is required, not float HOT 1
- Trouble building from source HOT 1
- Truncated jump target address with oso (0x66) HOT 2
- Wrong operand size HOT 1
- Integrating with OSS-Fuzz
- ud_translate_att: AT&T mnemonic size suffix logic seems suspect HOT 1
- Hosting: enable HTTPS on the sourceforge site
- Bug: trailing whitespace in udcli output
- Feature: implement a reverse mode for udcli or provide a wrapper for 'gas'
- autoconf error configure.ac:34: error: possibly undefined macro: AM_INIT_AUTOMAKE HOT 1
- Bug] broken tests
- Ordering of itab.h and itab.c varies between runs and Python versions
- Error building on Arch Linux
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 udis86.