summaryrefslogtreecommitdiff
path: root/gdb/jit.c
diff options
context:
space:
mode:
authorsanjoyd <sanjoyd>2013-01-17 14:17:14 +0000
committersanjoyd <sanjoyd>2013-01-17 14:17:14 +0000
commitf56da446eb6eeb37ef959367cd9205ebf5fff80e (patch)
tree57da1f5874e0d8c8f50842af32df5ef165362b06 /gdb/jit.c
parentb41ba489533d5a2d89369be9ac1002c53f503eef (diff)
downloadgdb-f56da446eb6eeb37ef959367cd9205ebf5fff80e.tar.gz
* 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 f542f9ebdf9..4623f15f1d4 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);