diff lwasm/lwasm.c @ 418:4b137a8cf32a

Implemented "branch points"
author lost@l-w.ca
date Tue, 10 Aug 2010 23:08:30 -0600
parents 1d69ed28f175
children 00924eeb2ec8
line wrap: on
line diff
--- a/lwasm/lwasm.c	Tue Aug 10 23:08:07 2010 -0600
+++ b/lwasm/lwasm.c	Tue Aug 10 23:08:30 2010 -0600
@@ -137,11 +137,31 @@
 	
 	case lwasm_expr_nextbp:
 		{
+			line_t *cl = ptr;
+			for (cl = cl -> next; cl; cl = cl -> next)
+			{
+				if (cl -> isbrpt)
+					break;
+			}
+			if (cl)
+			{
+				return lw_expr_copy(cl -> addr);
+			}
 			return NULL;
 		}
 	
 	case lwasm_expr_prevbp:
 		{
+			line_t *cl = ptr;
+			for (cl = cl -> prev; cl; cl = cl -> prev)
+			{
+				if (cl -> isbrpt)
+					break;
+			}
+			if (cl)
+			{
+				return lw_expr_copy(cl -> addr);
+			}
 			return NULL;
 		}
 	}