Index: tests/concurrent/futures/multi.cfa
===================================================================
--- tests/concurrent/futures/multi.cfa	(revision 200a2298cdba8448a5f6101cdffaee0b5450c42d)
+++ tests/concurrent/futures/multi.cfa	(revision 92b99582f2cac55ec8dec114c10fa83e9b366054)
@@ -5,10 +5,12 @@
 
 thread Server {
-	int cnt, iteration;
+	int pending, done, iteration;
 	multi_future(int) * request;
 };
 
 void ?{}( Server & this ) {
-	this.cnt = 0;
+	((thread&)this){"Server Thread"};
+	this.pending = 0;
+	this.done = 0;
 	this.iteration = 0;
 	this.request = 0p;
@@ -16,6 +18,6 @@
 
 void ^?{}( Server & mutex this ) {
-	assert(this.cnt == 0);
-    this.request = 0p;
+	assert(this.pending == 0);
+	this.request = 0p;
 }
 
@@ -24,30 +26,31 @@
 }
 
-void process( Server & mutex this ) {
-	fulfil( *this.request, this.iteration );
-	this.iteration++;
+void call( Server & mutex this ) {
+	this.pending++;
 }
 
-void call( Server & mutex this ) {
-	this.cnt++;
+void finish( Server & mutex this ) {
+	this.done++;
 }
 
-void finish( Server & mutex this ) { }
-
 void main( Server & this ) {
+	MAIN_LOOP:
 	for() {
 		waitfor( ^?{} : this ) {
 			break;
 		}
-		or when( this.cnt < NFUTURES ) waitfor( call: this ) {
-			if (this.cnt == NFUTURES) {
-				process(this);
+		or waitfor( call: this ) {
+			if (this.pending != NFUTURES) { continue MAIN_LOOP; }
+
+			this.pending = 0;
+			fulfil( *this.request, this.iteration );
+			this.iteration++;
+
+			for(NFUTURES) {
+				waitfor( finish: this );
 			}
-		}
-		or waitfor( finish: this ) {
-			if (this.cnt == NFUTURES) {
-				reset( *this.request );
-				this.cnt = 0;
-			}
+
+			reset( *this.request );
+			this.done = 0;
 		}
 	}
@@ -57,4 +60,8 @@
 Server * the_server;
 thread Worker {};
+void ?{}(Worker & this) {
+	((thread&)this){"Worker Thread"};
+}
+
 multi_future(int) * shared_future;
 
Index: tests/concurrent/spinaphore.cfa
===================================================================
--- tests/concurrent/spinaphore.cfa	(revision 200a2298cdba8448a5f6101cdffaee0b5450c42d)
+++ tests/concurrent/spinaphore.cfa	(revision 92b99582f2cac55ec8dec114c10fa83e9b366054)
@@ -49,10 +49,10 @@
 void main(Unblocker & this) {
 	this.sum = 0;
-	unsigned me = (unsigned)&this;
+	unsigned me = (unsigned)(uintptr_t)&this;
 	for(num_unblocks) {
 		$thread * t = V(sem, false);
 		Blocker * b = from_thread(t);
 		b->sum += me;
-		this.sum += (unsigned)b;
+		this.sum += (unsigned)(uintptr_t)b;
 		unpark(t);
 		yield(random(10));
@@ -73,10 +73,10 @@
 		for(i;num_blockers) {
 			for(num_blocks)
-				usum += (unsigned)&blockers[i];
+				usum += (unsigned)(uintptr_t)&blockers[i];
 		}
 
 		for(i;num_unblockers) {
 			for(num_unblocks)
-				bsum += (unsigned)&unblockers[i];
+				bsum += (unsigned)(uintptr_t)&unblockers[i];
 		}
 
Index: tools/gdb/utils-gdb.py
===================================================================
--- tools/gdb/utils-gdb.py	(revision 200a2298cdba8448a5f6101cdffaee0b5450c42d)
+++ tools/gdb/utils-gdb.py	(revision 92b99582f2cac55ec8dec114c10fa83e9b366054)
@@ -480,17 +480,24 @@
 		context = thread['context']
 
+
+
+		# must be at frame 0 to set pc register
+		gdb.execute('select-frame 0')
+		if gdb.selected_frame().architecture().name() != 'i386:x86-64':
+			print('gdb debugging only supported for i386:x86-64 for now')
+			return
+
+		# gdb seems to handle things much better if we pretend we just entered the context switch
+		# pretend the pc is __cfactx_switch and adjust the sp, base pointer doesn't need to change
 		# lookup for sp,fp and uSwitch
-		xsp = context['SP'] + 48
+		xsp = context['SP'] + 40 # 40 = 5 64bit registers : %r15, %r14, %r13, %r12, %rbx WARNING: x64 specific
 		xfp = context['FP']
 
 		# convert string so we can strip out the address
 		try:
-			xpc = get_addr(gdb.parse_and_eval('__cfactx_switch').address + 28)
+			xpc = get_addr(gdb.parse_and_eval('__cfactx_switch').address)
 		except:
 			print("here")
 			return
-
-		# must be at frame 0 to set pc register
-		gdb.execute('select-frame 0')
 
 		# push sp, fp, pc into a global stack
@@ -503,5 +510,6 @@
 
 		# update registers for new task
-		print('switching to ')
+		# print('switching to {} ({}) : [{}, {}, {}]'.format(thread['self_cor']['name'].string(), str(thread), str(xsp), str(xfp), str(xpc)))
+		print('switching to thread {} ({})'.format(str(thread), thread['self_cor']['name'].string()))
 		gdb.execute('set $rsp={}'.format(xsp))
 		gdb.execute('set $rbp={}'.format(xfp))
@@ -552,5 +560,4 @@
 
 		argv = parse(arg)
-		print(argv)
 		if argv[0].isdigit():
 			cname = " ".join(argv[1:]) if len(argv) > 1 else None
