[chuck-users] chuck under gdb?

Robert Poor rdpoor at gmail.com
Sun May 24 01:32:35 EDT 2009

I've recompiled chuck with -g and it just gets stranger: with a  
construct along the lines of:

fun void a() {
	<<< "in a before b" >>>;
	<<< "in a after b" >>>;

fun void b() {
	<<< "entering b" >>>;
	...do some stuff...
	<<< "exiting b" >>>;

There are no yields() that would let another process run in-between  
the call to b and returning to a, but it *sometimes* crashes after the  
return, so I see the equivalent of:

	"in a before b"
	"entering in b"
	"exiting in b"

I'm seeing a "KERN_INVALID_ADDRESS" at a non-zero address, thrown from  
inside Chuck_Instr_Reg_Push_Imm::execute()

I'm at a real loss how to tackle this one.  Its part of a large body  
of code, so excerpting it down to a minimal example would be tough.   
Absent any suggestions from the Chuck wizards out there, I'm tempted  
to simply re-write my code in a different way and hope it makes a  
difference.  But that's not my favorite approach.

Suggestions more than welcome.

- rdp

On 23 May 2009, at 21:49, Tom Lieber wrote:

> On Sun, May 24, 2009 at 12:36 AM, Robert Poor <rdpoor at gmail.com>  
> wrote:
>> (and do I need to
>> recompile the sources with -g?)
> Yeah, if you don't get filenames in gdb, you need to recompile with
> -g. I thought it did that by default... maybe it's inconsistently used
> across the makefiles?
> -- 
> Tom Lieber
> http://AllTom.com/
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

More information about the chuck-users mailing list