X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fada-exp.y;h=2ae9830dbbb865e0cfa02dca3ccec7c3483219e4;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=160e64bc05be5a6d3f44e49e5ff75decaca81794;hpb=f945dedfd3512bfbca0f1405c8ea85684980e69a;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y index 160e64bc05..2ae9830dbb 100644 --- a/gdb/ada-exp.y +++ b/gdb/ada-exp.y @@ -1,5 +1,5 @@ /* YACC parser for Ada expressions, for GDB. - Copyright (C) 1986-2019 Free Software Foundation, Inc. + Copyright (C) 1986-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -1102,12 +1102,11 @@ static void write_ambiguous_var (struct parser_state *par_state, const struct block *block, char *name, int len) { - struct symbol *sym = XOBNEW (&temp_parse_space, struct symbol); + struct symbol *sym = new (&temp_parse_space) symbol (); - memset (sym, 0, sizeof (struct symbol)); SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN; - SYMBOL_LINKAGE_NAME (sym) = obstack_strndup (&temp_parse_space, name, len); - SYMBOL_LANGUAGE (sym) = language_ada; + sym->set_linkage_name (obstack_strndup (&temp_parse_space, name, len)); + sym->set_language (language_ada, nullptr); write_exp_elt_opcode (par_state, OP_VAR_VALUE); write_exp_elt_block (par_state, block); @@ -1387,7 +1386,7 @@ convert_char_literal (struct type *type, LONGEST val) if (type == NULL) return val; type = check_typedef (type); - if (TYPE_CODE (type) != TYPE_CODE_ENUM) + if (type->code () != TYPE_CODE_ENUM) return val; if ((val >= 'a' && val <= 'z') || (val >= '0' && val <= '9')) @@ -1395,7 +1394,7 @@ convert_char_literal (struct type *type, LONGEST val) else xsnprintf (name, sizeof (name), "QU%02x", (int) val); size_t len = strlen (name); - for (f = 0; f < TYPE_NFIELDS (type); f += 1) + for (f = 0; f < type->num_fields (); f += 1) { /* Check the suffix because an enum constant in a package will have a name like "pkg__QUxx". This is safe enough because we @@ -1457,8 +1456,9 @@ type_system_address (struct parser_state *par_state) return type != NULL ? type : parse_type (par_state)->builtin_data_ptr; } +void _initialize_ada_exp (); void -_initialize_ada_exp (void) +_initialize_ada_exp () { obstack_init (&temp_parse_space); }