[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Simulavr-devel] probably simulavr/gdb bug
From: |
ken restivo |
Subject: |
[Simulavr-devel] probably simulavr/gdb bug |
Date: |
Wed, 30 Jan 2002 14:04:37 -0800 |
User-agent: |
Mutt/1.3.25i |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
well, i've isolated this down to a small test program. it looks like the
execution bug was mine, but the gdb problem looks like it's in
simulavr/gdbserver.c somewhere.
basically, if you step through it in avr-gdb, the call to calledFunc looks
right, but once you step into calledFunc, then reports garbage values for the
passed-in parameters. the registers themselves look correct in disp.
i am using GNU gdb 5.1-avr-patch-0.0-pre8, and the latest cvs of simulavr. my
toolchain is gcc 3.01, and the 20010821 libc.
/* test program for gdb weirdness */
#include <io.h>
#include <stdlib.h>
struct teststruct {
int junk;
void (*funky)(void);
int morejunk;
};
volatile void
idler()
{
outp('I', PORTD);
outp('\n', PORTD);
}
volatile void
calledFunc(struct teststruct * thr, int pri, void (*funk)() , int stackSize )
{
outp('C', PORTD);
outp('\n', PORTD);
funk();
}
int
main(int argc, char ** argv)
{
struct teststruct * ith;
ith = malloc(sizeof(struct teststruct));
outp(0xFF, DDRD);
calledFunc(ith, 0, idler, 0);
while(1);
return(0);
} /* END MAIN */
/* EOF */
- -ken
- --
- ------------------
One world. Many gods. Plenty for everyone.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8WG31e8HF+6xeOIcRAoptAKCgSQdVV07mfkS6s2e/mhGnQygOLQCfS9Ht
Ko/x+Ny5qlAbyvyi1iQD5/M=
=5aKi
-----END PGP SIGNATURE-----
- [Simulavr-devel] probably simulavr/gdb bug,
ken restivo <=