Comments (4)
For reference, this is capstone's cs_detail
:
typedef struct cs_detail {
uint16_t regs_read[12]; ///< list of implicit registers read by this insn
uint8_t regs_read_count; ///< number of implicit registers read by this insn
uint16_t regs_write[20]; ///< list of implicit registers modified by this insn
uint8_t regs_write_count; ///< number of implicit registers modified by this insn
uint8_t groups[8]; ///< list of group this instruction belong to
uint8_t groups_count; ///< number of groups this insn belongs to
/// Architecture-specific instruction info
union {
cs_x86 x86; ///< X86 architecture, including 16-bit, 32-bit & 64-bit mode
cs_arm64 arm64; ///< ARM64 architecture (aka AArch64)
cs_arm arm; ///< ARM architecture (including Thumb/Thumb2)
cs_m68k m68k; ///< M68K architecture
cs_mips mips; ///< MIPS architecture
cs_ppc ppc; ///< PowerPC architecture
cs_sparc sparc; ///< Sparc architecture
cs_sysz sysz; ///< SystemZ architecture
cs_xcore xcore; ///< XCore architecture
cs_tms320c64x tms320c64x; ///< TMS320C64x architecture
cs_m680x m680x; ///< M680X architecture
cs_evm evm; ///< Ethereum architecture
};
} cs_detail;
from libmem.
It might be worth it shipping some of capstone's header in libmem
to avoid re-exporting all this stuff.
from libmem.
This will be added post 5.0
from libmem.
If this will be added, perhaps it should be opt-in
From https://www.capstone-engine.org/lang_c.html:
3. More architecture-independent internal data of the disassembled instruction
By default, Capstone do not generate details for disassembled instruction. If we want information such as implicit registers read/written or semantic groups that this instruction belongs to, we need to explicitly turn this option on, like in the sample code below.
csh handle;
cs_open(CS_ARCH_X86, CS_MODE_64, &handle);
cs_option(handle, CS_OPT_DETAIL, CS_OPT_ON); // turn ON detail feature with CS_OPT_ON
However, keep in mind that producing details costs more memory, complicates the internal operations and slows down the engine a bit, so only do that if needed. If this is no longer desired, we can always reset the engine back to default state at run-time with similar method.
from libmem.
Related Issues (20)
- Add helper functions for Python to avoid manual unpacking all the time
- Deprecate `LM_` suffix in Python bindings HOT 2
- Figure out a way to allow more assembler/disassembler modes HOT 3
- Reconsider uses of `process->bits` HOT 1
- Place 32 bit jump in x64 if possible HOT 1
- Avoid unnecessary use of assembler/disassembler HOT 1
- Regex process/module/etc search
- Protect VMT memory on assignment as RWX HOT 1
- Rust fails to build on Windows. HOT 1
- Bug: `write_memory_ex` was not work as expected in Rust. HOT 1
- UNIX: Suggestions to improve the `ptrace` component (race conditions, unexpected signals, call injection)
- Consider allow specifying memory location for allocation (like mmap)
- Consider allowing to assemble in-place
- rust fails to compile on linux HOT 6
- Ptrace issues
- Consider reintroducing remote call API
- Windows LM_LoadModuleEx doesn't return module HOT 2
- API for geting PageSize
- x86_64-pc-linux-musl-ld.lld: error: unable to find library -lstdc++ HOT 1
- LM_FindModule BUG? HOT 1
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 libmem.