Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C GDB赢得';不要在断点处停止_C - Fatal编程技术网

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);

...