diff options
Diffstat (limited to 'gdb/bt-utils.c')
-rw-r--r-- | gdb/bt-utils.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/bt-utils.c b/gdb/bt-utils.c index dfe429e..8110f10 100644 --- a/gdb/bt-utils.c +++ b/gdb/bt-utils.c @@ -29,15 +29,13 @@ gdb_internal_backtrace_set_cmd (const char *args, int from_tty, cmd_list_element *c) { gdb_assert (c->type == set_cmd); - gdb_assert (c->var_type == var_boolean); - gdb_assert (c->var != nullptr); + gdb_assert (c->var.has_value ()); + gdb_assert (c->var->type () == var_boolean); #ifndef GDB_PRINT_INTERNAL_BACKTRACE - bool *var_ptr = (bool *) c->var; - - if (*var_ptr) + if (c->var->get<bool> ()) { - *var_ptr = false; + c->var->set<bool> (false); error (_("support for this feature is not compiled into GDB")); } #endif |