bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] debugger bugs


From: Giovanni Russo
Subject: [bug-gawk] debugger bugs
Date: Tue, 14 Jun 2016 14:15:50 +0200

I noted many weird behavior in the debugger. I compiled version 4.1.3g on windows 10 with mingw32. First of all starting gawk with -D the command prompt of the debugger disappear. To solve this I comment line 365 in debug.c leaving the command fprintf that follows.
Second the breakpoints management must be reviewed, I inserted breakpoints in both branch of nested if then start execution and some breakpoints are caught (but only the first time) and other are bypassed going rapidly to the end of the evaluation.
This is my source file.
BEGIN {
    FS=";";
    OFS=";";
}
{
    if(tolower(FILENAME)=="file1.txt") {
        if(FNR==1) next;
        aa[$6]=$3 SUBSEP $4 SUBSEP $5;
    } else {
        if(FNR==1) {
            print $1,$2,$3;
        } else {
            cap=$5;
            if(!(cap in aa)) {
                bb[1]="";
                bb[2]="";
                bb[3]="";
            } else split(aa[cap],bb,SUBSEP);
            print $1,$2,$3,$4;
        }
    }
}

You might start the execution using two files of data: file1.txt and file2.txt with a few rows with fields separated by ';'
I test this behavior on windows 10, windows 8 and windows 7 64bits.

Bye

reply via email to

[Prev in Thread] Current Thread [Next in Thread]