driver/ppm_events_public: change ppm_param_info.symbols in info.

Change ppm_name_value* symbols in void* info, so that we can store
extra informations for parameters which can have multiple
meanings/types depending on some other parameters.
driver: add PPME_SYSCALL_PTRACE_*
driver: handle request parameter of ptrace syscall
driver/ppm_fillers: add simple ptrace_x filler
start converting ptrace "addr" param to PT_DYN
driver: prepare fillers and val_to_ring to accept dyn_idx

TODO: implement PT_DYN type
implement PT_DYN in both driver and userspace
implement ptrace filler and parse some requests
driver/ppm_fillers: refactor ptrace_x filler
userspace/libsinsp/event: fix error when handling PT_DYN params
Merge branch 'master' into ptrace_filler2

Conflicts:
	userspace/libsinsp/event.cpp
Implements #22 JSON output

Introduces a JSON root in every tostring call of
sinsp_evt_formatter regardless.  This may be better to break into
separate calls for the really paranoid.

Otherwise, it derives the key name from the field_info of the token
and then assigns the str value as returned by tostring.

When its done with one round it uses the JSON Fastwriter to return
the std::string back...

The third party JSON-CPP library had one line changed: The fastwriter
part of it would output a newline for us. This was already being handled
and would produce two new lines.  So I removed that from the library.

JSON is a finished standard and I don't expect many "upgrades" to the
library so I think this is a change we can live with.
Changing how newlines are handled

This commit perserves the newline system of the JSON CPP fast-writer
as requested in
https://github.com/draios/sysdig/pull/138#issuecomment-41636808
by instead truncating the last character which we know is going to
be a newline.
Add mechanism for user space injected events

This adds a new sysdig device file which allows writting user specified
data into the event stream. Data is written to /dev/sysdig-events and
can be filtered via evt.type=user.

Signed-off-by: Chuck Tuffli <chuck@tuffli.net>
different attempt at user events: just capture them as file writes and delegate the interpretation to the successive layers
Outputs JSON capture objects in a large array

This code introduces an m_first bool to the eventformatter that
represents if its the first tostring call. This is used in order to
emit a '[' or a ',' for a start of an array, or the array delimeter,
respectively.

Also, sinsp_evt_formatter::on_capture_end is introduced, which, for
JSON will emit the trailing ']' representing the end of an array.

This means that an extra clause was put into the g_terminate conditional
inside of do_inspect which will do the on_capture_end of the inspector,
thus emitting the trailing ']'.

Additionally, the JSON::Value and JSON::FastWriter have been moved
to the class scope.
Merge pull request #1 from ldegio/user-event

different attempt at user events: just capture them as file writes and d...
Merge branch 'master' into user-event
Implements #22 JSON output

Introduces a JSON root in every tostring call of
sinsp_evt_formatter regardless.  This may be better to break into
separate calls for the really paranoid.

Otherwise, it derives the key name from the field_info of the token
and then assigns the str value as returned by tostring.

When its done with one round it uses the JSON Fastwriter to return
the std::string back...

The third party JSON-CPP library had one line changed: The fastwriter
part of it would output a newline for us. This was already being handled
and would produce two new lines.  So I removed that from the library.

JSON is a finished standard and I don't expect many "upgrades" to the
library so I think this is a change we can live with.
Changing how newlines are handled

This commit perserves the newline system of the JSON CPP fast-writer
as requested in
https://github.com/draios/sysdig/pull/138#issuecomment-41636808
by instead truncating the last character which we know is going to
be a newline.