Esempio n. 1
0
 /// <summary>
 /// Returns true if <paramref name="symbol"/> was updated with a symbol. <paramref name="symbolSelector"/> can be set to default value
 /// if it should be formatted as a number. <paramref name="options"/> is used if this method returns false or if <paramref name="symbolSelector"/>
 /// has the default value.
 /// </summary>
 /// <param name="operand">Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand.</param>
 /// <param name="instruction">Instruction</param>
 /// <param name="selector">Selector/segment</param>
 /// <param name="address">Address</param>
 /// <param name="addressSize">Size of <paramref name="address"/> in bytes</param>
 /// <param name="symbolSelector">Updated with the selector symbol or with the default value if it should be formatted as a number</param>
 /// <param name="symbol">Updated with symbol information if this method returns true</param>
 /// <param name="showBranchSize">true if branch info (short, near ptr, far ptr) should be shown</param>
 /// <param name="options">Number formatting options if this method returns false or if <paramref name="symbolSelector"/> has the default value</param>
 /// <returns></returns>
 public virtual bool TryGetFarBranchSymbol(int operand, ref Instruction instruction, ushort selector, uint address, int addressSize, out SymbolResult symbolSelector, out SymbolResult symbol, ref bool showBranchSize, ref NumberFormattingOptions options)
 {
     symbolSelector = default;
     return(TryGetSymbol(operand, ref instruction, address, addressSize, out symbol, ref options));
 }
Esempio n. 2
0
 /// <summary>
 /// Gets a symbol and returns true. If it returns false, <paramref name="options"/> can be updated to override
 /// the default number formatting options.
 /// </summary>
 /// <param name="operand">Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand.</param>
 /// <param name="instruction">Instruction</param>
 /// <param name="immediate">Immediate value</param>
 /// <param name="immediateSize">Size of <paramref name="immediate"/> in bytes</param>
 /// <param name="symbol">Updated with symbol information if this method returns true</param>
 /// <param name="options">Number formatting options if this method returns false</param>
 /// <returns></returns>
 public virtual bool TryGetImmediateSymbol(int operand, ref Instruction instruction, ulong immediate, int immediateSize, out SymbolResult symbol, ref NumberFormattingOptions options) =>
 TryGetSymbol(operand, ref instruction, immediate, immediateSize, out symbol, ref options);
Esempio n. 3
0
 /// <summary>
 /// This method is called if you don't override any of the other virtual methods. It should return true if
 /// <paramref name="symbol"/> was updated. If false is returned, <paramref name="options"/> can be updated to
 /// override the default number formatting options.
 /// </summary>
 /// <param name="operand">Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand.</param>
 /// <param name="instruction">Instruction</param>
 /// <param name="address">Address</param>
 /// <param name="addressSize">Size of <paramref name="address"/> in bytes</param>
 /// <param name="symbol">Updated with symbol information if this method returns true</param>
 /// <param name="options">Number formatting options if this method returns false</param>
 /// <returns></returns>
 protected virtual bool TryGetSymbol(int operand, ref Instruction instruction, ulong address, int addressSize, out SymbolResult symbol, ref NumberFormattingOptions options)
 {
     symbol = default;
     return(false);
 }
Esempio n. 4
0
 /// <summary>
 /// Updates <paramref name="symbol"/> with the symbol and returns true, else it returns false and can update <paramref name="options"/>
 /// to override the default number formatting options
 /// </summary>
 /// <param name="operand">Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand.</param>
 /// <param name="instruction">Instruction</param>
 /// <param name="address">Address</param>
 /// <param name="addressSize">Size of <paramref name="address"/> in bytes</param>
 /// <param name="symbol">Updated with symbol information if this method returns true</param>
 /// <param name="showBranchSize">true if branch info (short, near ptr, far ptr) should be shown</param>
 /// <param name="options">Number formatting options if this method returns false</param>
 /// <returns></returns>
 public virtual bool TryGetBranchSymbol(int operand, ref Instruction instruction, ulong address, int addressSize, out SymbolResult symbol, ref bool showBranchSize, ref NumberFormattingOptions options) =>
 TryGetSymbol(operand, ref instruction, address, addressSize, out symbol, ref options);
Esempio n. 5
0
 /// <summary>
 /// Gets a symbol and returns true. If it returns false, <paramref name="options"/> can be updated to override
 /// the default number formatting options.
 ///
 /// This method gets called even if the memory operand has no displacement, eg. [eax].
 /// </summary>
 /// <param name="operand">Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand.</param>
 /// <param name="instruction">Instruction</param>
 /// <param name="displacement">Displacement. If it's RIP-relative addressing, this is the absolute address (rip/eip + displ)</param>
 /// <param name="displacementSize">Size of <paramref name="displacement"/> in bytes</param>
 /// <param name="ripRelativeAddresses">true to use RIP relative addresses</param>
 /// <param name="symbol">Updated with symbol information if this method returns true</param>
 /// <param name="options">Number formatting options if this method returns false</param>
 /// <returns></returns>
 public virtual bool TryGetDisplSymbol(int operand, ref Instruction instruction, ulong displacement, int displacementSize, ref bool ripRelativeAddresses, out SymbolResult symbol, ref NumberFormattingOptions options) =>
 TryGetSymbol(operand, ref instruction, displacement, displacementSize, out symbol, ref options);
Esempio n. 6
0
 /// <summary>
 /// Gets a symbol and returns true. If it returns false, <paramref name="options"/> can be updated to override
 /// the default number formatting options.
 /// </summary>
 /// <param name="operand">Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand.</param>
 /// <param name="code">Code value</param>
 /// <param name="immediate">Immediate value</param>
 /// <param name="symbol">Updated with symbol information if this method returns true</param>
 /// <param name="options">Number formatting options if this method returns false</param>
 /// <returns></returns>
 public virtual bool TryGetImmediateSymbol(int operand, Code code, ulong immediate, out SymbolResult symbol, ref NumberFormattingOptions options) =>
 TryGetSymbol(operand, code, immediate, out symbol, ref options);
Esempio n. 7
0
 /// <summary>
 /// Updates <paramref name="symbol"/> with the symbol and returns true, else it returns false and can update <paramref name="options"/>
 /// to override the default number formatting options
 /// </summary>
 /// <param name="operand">Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand.</param>
 /// <param name="code">Code value, eg. a call, jmp, jcc, xbegin</param>
 /// <param name="address">Address</param>
 /// <param name="symbol">Updated with symbol information if this method returns true</param>
 /// <param name="showBranchSize">true if branch info (short, near ptr, far ptr) should be shown</param>
 /// <param name="options">Number formatting options if this method returns false</param>
 /// <returns></returns>
 public virtual bool TryGetBranchSymbol(int operand, Code code, ulong address, out SymbolResult symbol, ref bool showBranchSize, ref NumberFormattingOptions options) =>
 TryGetSymbol(operand, code, address, out symbol, ref options);
Esempio n. 8
0
 /// <summary>
 /// This method is called if you don't override any of the other virtual methods. It should return true if
 /// <paramref name="symbol"/> was updated. If false is returned, <paramref name="options"/> can be updated to
 /// override the default number formatting options.
 /// </summary>
 /// <param name="operand">Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand.</param>
 /// <param name="code">Code value</param>
 /// <param name="address">Address</param>
 /// <param name="symbol">Updated with symbol information if this method returns true</param>
 /// <param name="options">Number formatting options if this method returns false</param>
 /// <returns></returns>
 protected virtual bool TryGetSymbol(int operand, Code code, ulong address, out SymbolResult symbol, ref NumberFormattingOptions options)
 {
     symbol = default;
     return(false);
 }
Esempio n. 9
0
 /// <summary>
 /// Gets a symbol and returns true. If it returns false, <paramref name="options"/> can be updated to override
 /// the default number formatting options.
 ///
 /// This method gets called even if the memory operand has no displacement, eg. [eax].
 /// </summary>
 /// <param name="operand">Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand.</param>
 /// <param name="code">Code value</param>
 /// <param name="displacement">Displacement. If it's RIP-relative addressing, this is the absolute address (rip/eip + displ)</param>
 /// <param name="ripRelativeAddresses">true to use RIP relative addresses</param>
 /// <param name="symbol">Updated with symbol information if this method returns true</param>
 /// <param name="options">Number formatting options if this method returns false</param>
 /// <returns></returns>
 public virtual bool TryGetDisplSymbol(int operand, Code code, ulong displacement, ref bool ripRelativeAddresses, out SymbolResult symbol, ref NumberFormattingOptions options) =>
 TryGetSymbol(operand, code, displacement, out symbol, ref options);