* New commands
+show jit-reader-directory
+ Show the name of the directory that "jit-reader-load" uses for
+ relative file names.
+
set style line-number foreground COLOR
set style line-number background COLOR
set style line-number intensity VALUE
#include "filenames.h"
#include "frame-unwind.h"
#include "cli/cli-cmds.h"
+#include "cli/cli-style.h"
#include "gdbcore.h"
#include "inferior.h"
#include "observable.h"
}
}
+/* Implementation of "show jit-reader-directory". */
+
+static void
+show_jit_reader_directory (const char *args, int from_tty)
+{
+ gdb_printf (_("JIT reader directory is %ps.\n"),
+ styled_string (file_name_style.style (),
+ jit_reader_dir.c_str ()));
+}
+
void _initialize_jit ();
void
_initialize_jit ()
Load FILE as debug info reader and unwinder for JIT compiled code.\n\
Usage: jit-reader-load FILE\n\
Try to load file FILE as a debug info reader (and unwinder) for\n\
-JIT compiled code. The file is loaded from " JIT_READER_DIR ",\n\
-relocated relative to the GDB executable if required."));
+JIT compiled code. If FILE is not an absolute file name, it is found\n\
+relative to a built-in directory. See \"show jit-reader-directory\"."));
set_cmd_completer (c, deprecated_filename_completer);
c = add_com ("jit-reader-unload", no_class,
Usage: jit-reader-unload\n\n\
Do \"help jit-reader-load\" for info on loading debug info readers."));
set_cmd_completer (c, noop_completer);
+
+ add_cmd ("jit-reader-directory", class_obscure,
+ show_jit_reader_directory,
+ _("Show the JIT reader directory.\n\
+This is the directory used by \"jit-reader-load\" when given\n\
+a relative file name."), &showlist);
}
}
gdb_test_no_output "set debug jit 1"
}
+ # Just test that this is installed and prints something.
+ gdb_test "show jit-reader-directory" \
+ "JIT reader directory is .*\\."
+
gdb_test_no_output "jit-reader-load ${jit_reader_bin}" "jit-reader-load"
gdb_run_cmd
gdb_test "" "Program received signal SIGTRAP, .*" "expect SIGTRAP"