union pascm_variable
{
- /* Hold an integer value, for boolean and integer types. */
+ /* Hold an boolean value. */
+ bool boolval;
+
+ /* Hold an integer value. */
int intval;
/* Hold an auto_boolean. */
{
case var_boolean:
add_setshow_boolean_cmd (cmd_name, cmd_class,
- &self->value.intval,
+ &self->value.boolval,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list);
case var_boolean:
{
- if (* (int *) var)
+ if (* (bool *) var)
return SCM_BOOL_T;
else
return SCM_BOOL_F;
case var_boolean:
SCM_ASSERT_TYPE (gdbscm_is_bool (value), value, arg_pos, func_name,
_("boolean"));
- var->intval = gdbscm_is_true (value);
+ var->boolval = gdbscm_is_true (value);
break;
case var_auto_boolean:
_("parameter exists, \"show\" command is already defined"));
}
+ gdbscm_gdb_exception exc {};
try
{
add_setshow_generic (p_smob->type, p_smob->cmd_class,
}
catch (const gdb_exception &except)
{
- GDBSCM_HANDLE_GDB_EXCEPTION (except);
+ exc = unpack (except);
}
+ GDBSCM_HANDLE_GDB_EXCEPTION (exc);
/* Note: At this point the parameter exists in gdb.
So no more errors after this point. */
struct cmd_list_element *alias, *prefix, *cmd;
char *newarg;
int found = -1;
- struct gdb_exception except = exception_none;
+ gdbscm_gdb_exception except {};
gdb::unique_xmalloc_ptr<char> name
= gdbscm_scm_to_host_string (self, NULL, &except_scm);
}
catch (const gdb_exception &ex)
{
- except = ex;
+ except = unpack (ex);
}
xfree (newarg);