/* Print in infix form a struct expression.
- Copyright (C) 1986-2018 Free Software Foundation, Inc.
+ Copyright (C) 1986-2019 Free Software Foundation, Inc.
This file is part of GDB.
const char *
op_name (struct expression *exp, enum exp_opcode opcode)
{
+ if (opcode >= OP_UNUSED_LAST)
+ {
+ char *cell = get_print_cell ();
+ xsnprintf (cell, PRINT_CELL_SIZE, "unknown opcode: %u",
+ unsigned (opcode));
+ return cell;
+ }
return exp->language_defn->la_exp_desc->op_name (opcode);
}