node/lib/metasm/metasm/gui/dasm_main.rb
def prompt_struct_ptr(reg=curview.hl_word, addr=curaddr)
		return if not reg or not @dasm.cpu.register_symbols.find { |rs| rs.to_s == reg.to_s }
		reg = reg.to_sym

		di = @dasm.di_at(addr)
		return if not di.kind_of?(DecodedInstruction)

		prompt_c_struct("struct pointed by #{reg}", :allow_stars => true) { |st|
			# TODO store that info for the decompiler ?
			@dasm.trace_update_reg_structptr(addr, reg, st)
			session_append "dasm.trace_update_reg_structptr(#{addr.inspect}, #{reg.inspect}, #{st.inspect})"
			gui_update
		}
	end
# prompt the struct to use for offset in a given instr
prompt the struct to use for offset in a given instr
prompt the struct to use for offset in a given instr
def prompt_struct_ptr(reg=curview.hl_word, addr=curaddr)
		return if not reg or not @dasm.cpu.register_symbols.find { |rs| rs.to_s == reg.to_s }
		reg = reg.to_sym
		di = @dasm.di_at(addr)
		return if not di.kind_of?(DecodedInstruction)
		prompt_c_struct("struct pointed by #{reg}", :allow_stars => true) { |st|
			@dasm.trace_update_reg_structptr(addr, reg, st)
			session_append "dasm.trace_update_reg_structptr(#{addr.inspect}, #{reg.inspect}, #{st.inspect})"
			gui_update
		}
	end
def prompt_struct_ptr ( reg = curview . hl_word , addr = curaddr ) return if not reg or not @dasm . cpu . register_symbols . find { | rs | rs . to_s == reg . to_s } reg = reg . to_sym di = @dasm . di_at ( addr ) return if not di . kind_of? ( DecodedInstruction ) prompt_c_struct ( "struct pointed by #{reg}" , :allow_stars => true ) { | st | @dasm . trace_update_reg_structptr ( addr , reg , st ) session_append "dasm.trace_update_reg_structptr(#{addr.inspect}, #{reg.inspect}, #{st.inspect})" gui_update } end
prompt the struct to use for offset in a given instr
prompt the struct to use for offset in a given instr
# TODO store that info for the decompiler ?
reg
curview
hl_word
addr
curaddr