From: "Ludovic Courtès" <ludo@gnu.org>
To: gdb-patches@sourceware.org
Cc: "Doug Evans" <xdje42@gmail.com>, "Ludovic Courtès" <ludo@gnu.org>
Subject: [PATCH v2 2/2] guile: Add support for Guile 3.0.
Date: Mon, 15 Jun 2020 17:14:53 +0200 [thread overview]
Message-ID: <20200615151453.795-3-ludo@gnu.org> (raw)
In-Reply-To: <20200615151453.795-1-ludo@gnu.org>
gdb/ChangeLog
2020-06-15 Ludovic Courtès <ludo@gnu.org>
* guile/scm-math.c (vlscm_integer_fits_p): Use 'uintmax_t'
and 'intmax_t' instead of 'scm_t_uintmax' and 'scm_t_intmax',
which are deprecated in Guile 3.0.
* testsuite/gdb.guile/source2.scm: Add #f first argument to
'format'.
* testsuite/gdb.guile/types-module.exp: Remove "ERROR:" from
regexps since Guile 3.0 no longer prints that.
* configure.ac (try_guile_versions): Add "guile-3.0".
* configure (try_guile_versions): Regenerate.
* NEWS: Update entry.
gdb/doc/ChangeLog
2020-06-15 Ludovic Courtès <ludo@gnu.org>
* doc/guile.texi (Guile Introduction): Mention Guile 3.0.
---
gdb/NEWS | 2 +-
gdb/configure | 2 +-
gdb/configure.ac | 2 +-
gdb/doc/guile.texi | 2 +-
gdb/guile/scm-math.c | 4 ++--
gdb/testsuite/gdb.guile/source2.scm | 2 +-
gdb/testsuite/gdb.guile/types-module.exp | 6 +++---
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/gdb/NEWS b/gdb/NEWS
index d8a9de4179..23705e1c65 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -85,7 +85,7 @@ GNU/Linux/RISC-V (gdbserver) riscv*-*-linux*
* Guile API
- ** GDB can now be built with GNU Guile 2.2 in addition to 2.0.
+ ** GDB can now be built with GNU Guile 3.0 and 2.2 in addition to 2.0.
** Procedures 'memory-port-read-buffer-size',
'set-memory-port-read-buffer-size!', 'memory-port-write-buffer-size',
diff --git a/gdb/configure b/gdb/configure
index bd12695291..5ad1e53ac4 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -10954,7 +10954,7 @@ fi
-try_guile_versions="guile-2.2 guile-2.0"
+try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
have_libguile=no
case "${with_guile}" in
no)
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 87afc26581..d8cef1e914 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1088,7 +1088,7 @@ AC_MSG_RESULT([$with_guile])
dnl We check guile with pkg-config.
AC_PATH_PROG(pkg_config_prog_path, pkg-config, missing)
-try_guile_versions="guile-2.2 guile-2.0"
+try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
have_libguile=no
case "${with_guile}" in
no)
diff --git a/gdb/doc/guile.texi b/gdb/doc/guile.texi
index 0e6c74ef8b..45c8f3f197 100644
--- a/gdb/doc/guile.texi
+++ b/gdb/doc/guile.texi
@@ -38,7 +38,7 @@ Guile support in @value{GDBN} follows the Python support in @value{GDBN}
reasonably closely, so concepts there should carry over.
However, some things are done differently where it makes sense.
-@value{GDBN} requires Guile version 2.2 or 2.0.
+@value{GDBN} requires Guile version 3.0, 2.2, or 2.0.
@cindex guile scripts directory
Guile scripts used by @value{GDBN} should be installed in
diff --git a/gdb/guile/scm-math.c b/gdb/guile/scm-math.c
index 7c63fa2ae0..419f5099bf 100644
--- a/gdb/guile/scm-math.c
+++ b/gdb/guile/scm-math.c
@@ -578,7 +578,7 @@ vlscm_integer_fits_p (SCM obj, struct type *type)
ULONGEST max;
/* If scm_is_unsigned_integer can't work with this type, just punt. */
- if (TYPE_LENGTH (type) > sizeof (scm_t_uintmax))
+ if (TYPE_LENGTH (type) > sizeof (uintmax_t))
return 0;
get_unsigned_type_max (type, &max);
return scm_is_unsigned_integer (obj, 0, max);
@@ -588,7 +588,7 @@ vlscm_integer_fits_p (SCM obj, struct type *type)
LONGEST min, max;
/* If scm_is_signed_integer can't work with this type, just punt. */
- if (TYPE_LENGTH (type) > sizeof (scm_t_intmax))
+ if (TYPE_LENGTH (type) > sizeof (intmax_t))
return 0;
get_signed_type_minmax (type, &min, &max);
return scm_is_signed_integer (obj, min, max);
diff --git a/gdb/testsuite/gdb.guile/source2.scm b/gdb/testsuite/gdb.guile/source2.scm
index 39638053d9..c39f03801a 100644
--- a/gdb/testsuite/gdb.guile/source2.scm
+++ b/gdb/testsuite/gdb.guile/source2.scm
@@ -15,5 +15,5 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-(display (format "y~As" "e"))
+(display (format #f "y~As" "e"))
(newline)
diff --git a/gdb/testsuite/gdb.guile/types-module.exp b/gdb/testsuite/gdb.guile/types-module.exp
index 5a631dca8e..8ced6fbffb 100644
--- a/gdb/testsuite/gdb.guile/types-module.exp
+++ b/gdb/testsuite/gdb.guile/types-module.exp
@@ -44,7 +44,7 @@ gdb_test "guile (print (type-has-field-deep? d \"base_member\"))" \
"= #t" "type-has-field-deep? member in baseclass"
gdb_test "guile (print (type-has-field-deep? (lookup-type \"int\") \"base_member\"))" \
- "ERROR: .*Wrong type argument in position 1 \\(expecting struct or union\\): #<gdb:type int>.*" \
+ "Wrong type argument in position 1 \\(expecting struct or union\\): #<gdb:type int>.*" \
"type-has-field-deep? from int"
gdb_scm_test_silent_cmd "guile (define enum-htab (make-enum-hashtable (lookup-type \"enum_type\")))" \
@@ -54,9 +54,9 @@ gdb_test "guile (print (hash-ref enum-htab \"B\"))" \
"= 1" "verify make-enum-hashtable"
gdb_test "guile (define bad-enum-htab (make-enum-hashtable #f))" \
- "ERROR: .*Wrong type argument in position 1 \\(expecting gdb:type\\): #f.*" \
+ "Wrong type argument in position 1 \\(expecting gdb:type\\): #f.*" \
"make-enum-hashtable from #f"
gdb_test "guile (define bad-enum-htab (make-enum-hashtable (lookup-type \"int\")))" \
- "ERROR: .*Wrong type argument in position 1 \\(expecting enum\\): #<gdb:type int>.*" \
+ "Wrong type argument in position 1 \\(expecting enum\\): #<gdb:type int>.*" \
"make-enum-hashtable from int"
--
2.26.2
next prev parent reply other threads:[~2020-06-15 15:15 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 13:27 [PATCH 0/2] Add support for Guile 3.0 and 2.2 Ludovic Courtès
2020-06-12 13:27 ` [PATCH 1/2] guile: Add support for Guile 2.2 Ludovic Courtès
2020-06-12 13:50 ` Eli Zaretskii
2020-06-12 14:04 ` Ludovic Courtès
2020-06-13 6:44 ` Eli Zaretskii
2020-06-13 15:04 ` Ludovic Courtès
2020-06-15 15:14 ` [PATCH v2 0/2] Add support for Guile 3.0 and 2.2 Ludovic Courtès
2020-06-15 15:14 ` [PATCH v2 1/2] guile: Add support for Guile 2.2 Ludovic Courtès
2020-06-15 17:00 ` Eli Zaretskii
2020-06-18 20:31 ` Tom Tromey
2020-06-19 6:08 ` Eli Zaretskii
2020-06-19 7:37 ` Ludovic Courtès
2020-06-26 8:13 ` [PATCH v3 0/2] Add support for Guile 3.0 and 2.2 Ludovic Courtès
2020-06-26 8:13 ` [PATCH v3 1/2] guile: Add support for Guile 2.2 Ludovic Courtès
2020-06-26 10:23 ` Eli Zaretskii
2020-06-28 14:20 ` Ludovic Courtès
2020-06-28 14:25 ` [PATCH v4 " Ludovic Courtès
2020-06-28 16:40 ` Eli Zaretskii
2020-07-03 0:31 ` Simon Marchi
2020-07-03 7:06 ` Ludovic Courtès
2020-07-18 19:00 ` Joel Brobecker
2020-07-19 15:45 ` Simon Marchi
2020-07-20 8:05 ` Ludovic Courtès
2020-07-20 15:01 ` Simon Marchi
2020-07-21 21:10 ` Ludovic Courtès
2020-06-28 14:25 ` [PATCH v4 2/2] guile: Add support for Guile 3.0 Ludovic Courtès
2020-06-28 16:38 ` [PATCH v3 1/2] guile: Add support for Guile 2.2 Eli Zaretskii
2020-06-28 16:51 ` Ludovic Courtès
2020-07-02 12:57 ` [PING] Add support for Guile 2.2/3.0 Ludovic Courtès
2020-07-13 15:36 ` Tom Tromey
2020-06-26 8:13 ` [PATCH v3 2/2] guile: Add support for Guile 3.0 Ludovic Courtès
2020-06-26 10:13 ` Eli Zaretskii
2020-06-15 15:14 ` Ludovic Courtès [this message]
2020-06-12 14:14 ` [PATCH 1/2] guile: Add support for Guile 2.2 Tom de Vries
2020-06-12 14:36 ` Ludovic Courtès
2020-06-12 13:27 ` [PATCH 2/2] guile: Add support for Guile 3.0 Ludovic Courtès
2020-06-15 15:02 ` Tom Tromey
2020-06-15 15:17 ` Ludovic Courtès
2020-06-17 16:58 ` Ludovic Courtès
2020-06-17 17:21 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200615151453.795-3-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=xdje42@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).