49 #define SIG_FRAME_PC_OFFSET 96 50 #define SIG_FRAME_LR_OFFSET 108 51 #define SIG_FRAME_FP_OFFSET 284 114 const void *gregs,
size_t len)
128 void *gregs,
size_t len)
198 struct value *arg = 0;
240 for (argno = 0, argbytes = 0; argno < nargs && ii < 8; ++ii)
271 while (argbytes < len)
274 memset (word, 0, reg_size);
277 (len - argbytes) > reg_size
278 ? reg_size : len - argbytes);
282 ++ii, argbytes += reg_size;
285 goto ran_out_of_registers_for_arguments;
295 memset (word, 0, reg_size);
302 ran_out_of_registers_for_arguments:
320 if ((argno < nargs) || argbytes)
326 space += ((len - argbytes + 3) & -4);
332 for (; jj < nargs; ++jj)
334 struct value *val = args[jj];
339 space = (space + 15) & -16;
360 ii += ((len - argbytes + 3) & -4) / 4;
364 for (; argno < nargs; ++argno)
386 ii += ((len + 3) & -4) / 4;
520 memcpy (readbuf, regval, 8);
589 if (pc_section && (pc_section->the_bfd_section->flags & SEC_CODE))
611 absolute = (int) ((instr >> 1) & 1);
616 immediate = ((instr & ~3) << 6) >> 6;
620 dest =
pc + immediate;
624 immediate = ((instr & ~3) << 16) >> 16;
628 dest =
pc + immediate;
632 ext_op = (instr >> 1) & 0x3ff;
652 else if (ext_op == 528)
676 static std::vector<CORE_ADDR>
691 if (!next_pcs.empty ())
699 if (breaks[1] == breaks[0])
702 for (ii = 0; ii < 2; ++ii)
705 if (breaks[ii] == -1)
708 next_pcs.push_back (breaks[ii]);
734 gdb_assert (bfd_get_flavour (abfd) == bfd_target_xcoff_flavour);
776 #define __LDINFO_PTRACE32__ 777 #define __LDINFO_PTRACE64__ 780 #define pinfo(type,member) \ 782 struct type ldi = {0}; \ 784 printf (" {%d, %d},\t\n", \ 785 offsetof (struct type, member), \ 786 sizeof (ldi.member), \ 794 printf (
"static const struct ld_info_desc ld_info32_desc =\n{\n");
795 pinfo (__ld_info32, ldinfo_next);
796 pinfo (__ld_info32, ldinfo_fd);
797 pinfo (__ld_info32, ldinfo_textorg);
798 pinfo (__ld_info32, ldinfo_textsize);
799 pinfo (__ld_info32, ldinfo_dataorg);
800 pinfo (__ld_info32, ldinfo_datasize);
801 pinfo (__ld_info32, ldinfo_filename);
806 printf (
"static const struct ld_info_desc ld_info64_desc =\n{\n");
807 pinfo (__ld_info64, ldinfo_next);
808 pinfo (__ld_info64, ldinfo_fd);
809 pinfo (__ld_info64, ldinfo_textorg);
810 pinfo (__ld_info64, ldinfo_textsize);
811 pinfo (__ld_info64, ldinfo_dataorg);
812 pinfo (__ld_info64, ldinfo_datasize);
813 pinfo (__ld_info64, ldinfo_filename);
909 struct obstack *obstack)
963 struct obstack obstack;
967 obstack_init (&obstack);
980 ldi_buf = ldi_buf + ldi.
next;
985 buf = (
const char *) obstack_finish (&obstack);
986 len_avail = strlen (buf);
991 if (len > len_avail -
offset)
993 memcpy (readbuf, buf +
offset, len);
996 obstack_free (&obstack, NULL);
1008 struct bfd_section *ldinfo_sec;
1014 ldinfo_sec = bfd_get_section_by_name (
core_bfd,
".ldinfo");
1015 if (ldinfo_sec == NULL)
1016 error (
_(
"cannot find .ldinfo section from core file: %s"),
1017 bfd_errmsg (bfd_get_error ()));
1018 ldinfo_size = bfd_get_section_size (ldinfo_sec);
1023 if (! bfd_get_section_contents (
core_bfd, ldinfo_sec,
1024 ldinfo_buf, 0, ldinfo_size))
1025 error (
_(
"unable to read .ldinfo section from core file: %s"),
1026 bfd_errmsg (bfd_get_error ()));
1092 bfd_target_xcoff_flavour,
1095 bfd_target_xcoff_flavour,
void _initialize_rs6000_aix_tdep(void)
ULONGEST regcache_raw_get_unsigned(struct regcache *regcache, int regnum)
CORE_ADDR extract_typed_address(const gdb_byte *buf, struct type *type)
static struct ppc_reg_offsets rs6000_aix32_reg_offsets
void set_gdbarch_displaced_step_fixup(struct gdbarch *gdbarch, gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
struct frame_info * get_current_frame(void)
void set_gdbarch_wchar_bit(struct gdbarch *gdbarch, int wchar_bit)
void set_solib_ops(struct gdbarch *gdbarch, const struct target_so_ops *new_ops)
struct bfd_section * the_bfd_section
void() iterate_over_regset_sections_cb(const char *sect_name, int size, const struct regset *regset, const char *human_name, void *cb_data)
void ppc_supply_fpregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len)
void set_gdbarch_displaced_step_location(struct gdbarch *gdbarch, gdbarch_displaced_step_location_ftype displaced_step_location)
static CORE_ADDR branch_dest(struct regcache *regcache, int opcode, int instr, CORE_ADDR pc, CORE_ADDR safety)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
void set_gdbarch_frame_red_zone_size(struct gdbarch *gdbarch, int frame_red_zone_size)
void * memset(T *s, int c, size_t n)=delete
struct field_info ldinfo_dataorg
void gdbarch_register_osabi_sniffer(enum bfd_architecture arch, enum bfd_flavour flavour, enum gdb_osabi(*sniffer_fn)(bfd *))
static void rs6000_aix_supply_regset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
void target_float_convert(const gdb_byte *from, const struct type *from_type, gdb_byte *to, const struct type *to_type)
struct field_info ldinfo_filename
static const struct ld_info_desc ld_info32_desc
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
void set_gdbarch_wchar_signed(struct gdbarch *gdbarch, int wchar_signed)
void regcache_raw_write_signed(struct regcache *regcache, int regnum, LONGEST val)
void set_gdbarch_core_xfer_shared_libraries_aix(struct gdbarch *gdbarch, gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
static void rs6000_aix_iterate_over_regset_sections(struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
static enum return_value_convention rs6000_return_value(struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static void rs6000_aix_collect_regset(const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len)
struct type * check_typedef(struct type *type)
LONGEST read_memory_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
void ppc_collect_gregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len)
const gdb_byte * value_contents(struct value *value)
struct target_so_ops solib_aix_so_ops
static ULONGEST rs6000_aix_core_xfer_shared_libraries_aix(struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
#define CATCH(EXCEPTION, MASK)
#define PPC_MAX_REGISTER_SIZE
int gdbarch_sp_regnum(struct gdbarch *gdbarch)
static ULONGEST extract_unsigned_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
static struct ld_info rs6000_aix_extract_ld_info(struct gdbarch *gdbarch, const gdb_byte *ldi_buf)
static const struct ld_info_desc ld_info64_desc
struct type * register_type(struct gdbarch *gdbarch, int regnum)
std::vector< CORE_ADDR > ppc_deal_with_atomic_sequence(struct regcache *regcache)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
char * pulongest(ULONGEST u)
void set_gdbarch_auto_wide_charset(struct gdbarch *gdbarch, gdbarch_auto_wide_charset_ftype auto_wide_charset)
static const struct regset rs6000_aix32_regset
void ppc_collect_fpregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len)
struct field_info ldinfo_textsize
void set_gdbarch_convert_from_func_ptr_addr(struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
static const struct regset rs6000_aix64_regset
static void rs6000_aix_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
struct obj_section * find_pc_section(CORE_ADDR pc)
std::string xml_escape_text(const char *text)
static CORE_ADDR rs6000_push_dummy_call(struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
void gdbarch_register_osabi(enum bfd_architecture arch, unsigned long machine, enum gdb_osabi osabi, void(*init_osabi)(struct gdbarch_info, struct gdbarch *))
#define SIG_FRAME_PC_OFFSET
LONGEST unpack_long(struct type *type, const gdb_byte *valaddr)
CORE_ADDR solib_aix_get_toc_value(CORE_ADDR pc)
void set_gdbarch_software_single_step(struct gdbarch *gdbarch, gdbarch_software_single_step_ftype software_single_step)
struct field_info ldinfo_fd
#define AIX_TEXT_SEGMENT_BASE
void set_gdbarch_displaced_step_copy_insn(struct gdbarch *gdbarch, gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
#define TYPE_CODE(thistype)
CORE_ADDR get_frame_base(struct frame_info *fi)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
int xcoff_get_n_import_files(bfd *abfd)
static enum gdb_osabi rs6000_aix_osabi_sniffer(bfd *abfd)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type)
struct type * builtin_data_ptr
void regcache_raw_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
enum register_status regcache_cooked_read(struct regcache *regcache, int regnum, gdb_byte *buf)
#define obstack_grow_str(OBSTACK, STRING)
static LONGEST extract_signed_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
struct field_info ldinfo_datasize
ULONGEST rs6000_aix_ld_info_to_xml(struct gdbarch *gdbarch, const gdb_byte *ldi_buf, gdb_byte *readbuf, ULONGEST offset, ULONGEST len, int close_ldinfo_fd)
unsigned long long ULONGEST
void target_store_registers(struct regcache *regcache, int regno)
int register_size(struct gdbarch *gdbarch, int regnum)
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
#define obstack_grow_str0(OBSTACK, STRING)
struct type * value_type(const struct value *value)
static const char * rs6000_aix_auto_wide_charset(void)
const char * core_addr_to_string(const CORE_ADDR addr)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
static std::vector< CORE_ADDR > rs6000_software_single_step(struct regcache *regcache)
struct field_info ldinfo_next
#define TYPE_LENGTH(thistype)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
void set_gdbarch_iterate_over_regset_sections(struct gdbarch *gdbarch, gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
static struct ppc_reg_offsets rs6000_aix64_reg_offsets
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
static void rs6000_aix_shared_library_to_xml(struct ld_info *ldi, struct obstack *obstack)
int ppc_floating_point_unit_p(struct gdbarch *gdbarch)
enum bfd_endian byte_order
void error(const char *fmt,...)
void ppc_supply_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
struct field_info ldinfo_textorg
static CORE_ADDR rs6000_convert_from_func_ptr_addr(struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
void do_cleanups(struct cleanup *old_chain)
void regcache_cooked_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)