node/lib/metasm/metasm/cpu/ia32/debug.rb
def dbg_alloc_bphw(dbg, bp)
		if not bp.internal[:dr]
			may = [0, 1, 2, 3]
			dbg.breakpoint_thread.values.each { |bb| may.delete bb.internal[:dr] }
			raise 'alloc_bphw: no free debugregister' if may.empty?
			bp.internal[:dr] = may.first
		end
		bp.internal[:type] ||= :x
		bp.internal[:len]  ||= 1
		bp.internal[:dr]
	end
# allocate a debug register for a hwbp by checking the list of hwbp existing in dbg
allocate a debug register for a hwbp by checking the list of hwbp existing in dbg
allocate a debug register for a hwbp by checking the list of hwbp existing in dbg
def dbg_alloc_bphw(dbg, bp)
		if not bp.internal[:dr]
			may = [0, 1, 2, 3]
			dbg.breakpoint_thread.values.each { |bb| may.delete bb.internal[:dr] }
			raise 'alloc_bphw: no free debugregister' if may.empty?
			bp.internal[:dr] = may.first
		end
		bp.internal[:type] ||= :x
		bp.internal[:len]  ||= 1
		bp.internal[:dr]
	end
def dbg_alloc_bphw ( dbg , bp ) if not bp . internal [ :dr ] may = [ 0 , 1 , 2 , 3 ] dbg . breakpoint_thread . values . each { | bb | may . delete bb . internal [ :dr ] } raise 'alloc_bphw: no free debugregister' if may . empty? bp . internal [ :dr ] = may . first end bp . internal [ :type ] ||= :x bp . internal [ :len ] ||= 1 bp . internal [ :dr ] end
allocate a debug register for a hwbp by checking the list of hwbp existing in dbg
allocate a debug register for a hwbp by checking the list of hwbp existing in dbg
dbg
bp