projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial implementation of the debuginfo API
[babeltrace.git]
/
formats
/
ctf
/
ctf.c
diff --git
a/formats/ctf/ctf.c
b/formats/ctf/ctf.c
index 4dcec9032e413d10565beb64abad5993fdbade2f..8e9670982d994ff5860ab747594c869d3fa41e92 100644
(file)
--- a/
formats/ctf/ctf.c
+++ b/
formats/ctf/ctf.c
@@
-35,6
+35,7
@@
#include <babeltrace/context-internal.h>
#include <babeltrace/compat/uuid.h>
#include <babeltrace/endian.h>
#include <babeltrace/context-internal.h>
#include <babeltrace/compat/uuid.h>
#include <babeltrace/endian.h>
+#include <babeltrace/trace-debuginfo.h>
#include <babeltrace/ctf/ctf-index.h>
#include <inttypes.h>
#include <stdio.h>
#include <babeltrace/ctf/ctf-index.h>
#include <inttypes.h>
#include <stdio.h>
@@
-84,6
+85,7
@@
uint64_t opt_clock_offset;
uint64_t opt_clock_offset_ns;
extern int yydebug;
uint64_t opt_clock_offset_ns;
extern int yydebug;
+char *opt_debug_dir;
/*
* TODO: babeltrace_ctf_console_output ensures that we only print
/*
* TODO: babeltrace_ctf_console_output ensures that we only print
@@
-2353,8
+2355,14
@@
struct bt_trace_descriptor *ctf_open_trace(const char *path, int flags,
goto error;
}
goto error;
}
+ ret = trace_debug_info_create(td);
+ if (ret) {
+ goto error;
+ }
+
return &td->parent;
error:
return &td->parent;
error:
+ trace_debug_info_destroy(td);
g_free(td);
return NULL;
}
g_free(td);
return NULL;
}
@@
-2523,6
+2531,11
@@
struct bt_trace_descriptor *ctf_open_mmap_trace(
if (ret)
goto error_free;
if (ret)
goto error_free;
+ ret = trace_debug_info_create(td);
+ if (ret) {
+ goto error_free;
+ }
+
return &td->parent;
error_free:
return &td->parent;
error_free:
@@
-2674,6
+2687,7
@@
int ctf_close_trace(struct bt_trace_descriptor *tdp)
}
}
free(td->metadata_string);
}
}
free(td->metadata_string);
+ trace_debug_info_destroy(td);
g_free(td);
return 0;
}
g_free(td);
return 0;
}
This page took
0.025077 seconds
and
4
git commands to generate.