[lldb-dev] Identifying instructions that definitely access memory

Vangelis Tsiatsianas via lldb-dev lldb-dev at lists.llvm.org
Sun Oct 20 22:54:02 PDT 2019


Hello,

I am looking for a way to identify loads, stores and any other kind of instruction that definitely perform memory access and extract the address operand(s), however I was not able to find a cross-architecture API. The closest I stumbled upon are "MCInstrDesc::mayLoad()" and "MCInstrDesc::mayStore()", but I understand that their results are just a hint, so I would then need to examine the instruction name or opcode in order to find out whether it’s actually a load or store and which operand(s) is (are) memory address(es) and also do so for each architecture separately, which I would really like to avoid.

Is there a way to identify such instructions either by examining them through the disassembler (e.g. "DoesLoad()" | "DoesStore()") before they execute or right after they perform any kind of memory access?

Thank you very much, in advance! πŸ™‚


― Vangelis


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20191021/376291dd/attachment.html>


More information about the lldb-dev mailing list