C GDB赢得';不要在断点处停止
我已经用C GDB赢得';不要在断点处停止,c,C,我已经用 gcc -Wall -gdwarf-2 -g3 -g ws.c socklib.c web-time.c varlib.c -o ws 及 程序不会在我设置的断点处停止 ./ws gdb>b splitline gdb>b 1019 gdb>b 1020 断点已成功安装。第1019行是while语句。下面的打印消息不会执行 char ** splitline(char *line, int*has_query) { //char *newstr(); logg
gcc -Wall -gdwarf-2 -g3 -g ws.c socklib.c web-time.c varlib.c -o ws
及
程序不会在我设置的断点处停止
./ws
gdb>b splitline
gdb>b 1019
gdb>b 1020
断点已成功安装。第1019行是while语句。下面的打印消息不会执行
char ** splitline(char *line, int*has_query)
{
//char *newstr();
logg("In splitline\n");
char **args;
int spots = 0; /* spots in table */
int bufspace = 0; /* bytes in table */
int argnum = 0; /* slots used */
char *cp = line; /* pos in string */
char *start;
int len;
if (line == NULL) /* handle special case */
return NULL;
args = emalloc(BUFSIZ); /* initialize array */
bufspace = BUFSIZ;
spots = BUFSIZ / sizeof(char *);
int query_reached = 0; //Flag to specify that the first '?' was reached
while (*cp != '\0') {
logg("*cp=");
fprintf(stderr,"%c",*cp);
...
评论的原因是什么
ws.c
是一个非常通用的文件名。@Raksice,很遗憾,我再也无法访问该代码了,但我认为这不是问题所在。
char ** splitline(char *line, int*has_query)
{
//char *newstr();
logg("In splitline\n");
char **args;
int spots = 0; /* spots in table */
int bufspace = 0; /* bytes in table */
int argnum = 0; /* slots used */
char *cp = line; /* pos in string */
char *start;
int len;
if (line == NULL) /* handle special case */
return NULL;
args = emalloc(BUFSIZ); /* initialize array */
bufspace = BUFSIZ;
spots = BUFSIZ / sizeof(char *);
int query_reached = 0; //Flag to specify that the first '?' was reached
while (*cp != '\0') {
logg("*cp=");
fprintf(stderr,"%c",*cp);
...