node/lib/metasm/metasm/gui/dasm_main.rb
def focus_addr(addr, viewidx=nil, quiet=false, *a)
		viewidx ||= curview_index || :listing
		return if not addr
		return if viewidx == curview_index and addr == curaddr and a.empty?
		oldpos = [curview_index, (curview.get_cursor_pos if curview)]
		views = [viewidx, oldpos[0]]
		views += [:listing, :graph, :decompile] & view_indexes
		if views.compact.uniq.find { |i|
			o_p = view(i).get_cursor_pos
			if (view(i).focus_addr(addr, *a) rescue nil)
				view(i).gui_update if i != oldpos[0]
				showview(i)
				true
			else
				view(i).set_cursor_pos o_p
				a.clear
				false
			end
		}
			@pos_history << oldpos if oldpos[0]	# ignore start focus_addr
			@pos_history_redo.clear
			session_append "@session_focus_addr = #{addr.inspect} ; @pos_history = #{@pos_history.inspect}"
			true
		else
			messagebox "Invalid address #{addr}" if not quiet
			if oldpos[0]
				showview oldpos[0]
				curview.set_cursor_pos oldpos[1]
			end
			false
		end
	end
# display the specified address
# the display first searches in the current view
# if it cannot display the address, the listing, graph and decompile views are tried (in that order)
# the current focus address is saved in @pos_history (see focus_addr_back/redo)
# if quiet is false, a messagebox is popped if no view can display the address
display the specified address
the display first searches in the current view
if it cannot display the address, the listing, graph and decompile views are tried (in that order)
the current focus address is saved in @pos_history
if quiet is false, a messagebox is popped if no view can display the address
display the specified address the display first searches in the current view if it cannot display the address the listing graph and decompile views are tried ( in that order ) the current focus address is saved in @pos_history if quiet is false a messagebox is popped if no view can display the address
def focus_addr(addr, viewidx=nil, quiet=false, *a)
		viewidx ||= curview_index || :listing
		return if not addr
		return if viewidx == curview_index and addr == curaddr and a.empty?
		oldpos = [curview_index, (curview.get_cursor_pos if curview)]
		views = [viewidx, oldpos[0]]
		views += [:listing, :graph, :decompile] & view_indexes
		if views.compact.uniq.find { |i|
			o_p = view(i).get_cursor_pos
			if (view(i).focus_addr(addr, *a) rescue nil)
				view(i).gui_update if i != oldpos[0]
				showview(i)
				true
			else
				view(i).set_cursor_pos o_p
				a.clear
				false
			end
		}
			@pos_history << oldpos if oldpos[0]	
			@pos_history_redo.clear
			session_append "@session_focus_addr = #{addr.inspect} ; @pos_history = #{@pos_history.inspect}"
			true
		else
			messagebox "Invalid address #{addr}" if not quiet
			if oldpos[0]
				showview oldpos[0]
				curview.set_cursor_pos oldpos[1]
			end
			false
		end
	end
def focus_addr ( addr , viewidx = nil , quiet = false , * a ) viewidx ||= curview_index || :listing return if not addr return if viewidx == curview_index and addr == curaddr and a . empty? oldpos = [ curview_index , ( curview . get_cursor_pos if curview ) ] views = [ viewidx , oldpos [ 0 ] ] views += [ :listing , :graph , :decompile ] & view_indexes if views . compact . uniq . find { | i | o_p = view ( i ) . get_cursor_pos if ( view ( i ) . focus_addr ( addr , * a ) rescue nil ) view ( i ) . gui_update if i != oldpos [ 0 ] showview ( i ) true else view ( i ) . set_cursor_pos o_p a . clear false end } @pos_history << oldpos if oldpos [ 0 ] @pos_history_redo . clear session_append "@session_focus_addr = #{addr.inspect} ; @pos_history = #{@pos_history.inspect}" true else messagebox "Invalid address #{addr}" if not quiet if oldpos [ 0 ] showview oldpos [ 0 ] curview . set_cursor_pos oldpos [ 1 ] end false end end
display the specified address
the display first searches in the current view
if it cannot display the address, the listing, graph and decompile views are tried (in that order)
the current focus address is saved in @pos_history (see focus_addr_back/redo)
if quiet is false, a messagebox is popped if no view can display the address
display the specified address the display first searches in the current view if it cannot display the address the listing graph and decompile views are tried ( in that order ) the current focus address is saved in @pos_history ( see focus_addr_back / redo ) if quiet is false a messagebox is popped if no view can display the address
# ignore start focus_addr
addr
viewidx
quiet
a