Re: why debug step by step, it s ok
- From: August Karlstrom <fusionfive@xxxxxxxxx>
- Date: Fri, 03 Jun 2005 22:18:28 GMT
baumann@pan wrote:
Hi all,
I have one simple program: #define __EXTENSIONS__ #include <stdio.h> #include <string.h>
int main() { char *buf="5/90/45"; char *token; char *lasts;
printf("tokenizing \"%s\" with strtok():\n", buf); if ((token = strtok(buf, "/")) != NULL) { printf("token = \"%s\"\n", token); while ((token = strtok(NULL, "/")) != NULL) { printf("token = \"%s\"\n", token); } } }
the program has abused the strok, i know it,
******but why when i `gdb prog_name` and execute step by step , it 's ok?
baumann here clearly states that he knows that the program is incorrect and the reason for it. Many of you reply as if he didn't know that. Please read the post before replying.
-- August .
- References:
- why debug step by step, it s ok
- From: baumann@pan
- why debug step by step, it s ok
- Prev by Date: Re: Why compiler not generating any warning ?
- Next by Date: Re: Open source embedded C ; appropiate group?
- Previous by thread: Re: why debug step by step, it s ok
- Next by thread: Re: why debug step by step, it s ok
- Index(es):