[DynInst_API:] [dyninst/dyninst] f75ea2: Initial coding for integrating Capstone for instru...


Date: Thu, 10 Feb 2022 08:04:24 -0800
From: noreply@xxxxxxxxxx
Subject: [DynInst_API:] [dyninst/dyninst] f75ea2: Initial coding for integrating Capstone for instru...
  Branch: refs/heads/capstone_integration
  Home:   https://github.com/dyninst/dyninst
  Commit: f75ea258207e43d8b74175f28ab60f201c5b637a
      https://github.com/dyninst/dyninst/commit/f75ea258207e43d8b74175f28ab60f201c5b637a
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M CMakeLists.txt
    M common/h/entryIDs.h
    M instructionAPI/CMakeLists.txt
    M instructionAPI/h/Instruction.h
    M instructionAPI/h/InstructionDecoder.h
    M instructionAPI/src/Instruction.C
    A instructionAPI/src/InstructionDecoder-Capstone.C
    A instructionAPI/src/InstructionDecoder-Capstone.h
    M instructionAPI/src/InstructionDecoder-aarch64.C
    M instructionAPI/src/InstructionDecoder-power.C
    M instructionAPI/src/InstructionDecoder-x86.C
    M instructionAPI/src/InstructionDecoder.C
    M instructionAPI/src/InstructionDecoderImpl.C
    M instructionAPI/src/InstructionDecoderImpl.h

  Log Message:
  -----------
  Initial coding for integrating Capstone for instruction decoding

1. Most architecture independent code is done
2. Most x86 code is done


  Commit: f59c91d6be27e78cbbd2af2b767cabd78e5c20b8
      https://github.com/dyninst/dyninst/commit/f59c91d6be27e78cbbd2af2b767cabd78e5c20b8
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/h/Instruction.h
    M instructionAPI/src/InstructionDecoder-Capstone.C
    M instructionAPI/src/InstructionDecoder-Capstone.h

  Log Message:
  -----------
  Fill Instruction::m_successor, which is needed by ParseAPI


  Commit: fb4a3f4096883bf8e7d2cb0a00d495d787b1652e
      https://github.com/dyninst/dyninst/commit/fb4a3f4096883bf8e7d2cb0a00d495d787b1652e
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M dataflowAPI/src/AbslocInterface.C
    M instructionAPI/src/InstructionCategories.C
    M instructionAPI/src/InstructionDecoder-Capstone.C
    M instructionAPI/src/InstructionDecoder-Capstone.h
    M parseAPI/src/BoundFactCalculator.C

  Log Message:
  -----------
  1. Handle opcode alias such as je/jz
2. Should always construct multiply node even if the scale is 1 and add node even if the displacment is 0
3. Remove some asserts


  Commit: 013cb09dc94367096845848131b0c0980afb3faa
      https://github.com/dyninst/dyninst/commit/013cb09dc94367096845848131b0c0980afb3faa
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/InstructionDecoder-Capstone.C
    M instructionAPI/src/InstructionDecoder-Capstone.h

  Log Message:
  -----------
  Add opcode normalization


  Commit: 81d052e233a5be1a3a38e5ccb18587822df8e83b
      https://github.com/dyninst/dyninst/commit/81d052e233a5be1a3a38e5ccb18587822df8e83b
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/h/Result.h
    M instructionAPI/src/InstructionDecoder-Capstone.C
    M parseAPI/src/BoundFactData.C

  Log Message:
  -----------
  Add in missed memory operand sizes and remove unncessary asserts


  Commit: d09b1cf2767b77e7590154380038be0dd7bcf115
      https://github.com/dyninst/dyninst/commit/d09b1cf2767b77e7590154380038be0dd7bcf115
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/InstructionDecoder-Capstone.C
    M instructionAPI/src/InstructionDecoder-Capstone.h

  Log Message:
  -----------
  Switch to use cs_disasm_iter, which allows us providing a cs_insn object as input.

This can daramtically reduce malloc/free related to cs_insn objects


  Commit: 5d4426ae433c8333212c68b71a76674c77f5a78c
      https://github.com/dyninst/dyninst/commit/5d4426ae433c8333212c68b71a76674c77f5a78c
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/InstructionDecoder-Capstone.C
    M instructionAPI/src/InstructionDecoder-Capstone.h

  Log Message:
  -----------
  Add mnemonic mapping inside InstructionAPI, so that we can get rid
of the overhead of Capstone for always constructing string representations


  Commit: 2b1df39cd9996e668ac060daccdd23d2a9225130
      https://github.com/dyninst/dyninst/commit/2b1df39cd9996e668ac060daccdd23d2a9225130
  Author: Tim <thaines.astro@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M CMakeLists.txt
    A cmake/Capstone.cmake
    A cmake/Modules/FindCapstone.cmake

  Log Message:
  -----------
  Add Capstone to the build system


  Commit: 3aea8ad7e0a28b3690138abbafd0c9fff9fdab48
      https://github.com/dyninst/dyninst/commit/3aea8ad7e0a28b3690138abbafd0c9fff9fdab48
  Author: Tim <thaines.astro@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M cmake/Capstone.cmake

  Log Message:
  -----------
  Allow multiple inclusions of Capstone.cmake

This prevents doing all of the work multiple times if the file is
included more than once.


  Commit: 332754a1339b82b0495c20fa5091ea48fa80a4c3
      https://github.com/dyninst/dyninst/commit/332754a1339b82b0495c20fa5091ea48fa80a4c3
  Author: Tim <thaines.astro@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/CMakeLists.txt

  Log Message:
  -----------
  Use Capstone_LIBRARIES for InstructionAPI


  Commit: ab35ec8795b5f0a1895f70284e7676caa116e338
      https://github.com/dyninst/dyninst/commit/ab35ec8795b5f0a1895f70284e7676caa116e338
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/InstructionDecoderImpl.C

  Log Message:
  -----------
  Only use Capstone on x86/x86-64 at this point


  Commit: 738c0f59c8b79f913149ed0429760425402c7cf5
      https://github.com/dyninst/dyninst/commit/738c0f59c8b79f913149ed0429760425402c7cf5
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/h/Instruction.h
    M instructionAPI/h/InstructionDecoder.h
    M instructionAPI/src/Instruction.C
    M instructionAPI/src/InstructionDecoder-Capstone.C
    M instructionAPI/src/InstructionDecoder-aarch64.C
    M instructionAPI/src/InstructionDecoder-power.C
    M instructionAPI/src/InstructionDecoder.C
    M instructionAPI/src/InstructionDecoderImpl.C
    M instructionAPI/src/InstructionDecoderImpl.h

  Log Message:
  -----------
  Get rid of the concept of decoding back end


  Commit: 1f7cedeac7601cc7e45ec9b295d89f783549a0c6
      https://github.com/dyninst/dyninst/commit/1f7cedeac7601cc7e45ec9b295d89f783549a0c6
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/CMakeLists.txt
    R instructionAPI/src/InstructionDecoder-x86.C
    R instructionAPI/src/InstructionDecoder-x86.h
    M instructionAPI/src/InstructionDecoderImpl.C

  Log Message:
  -----------
  Get rid of old x86/x86-64 decoder in InstructionAPI.

There are still remaining x86/x86-64 decoding code in common, which is used by BPatch.


  Commit: 8786865d91d4b1c583eba646f4ea7822e63b79d2
      https://github.com/dyninst/dyninst/commit/8786865d91d4b1c583eba646f4ea7822e63b79d2
  Author: Tim Haines <thaines.astro@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M cmake/Capstone.cmake

  Log Message:
  -----------
  Change default library directory for Capstone to lib64

By default, Capstone installs its library files in <prefix>/lib64,
rather than <prefix>/lib.


  Commit: eff0af89a2c038d5635fcc1324da46bf47fde02c
      https://github.com/dyninst/dyninst/commit/eff0af89a2c038d5635fcc1324da46bf47fde02c
  Author: Tim <thaines.astro@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M cmake/Modules/FindCapstone.cmake

  Log Message:
  -----------
  Search <prefix>/lib and <prefix>/lib64 for Capstone library files


  Commit: 0e21e0ecb09af6adb46401b3eb6469fc544f5a10
      https://github.com/dyninst/dyninst/commit/0e21e0ecb09af6adb46401b3eb6469fc544f5a10
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/Instruction.C

  Log Message:
  -----------
  e_No_Entry should be invalid instruction


  Commit: 92e49dba528f60b139380697a113468c85719896
      https://github.com/dyninst/dyninst/commit/92e49dba528f60b139380697a113468c85719896
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/InstructionDecoder-Capstone.C

  Log Message:
  -----------
  Fix Result_Type for immediate operands


  Commit: 809eba6797f41cb4860d55c8e32892a8e6281cc8
      https://github.com/dyninst/dyninst/commit/809eba6797f41cb4860d55c8e32892a8e6281cc8
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/Instruction.C

  Log Message:
  -----------
  Do not decode operands for INVALID opcode


  Commit: 20a4080c862ad2ee51f93dfdd40fcd1db4079518
      https://github.com/dyninst/dyninst/commit/20a4080c862ad2ee51f93dfdd40fcd1db4079518
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/CMakeLists.txt
    A instructionAPI/src/InstructionDecoder-Capstone-x86.C
    M instructionAPI/src/InstructionDecoder-Capstone.C
    M instructionAPI/src/InstructionDecoder-Capstone.h

  Log Message:
  -----------
  The implicity register conversion between 32-bit and 64-bit does not work.

Add explicit x86 32-bit register conversion from Capstone to Dyninst.

Split Capstone x86 code into a separate file to reduce compilation time


  Commit: 74fe640a548c9ed86d25448ac5a962fa09b57468
      https://github.com/dyninst/dyninst/commit/74fe640a548c9ed86d25448ac5a962fa09b57468
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/InstructionDecoder-Capstone-x86.C

  Log Message:
  -----------
  Handle implict read & written registers


  Commit: 3ea7bef18377e7a7445dcfcaa5cc54639d478751
      https://github.com/dyninst/dyninst/commit/3ea7bef18377e7a7445dcfcaa5cc54639d478751
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/InstructionDecoder-Capstone.C
    M instructionAPI/src/InstructionDecoder-Capstone.h

  Log Message:
  -----------
  Allow changing decoding architecture at run time


  Commit: 779dc593dabf9e5438ece3db6f2c3d6a22909059
      https://github.com/dyninst/dyninst/commit/779dc593dabf9e5438ece3db6f2c3d6a22909059
  Author: Xiaozhu Meng <xmeng@xxxxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M dataflowAPI/src/RoseInsnFactory.C
    M parseAPI/src/IA_IAPI.C

  Log Message:
  -----------
  Delete unnecessary assert and handle implicit operand for call instruction to ROSE


  Commit: f26391851fc7f6914cb7fc2f57a2cc08d46e5e34
      https://github.com/dyninst/dyninst/commit/f26391851fc7f6914cb7fc2f57a2cc08d46e5e34
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    A instructionAPI/capstone-interation.py

  Log Message:
  -----------
  Add the script for converting capstone instruction to dyninst instruction


  Commit: c11e026e8071aa0d1d0e9ee2eab8909d57b7a2ff
      https://github.com/dyninst/dyninst/commit/c11e026e8071aa0d1d0e9ee2eab8909d57b7a2ff
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M dataflowAPI/src/stackanalysis.C

  Log Message:
  -----------
  Update stack analysis with capstone intregration


  Commit: e16d356c899a475a82d8a2cd0be9cb03ee983ddb
      https://github.com/dyninst/dyninst/commit/e16d356c899a475a82d8a2cd0be9cb03ee983ddb
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M dataflowAPI/src/stackanalysis.C

  Log Message:
  -----------
  More updates to stack analysis


  Commit: b097362b07116d82f83718e571dc9490e49c3e46
      https://github.com/dyninst/dyninst/commit/b097362b07116d82f83718e571dc9490e49c3e46
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/InstructionDecoder-Capstone-x86.C

  Log Message:
  -----------
  When Capstone fails to report read/written properties of an operand,
mark the operand as both read and written. So that the user of instructionAPI
can perform correct, consertative (while less precise)  analysis.


  Commit: 96d2f9e9c57978cc0437dfa997f0f97777b6131c
      https://github.com/dyninst/dyninst/commit/96d2f9e9c57978cc0437dfa997f0f97777b6131c
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M instructionAPI/src/Operation.C

  Log Message:
  -----------
  movsd seems to represent both "move string to string" and "move from scalar to floating point".

"move string to string" is old instructions that uses and writes esi and edi, while "move from scalar" is AVX series,
which does not implicitly write to rsi or rdi.


  Commit: a6d885b7033d64e2da05e15eae14f45cef12e9d2
      https://github.com/dyninst/dyninst/commit/a6d885b7033d64e2da05e15eae14f45cef12e9d2
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M dataflowAPI/src/convertOpcodes.C

  Log Message:
  -----------
  Add missing instruction semantics for e_shl


  Commit: b87a466570b81eb4d5ede222c16cef67371877f7
      https://github.com/dyninst/dyninst/commit/b87a466570b81eb4d5ede222c16cef67371877f7
  Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
  Date:   2022-02-09 (Wed, 09 Feb 2022)

  Changed paths:
    M common/h/entryIDs.h
    M instructionAPI/src/Instruction.C
    M instructionAPI/src/InstructionDecoder-Capstone.C
    M instructionAPI/src/InstructionDecoder-Capstone.h
    M instructionAPI/src/InstructionDecoder.C

  Log Message:
  -----------
  Make it compile and remove warnings


Compare: https://github.com/dyninst/dyninst/compare/65ce98e6f229...b87a466570b8
[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] f75ea2: Initial coding for integrating Capstone for instru..., noreply <=