From 3be1e3c98864ad12cab2e53c42db5252193367f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 15 Apr 2016 13:18:37 -0400 Subject: [PATCH] Rename opt_debug_dir to opt_debug_info_dir MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- converter/babeltrace.c | 12 ++++++------ formats/ctf/ctf.c | 2 +- include/babeltrace/babeltrace-internal.h | 2 +- lib/so-info.c | 4 ++-- tests/lib/test_so_info.c | 12 ++++++------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/converter/babeltrace.c b/converter/babeltrace.c index f437f4f4..2718a461 100644 --- a/converter/babeltrace.c +++ b/converter/babeltrace.c @@ -105,7 +105,7 @@ enum { OPT_CLOCK_GMT, OPT_CLOCK_FORCE_CORRELATE, OPT_STREAM_INTERSECTION, - OPT_DEBUG_DIR, + OPT_DEBUG_INFO_DIR, }; /* @@ -137,7 +137,7 @@ static struct poptOption long_options[] = { { "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 }, }; @@ -411,9 +411,9 @@ static int parse_options(int argc, char **argv) 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; } @@ -837,7 +837,7 @@ end: free(opt_input_format); free(opt_output_format); free(opt_output_path); - free(opt_debug_dir); + free(opt_debug_info_dir); g_ptr_array_free(opt_input_paths, TRUE); if (partial_error) exit(EXIT_FAILURE); diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 8e967098..7235d806 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -85,7 +85,7 @@ uint64_t opt_clock_offset; uint64_t opt_clock_offset_ns; extern int yydebug; -char *opt_debug_dir; +char *opt_debug_info_dir; /* * TODO: babeltrace_ctf_console_output ensures that we only print diff --git a/include/babeltrace/babeltrace-internal.h b/include/babeltrace/babeltrace-internal.h index abe1a7f0..9d252c8e 100644 --- a/include/babeltrace/babeltrace-internal.h +++ b/include/babeltrace/babeltrace-internal.h @@ -196,6 +196,6 @@ extern int opt_all_field_names, 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; #endif diff --git a/lib/so-info.c b/lib/so-info.c index f1124b34..404425dc 100644 --- a/lib/so-info.c +++ b/lib/so-info.c @@ -289,7 +289,7 @@ int so_info_set_dwarf_info_build_id(struct so_info *so) goto error; } - 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] == '/'; @@ -404,7 +404,7 @@ int so_info_set_dwarf_info_debug_link(struct so_info *so) goto error; } - 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) { diff --git a/tests/lib/test_so_info.c b/tests/lib/test_so_info.c index db4f239e..3738cb43 100644 --- a/tests/lib/test_so_info.c +++ b/tests/lib/test_so_info.c @@ -45,7 +45,7 @@ #define FUNC_FOO_NAME_ELF "foo+0x24" #define BUILD_ID_LEN 20 -char *opt_debug_dir; +char *opt_debug_info_dir; static void test_so_info_build_id(const char *data_dir) @@ -249,16 +249,16 @@ int main(int argc, char **argv) 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"); - 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); return EXIT_SUCCESS; } -- 2.34.1