found what the problem was I think, strtok is a bad thing to use. Also added gdb notes.