GithubHelp home page GithubHelp logo

b3's People

Contributors

dannykopping avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

b3's Issues

parsing error on complete instruction

when b3 try to parse this instruction i get this error

arch_prctl(0x3001 /* ARCH_??? */, 0x7ffe4887f480) = -1 EINVAL (Invalid argument)
[PARSE ERROR] SyntaxError: Expected [0-9] but "A" found.

the full command here

strace -f ./a.out |& b3  -s
{"syscall":"execve","args":["./a.out",["./a.out"],140724292233112,"..."],"result":0,"timing":null,"pid":null,"type":"SYSCALL"}
{"syscall":"brk","args":[],"result":32165888,"timing":null,"pid":null,"type":"SYSCALL"}
[PARSE ERROR] SyntaxError: Expected [0-9] but "A" found.

it seem odd, because the instruction look complete (maybe the comment in the first parameter is the reason).

More return value informations.

return numeric;

maybe in case of result equal -1 it might be possible to give the errno value

arch_prctl(0x3001 , 0x7ffe4887f480) = -1 EINVAL (Invalid argument)

in this case the result will be

{
   "syscall": "arch_prctl",
   "args": [
      12289,
      [],
      140730115290240
   ],
   "result": "-1 EINVAL (Invalid argument)1",
   "timing": null,
   "pid": null,
   "type": "SYSCALL"
}

maybe, result could be an object with the returned value.
something like

{
   "syscall": "arch_prctl",
   "args": [
      12289,
      [],
      140730115290240
   ],
   "result": {
      "value": -1,
      "errno": "EINVAL"
      "comment": "Invalid argument"
   },
   "timing": null,
   "pid": null,
   "type": "SYSCALL"
}

Dependencies

Is nexe really needed as a regular dependency?

Fails with additional timing information

Seems to fail to parse with timing information.

eg

This works.
strace -f cat

The following fail to produce any output.
strace -t -f cat
strace -tt -f cat
strace -ttt -f cat

Inconsistent datatype in args

may be link with #5
seem that if there is more than one element in an array ints are not parsed
(if there is only one int it is parsed)
here a strace of a program with a select

 > ./strace a.out
select(255, [0], [1 2], [0 1 2], {tv_sec=0, tv_usec=962357}) = 2 (out [1 2], left {tv_sec=0, tv_usec=962344})

which will produce

{
   "syscall": "select",
   "args": [
      255,
      [
         0
      ],
      [
         "1",
         "2"
      ],
      [
         "0",
         "1",
         "2"
      ],
      {
         "tv_sec": 0,
         "tv_usec": 962357
      }
   ],
   "result": "2 (out [1 2], left {tv_sec=0, tv_usec=962344})",
   "timing": null,
   "pid": null,
   "type": "SYSCALL"
}

if we look at the args array, the second parameter is an array of integer but the third parameter is an array of strings.

Thanks for this module it's really useful.

Inconsistant data type in "result"

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"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.