I'm experiencing an strange reset problem.
It seems that arduino resets when I do
struct zigbee a;
The XBee class and the struct zigbee forms part of an XBee library I'm developing.
The XBee class has a bunch of functions but I'm not calling any of those functions(I commented out all calls to xbee.xxxx() in the sketch).
The strange thing is that this reset doesn't seem to be related with any code running on XBee constructor neither, because I commented out all statements inside the constructor and the reset keeps ocurring. The reset always comes when instantiating the object. The funny part is that if I remove/change the a string literal from "12345678" to "1234567" on the XBee class then it doesn't reset anymore. But that code that I'm changing it's never executed!!. I never call that code
So I'm wondering if it could be a linking error or something like that.
My real question is how to I debug such an error? Do I need to buy an JTAG debugger, (AVR Dragon?) or is there any way to spot the problem usign avr-objdump?
What could I do to find out what's happening?