GDB (xrefs)

Classes | Macros | Functions | Variables
/tmp/gdb-8.1/gdb/rs6000-aix-tdep.c File Reference
`#include "defs.h"`
`#include "osabi.h"`
`#include "regcache.h"`
`#include "regset.h"`
`#include "gdbtypes.h"`
`#include "gdbcore.h"`
`#include "target.h"`
`#include "value.h"`
`#include "infcall.h"`
`#include "objfiles.h"`
`#include "breakpoint.h"`
`#include "rs6000-tdep.h"`
`#include "ppc-tdep.h"`
`#include "rs6000-aix-tdep.h"`
`#include "xcoffread.h"`
`#include "solib.h"`
`#include "solib-aix.h"`
`#include "target-float.h"`
`#include "xml-utils.h"`

Go to the source code of this file.

## Classes
struct | field_info
struct | ld_info_desc
struct | ld_info

## Macros
#define | SIG_FRAME_PC_OFFSET 96
#define | SIG_FRAME_LR_OFFSET 108
#define | SIG_FRAME_FP_OFFSET 284

## Functions
static void | rs6000_aix_supply_regset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
static void | rs6000_aix_collect_regset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len)
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 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)
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 CORE_ADDR | rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
static CORE_ADDR | branch_dest (struct regcache *regcache, int opcode, int instr, CORE_ADDR pc, CORE_ADDR safety)
static std::vector< CORE_ADDR > | rs6000_software_single_step (struct regcache *regcache)
static const char * | rs6000_aix_auto_wide_charset (void)
static enum gdb_osabi | rs6000_aix_osabi_sniffer (bfd *abfd)
static struct ld_info | rs6000_aix_extract_ld_info (struct gdbarch *gdbarch, const gdb_byte *ldi_buf)
static void | rs6000_aix_shared_library_to_xml (struct ld_info *ldi, struct obstack *obstack)
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)
static ULONGEST | rs6000_aix_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
static void | rs6000_aix_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
void | _initialize_rs6000_aix_tdep (void)

## Variables
static struct ppc_reg_offsets | rs6000_aix32_reg_offsets
static struct ppc_reg_offsets | rs6000_aix64_reg_offsets
static const struct regset | rs6000_aix32_regset
static const struct regset | rs6000_aix64_regset
static const struct ld_info_desc | ld_info32_desc
static const struct ld_info_desc | ld_info64_desc

## Macro Definition Documentation

## ◆ SIG_FRAME_FP_OFFSET

#define SIG_FRAME_FP_OFFSET 284

Definition at line 51 of file rs6000-aix-tdep.c.

## ◆ SIG_FRAME_LR_OFFSET

#define SIG_FRAME_LR_OFFSET 108

Definition at line 50 of file rs6000-aix-tdep.c.

## ◆ SIG_FRAME_PC_OFFSET

#define SIG_FRAME_PC_OFFSET 96

Definition at line 49 of file rs6000-aix-tdep.c.

Referenced by branch_dest().

## Function Documentation

## ◆ _initialize_rs6000_aix_tdep()

void _initialize_rs6000_aix_tdep | ( | void |  | ) |

Definition at line 1089 of file rs6000-aix-tdep.c.

References GDB_OSABI_AIX, gdbarch_register_osabi(), gdbarch_register_osabi_sniffer(), rs6000_aix_init_osabi(), and rs6000_aix_osabi_sniffer().

## ◆ branch_dest()

static CORE_ADDR branch_dest | ( | struct regcache * | regcache,
|  | int | opcode,
|  | int | instr,
|  | CORE_ADDR | pc,
|  | CORE_ADDR | safety
| ) |  |
| static

Definition at line 600 of file rs6000-aix-tdep.c.

References AIX_TEXT_SEGMENT_BASE, regcache::arch(), gdbarch_byte_order(), gdbarch_tdep(), get_current_frame(), get_frame_base(), gdbarch_tdep::pc, gdbarch_tdep::ppc_ctr_regnum, gdbarch_tdep::ppc_lr_regnum, read_memory_unsigned_integer(), regcache_raw_get_unsigned(), SIG_FRAME_PC_OFFSET, and gdbarch_tdep::wordsize.

Referenced by rs6000_software_single_step().

## ◆ rs6000_aix_auto_wide_charset()

static const char* rs6000_aix_auto_wide_charset | ( | void |  | ) |
| static

Definition at line 719 of file rs6000-aix-tdep.c.

Referenced by rs6000_aix_init_osabi().

## ◆ rs6000_aix_collect_regset()

static void rs6000_aix_collect_regset | ( | const struct regset * | regset,
|  | const struct regcache * | regcache,
|  | int | regnum,
|  | void * | gregs,
|  | size_t | len
| ) |  |
| static

Definition at line 126 of file rs6000-aix-tdep.c.

References ppc_collect_fpregset(), ppc_collect_gregset(), and regnum.

## ◆ rs6000_aix_core_xfer_shared_libraries_aix()

static ULONGEST rs6000_aix_core_xfer_shared_libraries_aix | ( | struct gdbarch * | gdbarch,
|  | gdb_byte * | readbuf,
|  | ULONGEST | offset,
|  | ULONGEST | len
| ) |  |
| static

Definition at line 1003 of file rs6000-aix-tdep.c.

References _, core_bfd, do_cleanups(), error(), make_cleanup(), offset, rs6000_aix_ld_info_to_xml(), xfree(), and xmalloc().

Referenced by rs6000_aix_init_osabi().

## ◆ rs6000_aix_extract_ld_info()

static struct ld_info rs6000_aix_extract_ld_info | ( | struct gdbarch * | gdbarch,
|  | const gdb_byte * | ldi_buf
| ) |  |
| static

Definition at line 869 of file rs6000-aix-tdep.c.

References builtin_type::builtin_data_ptr, builtin_type(), ld_info::dataorg, ld_info::datasize, extract_signed_integer(), extract_typed_address(), extract_unsigned_integer(), ld_info::fd, ld_info::filename, gdbarch_byte_order(), gdbarch_tdep(), ld_info32_desc, ld_info64_desc, ld_info_desc::ldinfo_dataorg, ld_info_desc::ldinfo_datasize, ld_info_desc::ldinfo_fd, ld_info_desc::ldinfo_filename, ld_info_desc::ldinfo_next, ld_info_desc::ldinfo_textorg, ld_info_desc::ldinfo_textsize, ld_info::member_name, ld_info::next, field_info::offset, field_info::size, ld_info::textorg, ld_info::textsize, and gdbarch_tdep::wordsize.

Referenced by rs6000_aix_ld_info_to_xml().

## ◆ rs6000_aix_init_osabi()

static void rs6000_aix_init_osabi | ( | struct gdbarch_info | info,
|  | struct gdbarch * | gdbarch
| ) |  |
| static

Definition at line 1036 of file rs6000-aix-tdep.c.

References gdbarch_tdep(), gdbarch_tdep::lr_frame_offset, rs6000_aix_auto_wide_charset(), rs6000_aix_core_xfer_shared_libraries_aix(), rs6000_aix_iterate_over_regset_sections(), rs6000_convert_from_func_ptr_addr(), rs6000_push_dummy_call(), rs6000_return_value(), rs6000_software_single_step(), set_gdbarch_auto_wide_charset(), set_gdbarch_convert_from_func_ptr_addr(), set_gdbarch_core_xfer_shared_libraries_aix(), set_gdbarch_displaced_step_copy_insn(), set_gdbarch_displaced_step_fixup(), set_gdbarch_displaced_step_location(), set_gdbarch_frame_red_zone_size(), set_gdbarch_iterate_over_regset_sections(), set_gdbarch_long_double_bit(), set_gdbarch_push_dummy_call(), set_gdbarch_return_value(), set_gdbarch_software_single_step(), set_gdbarch_wchar_bit(), set_gdbarch_wchar_signed(), set_solib_ops(), solib_aix_so_ops, TARGET_CHAR_BIT, and gdbarch_tdep::wordsize.

Referenced by _initialize_rs6000_aix_tdep().

## ◆ rs6000_aix_iterate_over_regset_sections()

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

Definition at line 153 of file rs6000-aix-tdep.c.

References rs6000_aix32_regset, rs6000_aix64_regset, and wordsize.

Referenced by rs6000_aix_init_osabi().

## ◆ rs6000_aix_ld_info_to_xml()

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
| ) |  |

Definition at line 959 of file rs6000-aix-tdep.c.

References ld_info::fd, ld_info::next, obstack_grow_str, obstack_grow_str0, offset, rs6000_aix_extract_ld_info(), and rs6000_aix_shared_library_to_xml().

Referenced by rs6000_aix_core_xfer_shared_libraries_aix(), and rs6000_xfer_shared_libraries().

## ◆ rs6000_aix_osabi_sniffer()

static enum gdb_osabi rs6000_aix_osabi_sniffer | ( | bfd * | abfd | ) |
| static

Definition at line 732 of file rs6000-aix-tdep.c.

References gdb_assert, GDB_OSABI_AIX, GDB_OSABI_UNKNOWN, and xcoff_get_n_import_files().

Referenced by _initialize_rs6000_aix_tdep().

## ◆ rs6000_aix_shared_library_to_xml()

static void rs6000_aix_shared_library_to_xml | ( | struct ld_info * | ldi,
|  | struct obstack * | obstack
| ) |  |
| static

Definition at line 908 of file rs6000-aix-tdep.c.

References core_addr_to_string(), ld_info::dataorg, ld_info::datasize, ld_info::filename, ld_info::member_name, obstack_grow_str, pulongest(), string, ld_info::textorg, ld_info::textsize, and xml_escape_text().

Referenced by rs6000_aix_ld_info_to_xml().

## ◆ rs6000_aix_supply_regset()

static void rs6000_aix_supply_regset | ( | const struct regset * | regset,
|  | struct regcache * | regcache,
|  | int | regnum,
|  | const void * | gregs,
|  | size_t | len
| ) |  |
| static

Definition at line 112 of file rs6000-aix-tdep.c.

References ppc_supply_fpregset(), ppc_supply_gregset(), and regnum.

## ◆ rs6000_convert_from_func_ptr_addr()

static CORE_ADDR rs6000_convert_from_func_ptr_addr | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | addr,
|  | struct target_ops * | targ
| ) |  |
| static

Definition at line 555 of file rs6000-aix-tdep.c.

References CATCH, END_CATCH, find_pc_section(), gdbarch_byte_order(), gdbarch_tdep(), read_memory_unsigned_integer(), RETURN_MASK_ERROR, obj_section::the_bfd_section, TRY, and gdbarch_tdep::wordsize.

Referenced by rs6000_aix_init_osabi().

## ◆ rs6000_push_dummy_call()

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
| ) |  |
| static

Definition at line 182 of file rs6000-aix-tdep.c.

References check_typedef(), find_function_addr(), fp_regnum, gdb_assert, gdbarch_byte_order(), gdbarch_sp_regnum(), gdbarch_tdep(), memset(), ppc_floating_point_unit_p(), gdbarch_tdep::ppc_fp0_regnum, gdbarch_tdep::ppc_gp0_regnum, gdbarch_tdep::ppc_lr_regnum, PPC_MAX_REGISTER_SIZE, gdbarch_tdep::ppc_toc_regnum, regcache_cooked_read_unsigned(), regcache_cooked_write(), regcache_raw_write_signed(), regcache_raw_write_unsigned(), register_size(), register_type(), solib_aix_get_toc_value(), store_unsigned_integer(), target_float_convert(), target_store_registers(), type, TYPE_CODE, TYPE_CODE_FLT, TYPE_LENGTH, value_contents(), value_type(), gdbarch_tdep::wordsize, wordsize, and write_memory().

Referenced by rs6000_aix_init_osabi().

## ◆ rs6000_return_value()

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

Definition at line 415 of file rs6000-aix-tdep.c.

References gdb_assert, gdbarch_byte_order(), gdbarch_tdep(), ppc_floating_point_unit_p(), gdbarch_tdep::ppc_fp0_regnum, gdbarch_tdep::ppc_gp0_regnum, gdbarch_tdep::ppc_vr0_regnum, regcache_cooked_read(), regcache_cooked_read_unsigned(), regcache_cooked_write(), regcache_cooked_write_unsigned(), register_type(), RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, store_unsigned_integer(), target_float_convert(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_FLT, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_LENGTH, TYPE_VECTOR, unpack_long(), and gdbarch_tdep::wordsize.

Referenced by rs6000_aix_init_osabi().

## ◆ rs6000_software_single_step()

static std::vector<CORE_ADDR> rs6000_software_single_step | ( | struct regcache * | regcache | ) |
| static

Definition at line 677 of file rs6000-aix-tdep.c.

References regcache::arch(), branch_dest(), gdbarch::byte_order, gdbarch_byte_order(), loc, ppc_deal_with_atomic_sequence(), PPC_INSN_SIZE, read_memory_integer(), and regcache_read_pc().

Referenced by rs6000_aix_init_osabi().

## Variable Documentation

## ◆ ld_info32_desc

const struct ld_info_desc ld_info32_desc
| static

Initial value:
=
{
{0, 4},
{4, 4},
{8, 4},
{12, 4},
{16, 4},
{20, 4},
{24, 2},
}

Definition at line 822 of file rs6000-aix-tdep.c.

Referenced by rs6000_aix_extract_ld_info().

## ◆ ld_info64_desc

const struct ld_info_desc ld_info64_desc
| static

Initial value:
=
{
{0, 4},
{8, 4},
{16, 8},
{24, 8},
{32, 8},
{40, 8},
{48, 2},
}

Definition at line 835 of file rs6000-aix-tdep.c.

Referenced by rs6000_aix_extract_ld_info().

## ◆ rs6000_aix32_reg_offsets

struct ppc_reg_offsets rs6000_aix32_reg_offsets
| static

Initial value:
=
{
208,
4,
4,
24,
28,
32,
36,
40,
44,
48,
336,
56,
4,
-1,
-1,
-1
}

Definition at line 56 of file rs6000-aix-tdep.c.

## ◆ rs6000_aix32_regset

const struct regset rs6000_aix32_regset
| static

Initial value:
=
{
&rs6000_aix32_reg_offsets,
rs6000_aix_supply_regset,
rs6000_aix_collect_regset,
}
rs6000_aix32_reg_offsets
static struct ppc_reg_offsets rs6000_aix32_reg_offsets
Definition: rs6000-aix-tdep.c:56
rs6000_aix_supply_regset
static void rs6000_aix_supply_regset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
Definition: rs6000-aix-tdep.c:112
rs6000_aix_collect_regset
static void rs6000_aix_collect_regset(const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len)
Definition: rs6000-aix-tdep.c:126

Definition at line 136 of file rs6000-aix-tdep.c.

Referenced by rs6000_aix_iterate_over_regset_sections().

## ◆ rs6000_aix64_reg_offsets

struct ppc_reg_offsets rs6000_aix64_reg_offsets
| static

Initial value:
=
{
0,
8,
4,
264,
256,
288,
272,
280,
292,
-1,
312,
296,
4,
-1,
-1,
-1
}

Definition at line 81 of file rs6000-aix-tdep.c.

## ◆ rs6000_aix64_regset

const struct regset rs6000_aix64_regset
| static

Initial value:
=
{
&rs6000_aix64_reg_offsets,
rs6000_aix_supply_regset,
rs6000_aix_collect_regset,
}
rs6000_aix_supply_regset
static void rs6000_aix_supply_regset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
Definition: rs6000-aix-tdep.c:112
rs6000_aix_collect_regset
static void rs6000_aix_collect_regset(const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len)
Definition: rs6000-aix-tdep.c:126
rs6000_aix64_reg_offsets
static struct ppc_reg_offsets rs6000_aix64_reg_offsets
Definition: rs6000-aix-tdep.c:81

Definition at line 143 of file rs6000-aix-tdep.c.

Referenced by rs6000_aix_iterate_over_regset_sections().