Re: Trying to use gdb on OS X

new topic     » goto parent     » topic index » view thread      » older message » newer message

Okay, I changed the code of Dand_bits() in be_runtime.c to this and it works:

object Dand_bits(d_ptr a, d_ptr b) 
/* double a AND b */ 
{ 
/*	return and_bits( (unsigned long)(a->dbl), (unsigned long)(b->dbl));*/ 
	unsigned long long i1, i2; 
	i1 = (unsigned long long)(a->dbl); 
	i2 = (unsigned long long)(b->dbl); 
	return and_bits((unsigned long)(i1), (unsigned long)(i2)); 
} 

I'm not sure why the cast to long long is necessary, just that the conversion was failing somewhere. Even though I'm compiling to 32 bits, the OS is 32/64 hybrid. I do remember seeing a 64-bit representation of -1 in gdb (0xffffffffffffffff) in my initial investigations, I just don't remember exactly how I got it.

jason$ file build/eui 
build/eui: Mach-O executable i386 
 
jason$ uname -a 
Darwin 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu