This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix JIT reader path creation
- From: Sasha Smundak <asmundak at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 18 Dec 2013 13:12:19 -0800 (PST)
- Subject: [PATCH] Fix JIT reader path creation
- Authentication-results: sourceware.org; auth=none
Unless the argument of the `jit-reader-load' command is an absolute path, the
JIT reader should be loaded from <jit_reader_dir>/<arg> (the code currently
tries to load it from /<jit_reader_dir> <arg> instead).
Sasha
gdb/Changelog
2013-12-18 Sasha Smundak <asmundak@google.com>
* jit.c: (jit_reader_load_command): Fix JIT reader path creation.
diff --git a/gdb/jit.c b/gdb/jit.c
index fde79e5..d216b8a 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -214,7 +214,7 @@ jit_reader_load_command (char *args, int from_tty)
if (IS_ABSOLUTE_PATH (args))
so_name = xstrdup (args);
else
- so_name = xstrprintf ("%s%s%s", SLASH_STRING, jit_reader_dir, args);
+ so_name = xstrprintf ("%s%s%s", jit_reader_dir, SLASH_STRING, args);
prev_cleanup = make_cleanup (xfree, so_name);
loaded_jit_reader = jit_reader_load (so_name);