+/*
+enum bt_cb_ret handle_statedump_file_descriptor(struct bt_ctf_event *call_data,
+ void *private_data)
+{
+ struct definition *scope;
+ struct files *file;
+ unsigned long timestamp;
+ int64_t tid;
+ struct processtop *tmp;
+ char *comm, *file_name;
+ int fd;
+
+ timestamp = bt_ctf_get_timestamp(call_data);
+ if (timestamp == -1ULL)
+ goto error;
+
+ comm = get_context_comm(call_data);
+
+ scope = bt_ctf_get_top_level_scope(call_data,
+ BT_EVENT_FIELDS);
+ tid = bt_ctf_get_uint64(bt_ctf_get_field(call_data,
+ scope, "_tid"));
+ if (bt_ctf_field_get_error()) {
+ fprintf(stderr, "Missing tid context info\n");
+ goto error;
+ }
+
+ scope = bt_ctf_get_top_level_scope(call_data,
+ BT_EVENT_FIELDS);
+ fd = bt_ctf_get_uint64(bt_ctf_get_field(call_data,
+ scope, "_fd"));
+ if (bt_ctf_field_get_error()) {
+ fprintf(stderr, "Missing fd context info\n");
+ goto error;
+ }
+
+ scope = bt_ctf_get_top_level_scope(call_data,
+ BT_EVENT_FIELDS);
+ file_name = bt_ctf_get_string(bt_ctf_get_field(call_data,
+ scope, "_filename"));
+ if (bt_ctf_field_get_error()) {
+ fprintf(stderr, "Missing file name context info\n");
+ goto error;
+ }
+
+ file = g_new0(struct files, 1);
+ file->name = strdup(file_name);
+ file->fd = fd;
+ tmp = find_process_tid(<tngtop, tid, comm);
+ edit_file(tmp, file, fd);
+
+ fprintf(stderr, "%lu %s\n", tmp->tid, file_name);
+
+ return BT_CB_OK;
+
+error:
+ return BT_CB_ERROR_STOP;
+}
+*/