swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] GDB backtrace


From: Marcus G. Daniels
Subject: Re: [Swarm-Support] GDB backtrace
Date: Thu, 25 Nov 2004 21:49:05 -0700
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)

Crile Doscher wrote:

Could anyone help me decipher this backtrace?

The backtrace isn't helpful, obviously. Usually an incremental approach of breakpoints in GDB or direct instrumentation in your model is the way to go. For example, you can put in diagnostics like printf("Made it to checkpoint #1"); in your code (checkpoint #2,3,4,[etc]). Then you can interpolate between the checkpoints by scrutinizing your code to posit places that could fail due to things like memory management mistakes (running over the end of arrays, using uninizalized object handles, etc). One thing to note with GDB is that if your model is being compiled with -O2 (the default), you can get counterintuitive results on GDB's perception of where line numbers are. To really use GDB for high level debugging, you'll want to compile with -O0. Frankly, since most Swarm models are not large, it is easy to recompile them quickly, and thus using manual diagnostics is reliable and pretty fast.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]