mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 00:59:15 +08:00

* guile/guile-internal.h (gdbscm_guile_major_version): Declare. (gdbscm_guile_minor_version, gdbscm_guile_micro_version): Declare. (gdbscm_guile_version_is_at_least): Declare. (gdbscm_scm_string_to_int): Declare. * guile/guile.c (gdbscm_guile_major_version): New global. (gdbscm_guile_minor_version, gdbscm_guile_micro_version): New globals. (guile_datadir): New static global. (gdbscm_guile_data_directory): New function. (initialize_scheme_side): Update. (misc_guile_functions): Add guile-data-directory. (initialize_gdb_module): Fetch guile version number. * guile/lib/gdb.scm: Remove call to add-to-load-path. * guile/lib/gdb/init.scm (%initialize!): Ditto. * guile/lib/gdb/boot.scm: Use guile-data-directory. * guile/scm-exception.c (gdbscm_print_exception_with_stack): Fix comments. * guile/scm-string.c (gdbscm_scm_string_to_int): New function. * guile/scm-utils.c (gdbscm_guile_version_is_at_least): New function. * guile/scm-value.c (gdbscm_value_to_string): Only call scm_port_conversion_strategy if Guile version >= 2.0.6. doc/ * guile.texi (Guile Configuration): Document guile-data-directory.
31 lines
1.2 KiB
Scheme
31 lines
1.2 KiB
Scheme
;; Bootstrap the Scheme side of the gdb module.
|
|
;;
|
|
;; Copyright (C) 2014 Free Software Foundation, Inc.
|
|
;;
|
|
;; This file is part of GDB.
|
|
;;
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
;; it under the terms of the GNU General Public License as published by
|
|
;; the Free Software Foundation; either version 3 of the License, or
|
|
;; (at your option) any later version.
|
|
;;
|
|
;; This program is distributed in the hope that it will be useful,
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;; GNU General Public License for more details.
|
|
;;
|
|
;; You should have received a copy of the GNU General Public License
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
;; This file is loaded with scm_c_primitive_load, which is ok, but files
|
|
;; loaded with it are not compiled. So we do very little here, and do
|
|
;; most of the initialization elsewhere.
|
|
|
|
;; guile-data-directory is provided by the C code.
|
|
(add-to-load-path (guile-data-directory))
|
|
(load-from-path "gdb.scm")
|
|
|
|
;; Now that the Scheme side support is loaded, initialize it.
|
|
(let ((init-proc (@@ (gdb init) %initialize!)))
|
|
(init-proc))
|