[DynInst_API:] [dyninst/dyninst] 3e9322: Add callback for parsing unknown instructions (#1276)


Date: Fri, 21 Apr 2023 12:58:55 -0700
From: Tim Haines <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] 3e9322: Add callback for parsing unknown instructions (#1276)
  Branch: refs/heads/master
  Home:   https://github.com/dyninst/dyninst
  Commit: 3e93225713b1633a7bf6ff0d9a89c409db802173
      https://github.com/dyninst/dyninst/commit/3e93225713b1633a7bf6ff0d9a89c409db802173
  Author: Tim Haines <thaines.astro@xxxxxxxxx>
  Date:   2023-04-21 (Fri, 21 Apr 2023)

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

  Log Message:
  -----------
  Add callback for parsing unknown instructions (#1276)

* Add callback declarations for unknown instructions in InstructionDecoder

* Update definition of callback interface

This also makes 'unknown_instruction' inconstructible.

* make isValid the same as isLegalInsn

This makes it impossible to make an Instruction object from a failed
decoding process. This only affects x86.

* Detect illegal instructions sooner in doIA32Decode

* Don't advance the buffer when an x86 decode fails

* Use a ternary to avoid linker error on some gcc's

Some versions of gcc don't inline std::min _and_ need to resolve maxInstructionLength.


[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] 3e9322: Add callback for parsing unknown instructions (#1276), Tim Haines <=