aboutsummaryrefslogtreecommitdiff
path: root/gdb/jit.c
diff options
context:
space:
mode:
authorSanjoy Das <sanjoyd@sourceware.org>2013-01-17 14:17:16 +0000
committerSanjoy Das <sanjoyd@sourceware.org>2013-01-17 14:17:16 +0000
commitc9fb1240f2fce4fe8808181dcd961dfc45008087 (patch)
treebe2f43dc3b494dac69b080a8d7c68ede3b2efac2 /gdb/jit.c
parentdb334a01640a2f0e927e824d0d9f5d83d18d942d (diff)
downloadgdb-c9fb1240f2fce4fe8808181dcd961dfc45008087.zip
gdb-c9fb1240f2fce4fe8808181dcd961dfc45008087.tar.gz
gdb-c9fb1240f2fce4fe8808181dcd961dfc45008087.tar.bz2
* jit.c (jit_reader_load_command): Interpret the jit reader name as an
absolute path if it begins with a forward slash.
Diffstat (limited to 'gdb/jit.c')
-rw-r--r--gdb/jit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/jit.c b/gdb/jit.c
index f542f9e..4623f15 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -25,6 +25,7 @@
#include "breakpoint.h"
#include "command.h"
#include "dictionary.h"
+#include "filenames.h"
#include "frame-unwind.h"
#include "gdbcmd.h"
#include "gdbcore.h"
@@ -208,7 +209,10 @@ jit_reader_load_command (char *args, int from_tty)
if (loaded_jit_reader != NULL)
error (_("JIT reader already loaded. Run jit-reader-unload first."));
- so_name = xstrprintf ("%s/%s", jit_reader_dir, args);
+ if (IS_ABSOLUTE_PATH (args))
+ so_name = xstrdup (args);
+ else
+ so_name = xstrprintf ("%s%s%s", SLASH_STRING, jit_reader_dir, args);
prev_cleanup = make_cleanup (xfree, so_name);
loaded_jit_reader = jit_reader_load (so_name);