GDB (xrefs)
|
#include "defs.h"
#include "language.h"
#include "gdbcore.h"
#include "inferior.h"
#include "regcache.h"
#include "value.h"
#include "ppc-tdep.h"
#include "target.h"
#include "objfiles.h"
#include "infcall.h"
#include "dwarf2.h"
#include "dwarf2/loc.h"
#include "target-float.h"
#include <algorithm>
Go to the source code of this file.
Classes | |
struct | ppc64_sysv_argpos |
Functions | |
static int | ppc_sysv_use_opencl_abi (struct type *ftype) |
CORE_ADDR | ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, function_call_return_method return_method, CORE_ADDR struct_addr) |
static enum return_value_convention | get_decimal_float_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) |
static enum return_value_convention | do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf, int broken_gcc) |
enum return_value_convention | ppc_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) |
enum return_value_convention | ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) |
static int | convert_code_addr_to_desc_addr (CORE_ADDR code_addr, CORE_ADDR *desc_addr) |
static LONGEST | ppc64_aggregate_candidate (struct type *type, struct type **field_type) |
static int | ppc64_elfv2_abi_homogeneous_aggregate (struct type *type, struct type **elt_type, int *n_elts, struct gdbarch *gdbarch) |
static void | ppc64_sysv_abi_push_val (struct gdbarch *gdbarch, const bfd_byte *val, int len, int align, struct ppc64_sysv_argpos *argpos) |
static void | ppc64_sysv_abi_push_integer (struct gdbarch *gdbarch, ULONGEST val, struct ppc64_sysv_argpos *argpos) |
static void | ppc64_sysv_abi_push_freg (struct gdbarch *gdbarch, struct type *type, const bfd_byte *val, struct ppc64_sysv_argpos *argpos) |
static void | ppc64_sysv_abi_push_vreg (struct gdbarch *gdbarch, const bfd_byte *val, struct ppc64_sysv_argpos *argpos) |
static void | ppc64_sysv_abi_push_param (struct gdbarch *gdbarch, struct type *type, const bfd_byte *val, struct ppc64_sysv_argpos *argpos) |
CORE_ADDR | ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, function_call_return_method return_method, CORE_ADDR struct_addr) |
static int | ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf, int index) |
enum return_value_convention | ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) |
CORE_ADDR | ppc_sysv_get_return_buf_addr (struct type *val_type, frame_info_ptr cur_frame) |
|
static |
Definition at line 1044 of file ppc-sysv-tdep.c.
References find_pc_section(), general_symbol_info::linkage_name(), lookup_minimal_symbol(), lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, obj_section::objfile, and bound_minimal_symbol::value_address().
Referenced by ppc64_sysv_abi_push_dummy_call(), and ppc64_sysv_abi_push_param().
|
static |
Definition at line 680 of file ppc-sysv-tdep.c.
References check_typedef(), type::code(), readable_regcache::cooked_read(), regcache::cooked_write(), floatformats_ibm_long_double, gdbarch_byte_order(), gdbarch_long_double_format(), get_decimal_float_return_value(), type::is_vector(), type::length(), POWERPC_VEC_ALTIVEC, POWERPC_VEC_GENERIC, POWERPC_VEC_SPE, ppc_gdbarch_tdep::ppc_ev0_regnum, ppc_gdbarch_tdep::ppc_fp0_regnum, ppc_gdbarch_tdep::ppc_gp0_regnum, PPC_MAX_REGISTER_SIZE, ppc_sysv_use_opencl_abi(), ppc_gdbarch_tdep::ppc_vr0_regnum, regcache_cooked_read_unsigned(), regcache_cooked_write_unsigned(), register_type(), regnum, RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, ppc_gdbarch_tdep::soft_float, store_unsigned_integer(), target_float_convert(), type::target_type(), TYPE_IS_REFERENCE, unpack_long(), and ppc_gdbarch_tdep::wordsize.
Referenced by ppc_sysv_abi_broken_return_value(), and ppc_sysv_abi_return_value().
|
static |
Definition at line 603 of file ppc-sysv-tdep.c.
References type::code(), readable_regcache::cooked_read(), regcache::cooked_write(), type::length(), ppc_gdbarch_tdep::ppc_fp0_regnum, PPC_MAX_REGISTER_SIZE, and RETURN_VALUE_REGISTER_CONVENTION.
Referenced by do_ppc_sysv_return_value().
Definition at line 1081 of file ppc-sysv-tdep.c.
References check_typedef(), type::code(), type::field(), get_array_bounds(), field::is_static(), type::is_vector(), type::length(), type::num_fields(), ppc64_aggregate_candidate(), type::target_type(), field::type(), and type.
Referenced by ppc64_aggregate_candidate(), and ppc64_elfv2_abi_homogeneous_aggregate().
|
static |
Definition at line 1189 of file ppc-sysv-tdep.c.
References type::code(), floatformats_ieee_quad, gdbarch_long_double_format(), type::is_vector(), type::length(), and ppc64_aggregate_candidate().
Referenced by ppc64_sysv_abi_push_param(), and ppc64_sysv_abi_return_value().
CORE_ADDR ppc64_sysv_abi_push_dummy_call | ( | struct gdbarch * | gdbarch, |
struct value * | function, | ||
struct regcache * | regcache, | ||
CORE_ADDR | bp_addr, | ||
int | nargs, | ||
struct value ** | args, | ||
CORE_ADDR | sp, | ||
function_call_return_method | return_method, | ||
CORE_ADDR | struct_addr ) |
Definition at line 1599 of file ppc-sysv-tdep.c.
References check_typedef(), type::code(), value::contents(), convert_code_addr_to_desc_addr(), find_function_addr(), ppc64_sysv_argpos::freg, gdbarch_byte_order(), gdbarch_sp_regnum(), ppc64_sysv_argpos::gparam, ppc64_sysv_argpos::greg, type::is_vector(), type::length(), POWERPC_ELF_V1, POWERPC_ELF_V2, ppc64_sysv_abi_push_integer(), ppc64_sysv_abi_push_param(), ppc_floating_point_unit_p(), ppc_gdbarch_tdep::ppc_gp0_regnum, ppc_gdbarch_tdep::ppc_lr_regnum, ppc_sysv_use_opencl_abi(), ppc_gdbarch_tdep::ppc_vr0_regnum, read_memory_unsigned_integer(), ppc64_sysv_argpos::refparam, ppc64_sysv_argpos::regcache, regcache_cooked_read_unsigned(), regcache_cooked_write_signed(), regcache_cooked_write_unsigned(), register_type(), return_method_struct, type::target_type(), value::type(), value_as_address(), ppc64_sysv_argpos::vreg, ppc_gdbarch_tdep::wordsize, and write_memory_signed_integer().
Referenced by rs6000_gdbarch_init().
|
static |
Definition at line 1336 of file ppc-sysv-tdep.c.
References type::code(), regcache::cooked_write(), regcache::cooked_write_part(), floatformats_ibm_long_double, ppc64_sysv_argpos::freg, gdbarch_byte_order(), gdbarch_long_double_format(), type::length(), ppc_gdbarch_tdep::ppc_fp0_regnum, PPC_MAX_REGISTER_SIZE, ppc64_sysv_argpos::regcache, register_type(), regnum, ppc_gdbarch_tdep::soft_float, and target_float_convert().
Referenced by ppc64_sysv_abi_push_param().
|
static |
Definition at line 1319 of file ppc-sysv-tdep.c.
References gdbarch_byte_order(), ppc64_sysv_abi_push_val(), PPC_MAX_REGISTER_SIZE, ppc64_sysv_argpos::regcache, store_unsigned_integer(), and ppc_gdbarch_tdep::wordsize.
Referenced by ppc64_sysv_abi_push_dummy_call(), and ppc64_sysv_abi_push_param().
|
static |
Definition at line 1437 of file ppc-sysv-tdep.c.
References check_typedef(), type::code(), convert_code_addr_to_desc_addr(), type::field(), floatformats_ieee_quad, gdbarch_long_double_format(), type::is_vector(), type::length(), type::num_fields(), POWERPC_ELF_V1, POWERPC_ELF_V2, POWERPC_VEC_ALTIVEC, ppc64_elfv2_abi_homogeneous_aggregate(), ppc64_sysv_abi_push_freg(), ppc64_sysv_abi_push_integer(), ppc64_sysv_abi_push_val(), ppc64_sysv_abi_push_vreg(), ppc64_sysv_argpos::refparam, ppc64_sysv_argpos::regcache, type::target_type(), field::type(), TYPE_IS_REFERENCE, unpack_long(), ppc_gdbarch_tdep::wordsize, and write_memory().
Referenced by ppc64_sysv_abi_push_dummy_call().
|
static |
Definition at line 1268 of file ppc-sysv-tdep.c.
References regcache::cooked_write(), regcache::cooked_write_part(), gdbarch_byte_order(), ppc64_sysv_argpos::gparam, ppc64_sysv_argpos::greg, ppc_gdbarch_tdep::ppc_gp0_regnum, ppc64_sysv_argpos::regcache, ppc_gdbarch_tdep::wordsize, and write_memory().
Referenced by ppc64_sysv_abi_push_integer(), and ppc64_sysv_abi_push_param().
|
static |
Definition at line 1422 of file ppc-sysv-tdep.c.
References regcache::cooked_write(), ppc_gdbarch_tdep::ppc_vr0_regnum, ppc64_sysv_argpos::regcache, and ppc64_sysv_argpos::vreg.
Referenced by ppc64_sysv_abi_push_param().
enum return_value_convention ppc64_sysv_abi_return_value | ( | struct gdbarch * | gdbarch, |
struct value * | function, | ||
struct type * | valtype, | ||
struct regcache * | regcache, | ||
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf ) |
Definition at line 1986 of file ppc-sysv-tdep.c.
References check_typedef(), type::code(), readable_regcache::cooked_read(), readable_regcache::cooked_read_part(), regcache::cooked_write(), regcache::cooked_write_part(), gdbarch_byte_order(), type::is_vector(), language_pass_by_reference(), type::length(), POWERPC_ELF_V2, POWERPC_VEC_ALTIVEC, ppc64_elfv2_abi_homogeneous_aggregate(), ppc64_sysv_abi_return_value_base(), ppc_floating_point_unit_p(), ppc_gdbarch_tdep::ppc_gp0_regnum, PPC_MAX_REGISTER_SIZE, ppc_sysv_use_opencl_abi(), ppc_gdbarch_tdep::ppc_vr0_regnum, register_size(), register_type(), regnum, RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, type::target_type(), value::type(), TYPE_IS_REFERENCE, and ppc_gdbarch_tdep::wordsize.
Referenced by rs6000_gdbarch_init().
|
static |
Definition at line 1797 of file ppc-sysv-tdep.c.
References gdb_mpz::as_integer(), type::code(), readable_regcache::cooked_read(), readable_regcache::cooked_read_part(), regcache::cooked_write(), regcache::cooked_write_part(), floatformats_ibm_long_double, floatformats_ieee_quad, gdbarch_byte_order(), gdbarch_long_double_format(), is_fixed_point_type(), type::is_unsigned(), type::is_vector(), type::length(), POWERPC_VEC_ALTIVEC, ppc_gdbarch_tdep::ppc_fp0_regnum, ppc_gdbarch_tdep::ppc_gp0_regnum, PPC_MAX_REGISTER_SIZE, ppc_gdbarch_tdep::ppc_vr0_regnum, gdb_mpz::read(), regcache_cooked_read_unsigned(), regcache_cooked_write_unsigned(), register_type(), regnum, store_unsigned_integer(), target_float_convert(), type_byte_order(), and unpack_long().
Referenced by ppc64_sysv_abi_return_value().
enum return_value_convention ppc_sysv_abi_broken_return_value | ( | struct gdbarch * | gdbarch, |
struct value * | function, | ||
struct type * | valtype, | ||
struct regcache * | regcache, | ||
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf ) |
Definition at line 1021 of file ppc-sysv-tdep.c.
References do_ppc_sysv_return_value(), and value::type().
Referenced by ppcfbsd_return_value(), ppcnbsd_return_value(), and ppcobsd_init_abi().
CORE_ADDR ppc_sysv_abi_push_dummy_call | ( | struct gdbarch * | gdbarch, |
struct value * | function, | ||
struct regcache * | regcache, | ||
CORE_ADDR | bp_addr, | ||
int | nargs, | ||
struct value ** | args, | ||
CORE_ADDR | sp, | ||
function_call_return_method | return_method, | ||
CORE_ADDR | struct_addr ) |
Definition at line 64 of file ppc-sysv-tdep.c.
References check_typedef(), type::code(), value::contents(), regcache::cooked_write(), floatformats_ibm_long_double, floatformats_ieee_quad, gdbarch_byte_order(), gdbarch_long_double_format(), gdbarch_sp_regnum(), type::is_vector(), type::length(), POWERPC_VEC_ALTIVEC, POWERPC_VEC_SPE, ppc_gdbarch_tdep::ppc_cr_regnum, ppc_gdbarch_tdep::ppc_ev0_regnum, ppc_gdbarch_tdep::ppc_fp0_regnum, ppc_gdbarch_tdep::ppc_gp0_regnum, ppc_gdbarch_tdep::ppc_lr_regnum, PPC_MAX_REGISTER_SIZE, ppc_sysv_use_opencl_abi(), ppc_gdbarch_tdep::ppc_vr0_regnum, regcache_cooked_read_unsigned(), regcache_cooked_write_signed(), regcache_cooked_write_unsigned(), register_type(), regnum, return_method_struct, ppc_gdbarch_tdep::soft_float, store_unsigned_integer(), target_float_convert(), type::target_type(), value::type(), unpack_long(), ppc_gdbarch_tdep::wordsize, write_memory(), and write_memory_signed_integer().
Referenced by rs6000_gdbarch_init().
enum return_value_convention ppc_sysv_abi_return_value | ( | struct gdbarch * | gdbarch, |
struct value * | function, | ||
struct type * | valtype, | ||
struct regcache * | regcache, | ||
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf ) |
Definition at line 1011 of file ppc-sysv-tdep.c.
References do_ppc_sysv_return_value(), and value::type().
Referenced by ppc_linux_return_value(), and rs6000_gdbarch_init().
CORE_ADDR ppc_sysv_get_return_buf_addr | ( | struct type * | val_type, |
frame_info_ptr | cur_frame ) |
Definition at line 2162 of file ppc-sysv-tdep.c.
References CALL_SITE_PARAMETER_DWARF_REG, call_site_parameter_u::dwarf_reg, lookup_pointer_type(), value_as_address(), and value_of_dwarf_reg_entry().
Referenced by rs6000_gdbarch_init().
|
static |
Definition at line 41 of file ppc-sysv-tdep.c.
References check_typedef(), type::code(), type::target_type(), and TYPE_CALLING_CONVENTION.
Referenced by do_ppc_sysv_return_value(), ppc64_sysv_abi_push_dummy_call(), ppc64_sysv_abi_return_value(), and ppc_sysv_abi_push_dummy_call().