guile: Type-check the argument to 'history-append!'.

gdb/
2014-06-05  Ludovic Courtès  <ludo@gnu.org>

	* guile/scm-value.c (gdbscm_history_append_x): Use
	'vlscm_get_value_smob_arg_unsafe' instead of
	'vlscm_scm_to_value'.

gdb/testsuite/
2014-06-05  Ludovic Courtès  <ludo@gnu.org>

	* gdb.guile/scm-value.exp (test_value_in_inferior): Add test
	"history-append! type error".
This commit is contained in:
Ludovic Courtès
2014-06-06 00:02:33 +02:00
parent 6ef284bd18
commit fb9347707f
4 changed files with 18 additions and 1 deletions

View File

@@ -1295,9 +1295,11 @@ gdbscm_history_append_x (SCM value)
{
int res_index = -1;
struct value *v;
value_smob *v_smob;
volatile struct gdb_exception except;
v = vlscm_scm_to_value (value);
v_smob = vlscm_get_value_smob_arg_unsafe (value, SCM_ARG1, FUNC_NAME);
v = v_smob->value;
TRY_CATCH (except, RETURN_MASK_ALL)
{