JonathanSalwan / Triton

Triton is a dynamic binary analysis library. Build your own program analysis tools, automate your reverse engineering, perform software verification or just emulate code.
https://triton-library.github.io
Apache License 2.0
3.4k stars 524 forks source link

Expose CPU memory from cpuInterface. #1236

Closed archercreat closed 1 year ago

archercreat commented 1 year ago

Currently there's no way to const copy cpu memory without invoking copy constructor. This pull request adds getAllMemory api which returns const reference to an existing std::unordered_map.

archercreat commented 1 year ago

Maybe, we can use better naming like getConcreteMemory?

I called it because there is already getAllRegisters function which does the same but i'm ok to change.

JonathanSalwan commented 1 year ago

Hi @archercreat, thanks for this feature! getAllRegisters is used to returns registers of the CPU. As your feature returns the memory concrete state, I think that getConcreteMemory would be appropriate as @SweetVishnya said :)