[En-Nut-Discussion] Using gdb with NutOS... gdb print displays strange variable values
jdoubek at control4.com
Tue Jun 1 19:47:27 CEST 2004
Hello, Can anyone tell me any special setup I might need to be able to
debug a NutOS application under avr-gdb.
Currently I am encountering strange behaviour. For instance, I hit a
given breakpoint and everything looks good, I have a local int n that I
increment and check and print in gdb it looks ok. I have a local char
array however that is displayed incorrectly in gdb. If I do a memset to
this local char array of 0 and then do a print on it and get garbage in
gdb, not zeros. If I do a memcpy "Testing" into my local array and then
print it in gdb I again get garbage (the same garbage in fact). If I do
a printf on it in software at the same location I get "Testing". I
assume this has to do with the ATMega128 architecture and gdb setup not
looking at the correct memory space, but I'm new to using both gdb and
this platform so am at something of a loss on how this might be set up.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the En-Nut-Discussion