840c0b18e9990fe15416283f869bc8532c1bbf3a
Stefan Schuermans add copyright headers and l...

Stefan Schuermans authored 4 years ago

libuptev/src/event.c   1) /**
libuptev/src/event.c   2)  * UProcTrace: User-space Process Tracing
libuptev/src/event.c   3)  * Copyright 2020: Stefan Schuermans, Aachen, Germany <stefan@schuermans.info>
libuptev/src/event.c   4)  * Copyleft: GNU LESSER GENERAL PUBLIC LICENSE version 3 (see LICENSE)
libuptev/src/event.c   5)  */
libuptev/src/event.c   6) 
Stefan Schuermans split event and proc_begin

Stefan Schuermans authored 4 years ago

liblwpttr/src/event.c  7) #include "event.h"
Stefan Schuermans add exe and cwd to proc_begin

Stefan Schuermans authored 4 years ago

liblwpttr/src/event.c  8) #include "cleaner.h"
Stefan Schuermans first incomplete begin_proc...

Stefan Schuermans authored 4 years ago

liblwpttr/src/event.c  9) 
Stefan Schuermans rename: lwproctrace -> upro...

Stefan Schuermans authored 4 years ago

libuptev/src/event.c  10) #include <uproctrace.pb-c.h>
Stefan Schuermans first incomplete begin_proc...

Stefan Schuermans authored 4 years ago

liblwpttr/src/event.c 11) 
liblwpttr/src/event.c 12) #include <stdlib.h>
liblwpttr/src/event.c 13) 
Stefan Schuermans split event and proc_begin

Stefan Schuermans authored 4 years ago

liblwpttr/src/event.c 14) /**
liblwpttr/src/event.c 15)  * @brief pack event to a buffer
liblwpttr/src/event.c 16)  * @param[in] event the event to pack to a buffer
liblwpttr/src/event.c 17)  * @param[out] *data pointer to event data (malloc-ed)
liblwpttr/src/event.c 18)  * @param[out] *size size of data
liblwpttr/src/event.c 19)  * @param[in] cleaner cleaned up after building data buffer (also on error)
liblwpttr/src/event.c 20)  * @return 0 on success (*data, *size set),
liblwpttr/src/event.c 21)  *         -1 on error (*data = NULL, *size = 0)
liblwpttr/src/event.c 22)  */
Stefan Schuermans formatting

Stefan Schuermans authored 4 years ago

libuptev/src/event.c  23) int uptev_event_pack(struct _Uproctrace__Event *event, void **data,
libuptev/src/event.c  24)                      size_t *size, uptev_cleaner_t *cleaner) {
Stefan Schuermans rename: lwproctrace -> upro...

Stefan Schuermans authored 4 years ago

libuptev/src/event.c  25)   *size = uproctrace__event__get_packed_size(event);
Stefan Schuermans add exe and cwd to proc_begin

Stefan Schuermans authored 4 years ago

liblwpttr/src/event.c 26)   *data = malloc(*size);
Stefan Schuermans formatting

Stefan Schuermans authored 4 years ago

libuptev/src/event.c  27)   if (!data) {
Stefan Schuermans rename: lwproctrace -> upro...

Stefan Schuermans authored 4 years ago

libuptev/src/event.c  28)     uptev_cleaner_cleanup(cleaner);
Stefan Schuermans add exe and cwd to proc_begin

Stefan Schuermans authored 4 years ago

liblwpttr/src/event.c 29)     *size = 0;
liblwpttr/src/event.c 30)     return -1;
liblwpttr/src/event.c 31)   }
Stefan Schuermans rename: lwproctrace -> upro...

Stefan Schuermans authored 4 years ago

libuptev/src/event.c  32)   *size = uproctrace__event__pack(event, *data);
libuptev/src/event.c  33)   uptev_cleaner_cleanup(cleaner);