0

私は両方をコンパイルしました

gcc -Wall -gdwarf-2 -g3 -g ws.c socklib.c web-time.c varlib.c -o ws

gcc -Wall -gdwarf-2 -g3 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);

...
4

0 に答える 0