dannykopping / b3

strace to json parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistant data type in "result"

mistralol opened this issue · comments

When strace reports a success on the system call it prints the return code without a message. When it print an error it reports a text string with it. This seems to adjust the field data type in the json output

eg

Its an int here.

{"syscall":"read","args":[3,"",4096],"result":0,"timing":0.000004,"pid":null,"type":"SYSCALL"}

But string here.

{"syscall":"read","args":[0,140678528360448,131072],"result":"-1 EAGAIN (Resource temporarily unavailable)","timing":0.043223,"pid":null,"type":"SYSCALL"}

Sometimes these also return a pointer as well...

{"syscall":"mmap","args":[null,281016,["PROT_READ"],["MAP_PRIVATE"],3,0],"result":140517931040768,"timing":0.000008,"pid":null,"type":"SYSCALL"}