Class: DSP::DisassembledInstruction
- Defined in:
- lib/dsp/dsp_protocol.rb
Overview
interface DisassembledInstruction {
/** The address of the instruction. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise. */
address: string;
/** Optional raw bytes representing the instruction and its operands, in an implementation-defined format. */
instructionBytes?: string;
/** Text representing the instruction and its operands, in an implementation-defined format. */
instruction: string;
/** Name of the symbol that corresponds with the location of this instruction, if any. */
symbol?: string;
/** Source location that corresponds to this instruction, if any.
Should always be set (if available) on the first instruction returned,
but can be omitted afterwards if this instruction maps to the same source file as the previous instruction.
*/
location?: Source;
/** The line within the source location that corresponds to this instruction, if any. */
line?: number;
/** The column within the line that corresponds to this instruction, if any. */
column?: number;
/** The end line of the range that corresponds to this instruction, if any. */
endLine?: number;
/** The end column of the range that corresponds to this instruction, if any. */
endColumn?: number;
}
Instance Attribute Summary collapse
-
#address ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number.
-
#column ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number.
-
#endColumn ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number.
-
#endLine ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number.
-
#instruction ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number.
-
#instructionBytes ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number.
-
#line ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number.
-
#location ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number.
-
#symbol ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ DisassembledInstruction
constructor
A new instance of DisassembledInstruction.
Methods inherited from DSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ DisassembledInstruction
Returns a new instance of DisassembledInstruction.
4594 4595 4596 4597 |
# File 'lib/dsp/dsp_protocol.rb', line 4594 def initialize(initial_hash = nil) super @optional_method_names = %i[instructionBytes symbol location line column endLine endColumn] end |
Instance Attribute Details
#address ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number
4592 4593 4594 |
# File 'lib/dsp/dsp_protocol.rb', line 4592 def address @address end |
#column ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number
4592 4593 4594 |
# File 'lib/dsp/dsp_protocol.rb', line 4592 def column @column end |
#endColumn ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number
4592 4593 4594 |
# File 'lib/dsp/dsp_protocol.rb', line 4592 def endColumn @endColumn end |
#endLine ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number
4592 4593 4594 |
# File 'lib/dsp/dsp_protocol.rb', line 4592 def endLine @endLine end |
#instruction ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number
4592 4593 4594 |
# File 'lib/dsp/dsp_protocol.rb', line 4592 def instruction @instruction end |
#instructionBytes ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number
4592 4593 4594 |
# File 'lib/dsp/dsp_protocol.rb', line 4592 def instructionBytes @instructionBytes end |
#line ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number
4592 4593 4594 |
# File 'lib/dsp/dsp_protocol.rb', line 4592 def line @line end |
#location ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number
4592 4593 4594 |
# File 'lib/dsp/dsp_protocol.rb', line 4592 def location @location end |
#symbol ⇒ Object
type: string # type: string # type: string # type: string # type: Source # type: number # type: number # type: number # type: number
4592 4593 4594 |
# File 'lib/dsp/dsp_protocol.rb', line 4592 def symbol @symbol end |
Instance Method Details
#from_h!(value) ⇒ Object
4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 |
# File 'lib/dsp/dsp_protocol.rb', line 4599 def from_h!(value) value = {} if value.nil? self.address = value['address'] self.instructionBytes = value['instructionBytes'] self.instruction = value['instruction'] self.symbol = value['symbol'] self.location = Source.new(value['location']) unless value['location'].nil? self.line = value['line'] self.column = value['column'] self.endLine = value['endLine'] self.endColumn = value['endColumn'] self end |