* jit.c (jit_reader_load_command): Interpret the jit reader name as an
absolute path if it begins with a forward slash.
This commit is contained in:
parent
db334a0164
commit
c9fb1240f2
4 changed files with 27 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-01-17 Sanjoy Das <sanjoy@playingwithpointers.com>
|
||||||
|
|
||||||
|
* jit.c (jit_reader_load_command): Interpret the jit reader name
|
||||||
|
as an absolute path if it begins with a forward slash.
|
||||||
|
|
||||||
2012-01-17 Sanjoy Das <sanjoy@playingwithpointers.com>
|
2012-01-17 Sanjoy Das <sanjoy@playingwithpointers.com>
|
||||||
|
|
||||||
PR gdb/14550
|
PR gdb/14550
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2012-01-17 Sanjoy Das <sanjoy@playingwithpointers.com>
|
||||||
|
* gdb.texinfo (Using JIT Debug Info Readers): Change documentation
|
||||||
|
to reflect that jit-reader-load now supports absolute file-names.
|
||||||
|
|
||||||
2013-01-16 Tom Tromey <tromey@redhat.com>
|
2013-01-16 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* gdb.texinfo (Set Catchpoints): Document "catch signal".
|
* gdb.texinfo (Set Catchpoints): Document "catch signal".
|
||||||
|
|
|
@ -33973,15 +33973,19 @@ Readers can be loaded and unloaded using the @code{jit-reader-load}
|
||||||
and @code{jit-reader-unload} commands.
|
and @code{jit-reader-unload} commands.
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item jit-reader-load @var{reader-name}
|
@item jit-reader-load @var{reader}
|
||||||
Load the JIT reader named @var{reader-name}. On a UNIX system, this
|
Load the JIT reader named @var{reader}. @var{reader} is a shared
|
||||||
will usually load @file{@var{libdir}/gdb/@var{reader-name}}, where
|
object specified as either an absolute or a relative file name. In
|
||||||
@var{libdir} is the system library directory, usually
|
the latter case, @value{GDBN} will try to load the reader from a
|
||||||
@file{/usr/local/lib}. Only one reader can be active at a time;
|
pre-configured directory, usually @file{@var{libdir}/gdb/} on a UNIX
|
||||||
trying to load a second reader when one is already loaded will result
|
system (here @var{libdir} is the system library directory, often
|
||||||
in @value{GDBN} reporting an error. A new JIT reader can be loaded by
|
@file{/usr/local/lib}).
|
||||||
first unloading the current one using @code{jit-reader-load} and then
|
|
||||||
invoking @code{jit-reader-load}.
|
Only one reader can be active at a time; trying to load a second
|
||||||
|
reader when one is already loaded will result in @value{GDBN}
|
||||||
|
reporting an error. A new JIT reader can be loaded by first unloading
|
||||||
|
the current one using @code{jit-reader-unload} and then invoking
|
||||||
|
@code{jit-reader-load}.
|
||||||
|
|
||||||
@item jit-reader-unload
|
@item jit-reader-unload
|
||||||
Unload the currently loaded JIT reader.
|
Unload the currently loaded JIT reader.
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "breakpoint.h"
|
#include "breakpoint.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "dictionary.h"
|
#include "dictionary.h"
|
||||||
|
#include "filenames.h"
|
||||||
#include "frame-unwind.h"
|
#include "frame-unwind.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
@ -208,7 +209,10 @@ jit_reader_load_command (char *args, int from_tty)
|
||||||
if (loaded_jit_reader != NULL)
|
if (loaded_jit_reader != NULL)
|
||||||
error (_("JIT reader already loaded. Run jit-reader-unload first."));
|
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);
|
prev_cleanup = make_cleanup (xfree, so_name);
|
||||||
|
|
||||||
loaded_jit_reader = jit_reader_load (so_name);
|
loaded_jit_reader = jit_reader_load (so_name);
|
||||||
|
|
Loading…
Reference in a new issue