ejrgilbert / whamm

5 stars 2 forks source link

Cannot call strcmp in User-def functions, probes, or global space #57

Closed wavid-b closed 2 weeks ago

wavid-b commented 2 weeks ago

error - strcmp in userspace

wavid-b commented 2 weeks ago

can add screenshots of the other bugged cases if needed

ahuoguo commented 2 weeks ago

I think the problem is we are not treating function calls as statements.

The following script parses correctly:

    BEGIN { a = strcmp((arg0, arg1), "bookings"); }
wavid-b commented 2 weeks ago

user-defined fn calls are being parsed as statements though, thats why I don't get it being different for strcmp. I'll check some more edge cases though

wavid-b commented 2 weeks ago

a = strcmp((arg0, arg1), "bookings"); is working correctly in all 3 spaces, but not without the "a"