Class X86_64DisassembleCommand

  • All Implemented Interfaces:
    Command

    public class X86_64DisassembleCommand
    extends DisassembleCommand
    Command object for performing 64-/32-bit x86 disassembly

    This generally only comes up when debugging, since there can be multiple images loaded by an x86-64 target. For WoW64, the images may be mixed. Thus, this command allows you to disassemble 64-bit or 32-bit instructions whenever the language is set to 64-bit x86.

    WARNING: If used in static programs, i.e., not debug traces, there are some potential remaining issues, particularly dealing with stored context and follow-on disassembly -- typically called for by the analyzers. In most cases, this does not matter, since mixed 64- and 32-bit code in a single image is likely a niche case and can be handled via careful commands from the user. Nevertheless, TODO: Rework x86-64 analyzers to call the correct mode of disassembly.

    • Constructor Detail

      • X86_64DisassembleCommand

        public X86_64DisassembleCommand​(AddressSetView startSet,
                                        AddressSetView restrictedSet,
                                        boolean size32Mode)
        Constructor for X86_64DisassembleCommand.
        Parameters:
        startSet - set of addresses to be the start of disassembly. The Command object will attempt to start a disassembly at each address in this set.
        restrictedSet - addresses that can be disassembled. a null set implies no restrictions.
        size32Mode - pass true if disassembling in 32-bit compatibility mode, otherwise normal 64-bit disassembly will be performed.
      • X86_64DisassembleCommand

        public X86_64DisassembleCommand​(Address start,
                                        AddressSetView restrictedSet,
                                        boolean size32Mode)
        Constructor for X86_64DisassembleCommand.
        Parameters:
        start - address to be the start of a disassembly.
        restrictedSet - addresses that can be disassembled. a null set implies no restrictions.
        size32Mode - pass true if disassembling in 32-bit compatibility mode, otherwise normal 64-bit disassembly will be performed.
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: Command
        Returns the name of this command.
        Specified by:
        getName in interface Command
        Overrides:
        getName in class BackgroundCommand
        Returns:
        the name of this command
      • setSeedContext

        public void setSeedContext​(DisassemblerContextImpl seedContext)
        Description copied from class: DisassembleCommand
        Allows the disassembler context to be seeded for the various disassembly start points which may be encountered using the future flow state of the specified seedContext. Any initial context set via the DisassembleCommand.setInitialContext(RegisterValue) method will take precedence when combined with any seed values. The seedContext should remain unchanged while disassembler command is actively running.
        Overrides:
        setSeedContext in class DisassembleCommand
        Parameters:
        seedContext - seed context or null
      • applyTo

        public boolean applyTo​(DomainObject obj,
                               TaskMonitor monitor)
        Description copied from class: BackgroundCommand
        Method called when this command is to apply changes to the given domain object. A monitor is provided to display status information about the command as it executes in the background.
        Overrides:
        applyTo in class DisassembleCommand
        Parameters:
        obj - domain object that will be affected by the command
        monitor - monitor to show progress of the command
        Returns:
        true if the command applied successfully