int nblocks = 0;
int block_loop = 0;
+ lookup_name_info func_matcher (GCC_FE_WRAPPER_FUNCTION,
+ symbol_name_match_type::SEARCH_NAME);
+
bv = SYMTAB_BLOCKVECTOR (func_sym->owner.symtab);
nblocks = BLOCKVECTOR_NBLOCKS (bv);
if (function != NULL
&& (BLOCK_SUPERBLOCK (function_block)
== BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK))
- && (strcmp_iw (function->linkage_name (),
- GCC_FE_WRAPPER_FUNCTION)
- == 0))
+ && symbol_matches_search_name (function, func_matcher))
break;
}
if (block_loop == nblocks)
- error (_("No \"%s\" symbol found"), COMPILE_I_EXPR_PTR_TYPE);
+ error (_("No \"%s\" symbol found"), COMPILE_I_EXPR_VAL);
gdb_type = SYMBOL_TYPE (gdb_val_sym);
gdb_type = check_typedef (gdb_type);
error (_("No \"%s\" symbol found"), COMPILE_I_EXPR_PTR_TYPE);
gdb_ptr_type = SYMBOL_TYPE (gdb_ptr_type_sym);
gdb_ptr_type = check_typedef (gdb_ptr_type);
- if (TYPE_CODE (gdb_ptr_type) != TYPE_CODE_PTR)
+ if (gdb_ptr_type->code () != TYPE_CODE_PTR)
error (_("Type of \"%s\" is not a pointer"), COMPILE_I_EXPR_PTR_TYPE);
gdb_type_from_ptr = check_typedef (TYPE_TARGET_TYPE (gdb_ptr_type));
return gdb_type;
}
- if (TYPE_CODE (gdb_type) != TYPE_CODE_PTR)
+ if (gdb_type->code () != TYPE_CODE_PTR)
error (_("Invalid type code %d of symbol \"%s\" "
"in compiled module \"%s\"."),
- TYPE_CODE (gdb_type_from_ptr), COMPILE_I_EXPR_VAL,
+ gdb_type_from_ptr->code (), COMPILE_I_EXPR_VAL,
objfile_name (objfile));
retval = gdb_type_from_ptr;
- switch (TYPE_CODE (gdb_type_from_ptr))
+ switch (gdb_type_from_ptr->code ())
{
case TYPE_CODE_ARRAY:
gdb_type_from_ptr = TYPE_TARGET_TYPE (gdb_type_from_ptr);
default:
error (_("Invalid type code %d of symbol \"%s\" "
"in compiled module \"%s\"."),
- TYPE_CODE (gdb_type_from_ptr), COMPILE_I_EXPR_PTR_TYPE,
+ gdb_type_from_ptr->code (), COMPILE_I_EXPR_PTR_TYPE,
objfile_name (objfile));
}
if (!types_deeply_equal (gdb_type_from_ptr,
return NULL;
regsp_type = check_typedef (TYPE_FIELD_TYPE (func_type, 0));
- if (TYPE_CODE (regsp_type) != TYPE_CODE_PTR)
+ if (regsp_type->code () != TYPE_CODE_PTR)
error (_("Invalid type code %d of first parameter of function \"%s\" "
"in compiled module \"%s\"."),
- TYPE_CODE (regsp_type), GCC_FE_WRAPPER_FUNCTION,
+ regsp_type->code (), GCC_FE_WRAPPER_FUNCTION,
objfile_name (objfile));
regs_type = check_typedef (TYPE_TARGET_TYPE (regsp_type));
- if (TYPE_CODE (regs_type) != TYPE_CODE_STRUCT)
+ if (regs_type->code () != TYPE_CODE_STRUCT)
error (_("Invalid type code %d of dereferenced first parameter "
"of function \"%s\" in compiled module \"%s\"."),
- TYPE_CODE (regs_type), GCC_FE_WRAPPER_FUNCTION,
+ regs_type->code (), GCC_FE_WRAPPER_FUNCTION,
objfile_name (objfile));
return regs_type;
reg_name, pulongest (reg_bitpos), pulongest (reg_bitsize));
reg_offset = reg_bitpos / 8;
- if (TYPE_CODE (reg_type) != TYPE_CODE_INT
- && TYPE_CODE (reg_type) != TYPE_CODE_PTR)
+ if (reg_type->code () != TYPE_CODE_INT
+ && reg_type->code () != TYPE_CODE_PTR)
error (_("Invalid register \"%s\" type code %d"), reg_name,
- TYPE_CODE (reg_type));
+ reg_type->code ());
regnum = compile_register_name_demangle (gdbarch, reg_name);
gdb::unique_xmalloc_ptr<char> filename
(tilde_expand (file_names.object_file ()));
- gdb_bfd_ref_ptr abfd (gdb_bfd_open (filename.get (), gnutarget, -1));
+ gdb_bfd_ref_ptr abfd (gdb_bfd_open (filename.get (), gnutarget));
if (abfd == NULL)
error (_("\"%s\": could not open as compiled module: %s"),
filename.get (), bfd_errmsg (bfd_get_error ()));
error (_("Cannot find function \"%s\" in compiled module \"%s\"."),
GCC_FE_WRAPPER_FUNCTION, objfile_name (objfile));
func_type = SYMBOL_TYPE (func_sym);
- if (TYPE_CODE (func_type) != TYPE_CODE_FUNC)
+ if (func_type->code () != TYPE_CODE_FUNC)
error (_("Invalid type code %d of function \"%s\" in compiled "
"module \"%s\"."),
- TYPE_CODE (func_type), GCC_FE_WRAPPER_FUNCTION,
+ func_type->code (), GCC_FE_WRAPPER_FUNCTION,
objfile_name (objfile));
switch (scope)