Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
OPT_CLOCK_GMT,
OPT_CLOCK_FORCE_CORRELATE,
OPT_STREAM_INTERSECTION,
OPT_CLOCK_GMT,
OPT_CLOCK_FORCE_CORRELATE,
OPT_STREAM_INTERSECTION,
{ "clock-force-correlate", 0, POPT_ARG_NONE, NULL, OPT_CLOCK_FORCE_CORRELATE, NULL, NULL },
{ "stream-intersection", 0, POPT_ARG_NONE, NULL, OPT_STREAM_INTERSECTION, NULL, NULL },
#ifdef ENABLE_DEBUGINFO
{ "clock-force-correlate", 0, POPT_ARG_NONE, NULL, OPT_CLOCK_FORCE_CORRELATE, NULL, NULL },
{ "stream-intersection", 0, POPT_ARG_NONE, NULL, OPT_STREAM_INTERSECTION, NULL, NULL },
#ifdef ENABLE_DEBUGINFO
- { "debug-info-dir", 0, POPT_ARG_STRING, NULL, OPT_DEBUG_DIR, NULL, NULL },
+ { "debug-info-dir", 0, POPT_ARG_STRING, NULL, OPT_DEBUG_INFO_DIR, NULL, NULL },
#endif
{ NULL, 0, 0, NULL, 0, NULL, NULL },
};
#endif
{ NULL, 0, 0, NULL, 0, NULL, NULL },
};
case OPT_STREAM_INTERSECTION:
opt_stream_intersection = 1;
break;
case OPT_STREAM_INTERSECTION:
opt_stream_intersection = 1;
break;
- case OPT_DEBUG_DIR:
- opt_debug_dir = (char *) poptGetOptArg(pc);
- if (!opt_debug_dir) {
+ case OPT_DEBUG_INFO_DIR:
+ opt_debug_info_dir = (char *) poptGetOptArg(pc);
+ if (!opt_debug_info_dir) {
ret = -EINVAL;
goto end;
}
ret = -EINVAL;
goto end;
}
free(opt_input_format);
free(opt_output_format);
free(opt_output_path);
free(opt_input_format);
free(opt_output_format);
free(opt_output_path);
+ free(opt_debug_info_dir);
g_ptr_array_free(opt_input_paths, TRUE);
if (partial_error)
exit(EXIT_FAILURE);
g_ptr_array_free(opt_input_paths, TRUE);
if (partial_error)
exit(EXIT_FAILURE);
uint64_t opt_clock_offset_ns;
extern int yydebug;
uint64_t opt_clock_offset_ns;
extern int yydebug;
+char *opt_debug_info_dir;
/*
* TODO: babeltrace_ctf_console_output ensures that we only print
/*
* TODO: babeltrace_ctf_console_output ensures that we only print
extern uint64_t opt_clock_offset;
extern uint64_t opt_clock_offset_ns;
extern int babeltrace_ctf_console_output;
extern uint64_t opt_clock_offset;
extern uint64_t opt_clock_offset_ns;
extern int babeltrace_ctf_console_output;
-extern char *opt_debug_dir;
+extern char *opt_debug_info_dir;
- dbg_dir = opt_debug_dir ? : DEFAULT_DEBUG_DIR;
+ dbg_dir = opt_debug_info_dir ? : DEFAULT_DEBUG_DIR;
dbg_dir_trailing_slash = dbg_dir[strlen(dbg_dir) - 1] == '/';
dbg_dir_trailing_slash = dbg_dir[strlen(dbg_dir) - 1] == '/';
- dbg_dir = opt_debug_dir ? : DEFAULT_DEBUG_DIR;
+ dbg_dir = opt_debug_info_dir ? : DEFAULT_DEBUG_DIR;
dir_name = dirname(so->elf_path);
if (!dir_name) {
dir_name = dirname(so->elf_path);
if (!dir_name) {
#define FUNC_FOO_NAME_ELF "foo+0x24"
#define BUILD_ID_LEN 20
#define FUNC_FOO_NAME_ELF "foo+0x24"
#define BUILD_ID_LEN 20
+char *opt_debug_info_dir;
static
void test_so_info_build_id(const char *data_dir)
static
void test_so_info_build_id(const char *data_dir)
if (argc != 2) {
return EXIT_FAILURE;
} else {
if (argc != 2) {
return EXIT_FAILURE;
} else {
- opt_debug_dir = argv[1];
+ opt_debug_info_dir = argv[1];
}
ret = so_info_init();
ok(ret == 0, "so_info_init succesful");
}
ret = so_info_init();
ok(ret == 0, "so_info_init succesful");
- test_so_info(opt_debug_dir);
- test_so_info_elf(opt_debug_dir);
- test_so_info_build_id(opt_debug_dir);
- test_so_info_debug_link(opt_debug_dir);
+ test_so_info(opt_debug_info_dir);
+ test_so_info_elf(opt_debug_info_dir);
+ test_so_info_build_id(opt_debug_info_dir);
+ test_so_info_debug_link(opt_debug_info_dir);