#[non_exhaustive]pub struct Options {
pub header: bool,
pub numbering: bool,
pub offsets: bool,
pub hex_literals: bool,
pub debug_info: bool,
}Expand description
How the listing is written: the switches of Microsoft’s D3D_DISASM_* flags that this disassembler writes.
Options::default is D3DDisassemble with no flags.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.header: boolThe comment block before the program and the instruction count after it; off, only the program’s lines
(D3D_DISASM_INSTRUCTION_ONLY, 0x40).
numbering: boolEach instruction after its number, 12:, other lines after as many spaces; before an offset, 12
(D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING, 0x04).
offsets: boolEach line after the byte offset of its token in the program, 0x0000001C: , after the number
(D3D_DISASM_ENABLE_INSTRUCTION_OFFSET, 0x20).
hex_literals: boolEvery 32-bit value as eight hex digits, l(0x3f800000) (D3D_DISASM_PRINT_HEX_LITERALS, 0x80).
debug_info: boolA /Zi build’s source lines and variable locations: from the SPDB part, #line lines, the variables’
initial locations before the first instruction with a line, and after an instruction the locations that start
at the next; from a feature level 9 container’s Direct3D 9 program, its own (cleared by
D3D_DISASM_DISABLE_DEBUG_INFO, 0x10).
Implementations§
Source§impl Options
impl Options
Sourcepub fn from_flags(flags: u32) -> Result<Self>
pub fn from_flags(flags: u32) -> Result<Self>
The options of a D3D_DISASM_* flags word. D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS (0x02) changes nothing
(the default values are written either way). Refuses
D3D_DISASM_ENABLE_COLOR_CODE (0x01, an HTML listing), D3D_DISASM_ENABLE_INSTRUCTION_CYCLE (0x08, which
Microsoft’s disassembler refuses too) and bits it does not define, naming the bit.