diff options
author | Sanjoy Das <sanjoyd@sourceware.org> | 2013-01-17 14:17:16 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoyd@sourceware.org> | 2013-01-17 14:17:16 +0000 |
commit | c9fb1240f2fce4fe8808181dcd961dfc45008087 (patch) | |
tree | be2f43dc3b494dac69b080a8d7c68ede3b2efac2 /gdb/jit.c | |
parent | db334a01640a2f0e927e824d0d9f5d83d18d942d (diff) | |
download | gdb-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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); |