diff options
author | Maciej W. Rozycki <macro@embecosm.com> | 2022-10-21 08:54:18 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@embecosm.com> | 2022-10-21 08:54:18 +0100 |
commit | 90319cefe398bb6c5130b48d1c0e4df5e65eb194 (patch) | |
tree | 3f04a649900455491d89a2fba3792b8111d323af /gdb/guile | |
parent | b4d6b738075e2d4be9b4a8d2080bcf94e6b7e229 (diff) | |
download | fsf-binutils-gdb-90319cefe398bb6c5130b48d1c0e4df5e65eb194.zip fsf-binutils-gdb-90319cefe398bb6c5130b48d1c0e4df5e65eb194.tar.gz fsf-binutils-gdb-90319cefe398bb6c5130b48d1c0e4df5e65eb194.tar.bz2 |
GDB/Guile: Don't assert that an integer value is boolean
Do not assert that a value intended for an integer parameter, of either
the PARAM_UINTEGER or the PARAM_ZUINTEGER_UNLIMITED type, is boolean,
causing error messages such as:
ERROR: In procedure make-parameter:
ERROR: In procedure gdbscm_make_parameter: Wrong type argument in position 15 (expecting integer or #:unlimited): 3
Error while executing Scheme code.
when initialization with a number is attempted. Instead assert that it
is integer. Keep matching `#:unlimited' keyword as an alternative. Add
suitable test cases.
Approved-By: Simon Marchi <simon.marchi@polymtl.ca>
Diffstat (limited to 'gdb/guile')
-rw-r--r-- | gdb/guile/scm-param.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/guile/scm-param.c b/gdb/guile/scm-param.c index 54c8c27..c4e9041 100644 --- a/gdb/guile/scm-param.c +++ b/gdb/guile/scm-param.c @@ -742,7 +742,7 @@ pascm_set_param_value_x (param_smob *p_smob, if (var.type () == var_uinteger || var.type () == var_zuinteger_unlimited) { - SCM_ASSERT_TYPE (gdbscm_is_bool (value) + SCM_ASSERT_TYPE (scm_is_integer (value) || scm_is_eq (value, unlimited_keyword), value, arg_pos, func_name, _("integer or #:unlimited")); |