GDB (xrefs)

Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
regcache Class Reference

`#include "regcache.h"`

## Classes
struct | readonly_t

## Public Member Functions
| regcache (gdbarch *gdbarch)
| regcache (readonly_t, const regcache &src)
| DISABLE_COPY_AND_ASSIGN (regcache)
| ~regcache ()
gdbarch * | arch () const
const address_space * | aspace () const
void | save (regcache_cooked_read_ftype *cooked_read, void *src)
enum register_status | cooked_read (int regnum, gdb_byte *buf)
void | cooked_write (int regnum, const gdb_byte *buf)
enum register_status | raw_read (int regnum, gdb_byte *buf)
void | raw_write (int regnum, const gdb_byte *buf)
template<typename T , typename = RequireLongest<T>>
enum register_status | raw_read (int regnum, T *val)
template<typename T , typename = RequireLongest<T>>
void | raw_write (int regnum, T val)
struct value * | cooked_read_value (int regnum)
template<typename T , typename = RequireLongest<T>>
enum register_status | cooked_read (int regnum, T *val)
template<typename T , typename = RequireLongest<T>>
void | cooked_write (int regnum, T val)
void | raw_update (int regnum)
void | raw_collect (int regnum, void *buf) const
void | raw_collect_integer (int regnum, gdb_byte *addr, int addr_len, bool is_signed) const
void | raw_supply (int regnum, const void *buf)
void | raw_supply_integer (int regnum, const gdb_byte *addr, int addr_len, bool is_signed)
void | raw_supply_zeroed (int regnum)
enum register_status | get_register_status (int regnum) const
void | raw_set_cached_value (int regnum, const gdb_byte *buf)
void | invalidate (int regnum)
enum register_status | raw_read_part (int regnum, int offset, int len, gdb_byte *buf)
void | raw_write_part (int regnum, int offset, int len, const gdb_byte *buf)
enum register_status | cooked_read_part (int regnum, int offset, int len, gdb_byte *buf)
void | cooked_write_part (int regnum, int offset, int len, const gdb_byte *buf)
void | supply_regset (const struct regset *regset, int regnum, const void *buf, size_t size)
void | collect_regset (const struct regset *regset, int regnum, void *buf, size_t size) const
void | dump (ui_file *file, enum regcache_dump_what what_to_dump)
ptid_t | ptid () const
void | set_ptid (const ptid_t ptid)
void | debug_print_register (const char *func, int regno)

## Static Public Member Functions
static void | regcache_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid)

## Static Public Attributes
static constexpr readonly_t | readonly {}

## Protected Member Functions
| regcache (gdbarch *gdbarch, const address_space *aspace_, bool readonly_p_)
int | num_raw_registers () const

## Static Protected Attributes
static std::forward_list< regcache * > | current_regcache

## Private Member Functions
gdb_byte * | register_buffer (int regnum) const
void | restore (struct regcache *src)
enum register_status | xfer_part (int regnum, int offset, int len, void *in, const void *out, bool is_raw)
void | transfer_regset (const struct regset *regset, struct regcache *out_regcache, int regnum, const void *in_buf, void *out_buf, size_t size) const
void | assert_regnum (int regnum) const

## Private Attributes
struct regcache_descr * | m_descr
const address_space *const | m_aspace
gdb_byte * | m_registers
signed char * | m_register_status
const bool | m_readonly_p
ptid_t | m_ptid

## Friends
struct regcache * | get_thread_arch_aspace_regcache (ptid_t ptid, struct gdbarch *gdbarch, struct address_space *aspace)
void | registers_changed_ptid (ptid_t ptid)
void | regcache_cpy (struct regcache *dst, struct regcache *src)

## Detailed Description

Definition at line 232 of file regcache.h.

## Constructor & Destructor Documentation

## ◆ regcache() [1/3]

regcache::regcache | ( | gdbarch * | gdbarch | ) |
| inline

Definition at line 235 of file regcache.h.

Referenced by adjust_pc_after_break(), arm_get_next_pcs_raw(), breakpoint_kind(), btrace_add_pc(), do_target_wait(), fbsd_corefile_thread(), finish_step_over(), get_thread_arch_aspace_regcache(), get_traceframe_location(), handle_inferior_event_1(), handle_signal_stop(), handle_syscall_event(), linux_corefile_thread(), mi_cmd_data_write_register_values(), parse_spufs_run(), proceed(), record_full_restore(), record_full_save(), record_full_wait_1(), regcache_dup(), save_stop_reason(), save_waitstatus(), spu2ppu_sniffer(), stop_all_threads(), and thumb_get_next_pcs_raw().

## ◆ regcache() [2/3]

regcache::regcache | ( | readonly_t | ,
|  | const regcache & | src
| ) |  |

Definition at line 213 of file regcache.c.

References do_cooked_read(), gdb_assert, m_readonly_p, and save().

## ◆ ~regcache()

regcache::~regcache | ( |  | ) |
| inline

Definition at line 247 of file regcache.h.

References m_register_status, m_registers, and xfree().

## ◆ regcache() [3/3]

regcache::regcache | ( | gdbarch * | gdbarch,
|  | const address_space * | aspace_,
|  | bool | readonly_p_
| ) |  |
| protected

Definition at line 184 of file regcache.c.

References gdb_assert, gdbarch_num_regs(), m_descr, m_ptid, m_readonly_p, m_register_status, m_registers, minus_one_ptid, regcache_descr::nr_cooked_registers, regcache_descr(), regcache_descr::sizeof_cooked_registers, regcache_descr::sizeof_raw_registers, and XCNEWVEC.

## Member Function Documentation

## ◆ arch()

gdbarch * regcache::arch | ( |  | ) | const

Definition at line 221 of file regcache.c.

References regcache_descr::gdbarch, and m_descr.

Referenced by aarch32_gp_regcache_supply(), aarch64_fbsd_fetch_inferior_registers(), aarch64_fbsd_store_inferior_registers(), aarch64_software_single_step(), aarch64_store_return_value(), adjust_pc_after_break(), aix_thread_wait(), alpha_extract_return_value(), alpha_next_pc(), alpha_software_single_step(), alpha_store_return_value(), alphabsd_fetch_inferior_registers(), alphabsd_store_inferior_registers(), amd64_collect_fpregset(), amd64_collect_fxsave(), amd64_collect_native_gregset(), amd64_collect_xsave(), amd64_linux_fetch_inferior_registers(), amd64_linux_store_inferior_registers(), amd64_supply_fpregset(), amd64_supply_fxsave(), amd64_supply_native_gregset(), amd64_supply_xsave(), amd64bsd_fetch_inferior_registers(), amd64bsd_store_inferior_registers(), amd64obsd_collect_uthread(), amd64obsd_supply_uthread(), arc_write_pc(), arm_extract_return_value(), arm_fbsd_fetch_inferior_registers(), arm_fbsd_store_inferior_registers(), arm_is_thumb(), arm_linux_fetch_inferior_registers(), arm_linux_sigreturn_next_pc(), arm_linux_software_single_step(), arm_linux_store_inferior_registers(), arm_linux_supply_gregset(), arm_software_single_step(), arm_store_return_value(), arm_supply_gregset(), arm_write_pc(), assert_regnum(), bfin_extract_return_value(), bookmark_1(), BP_MANIPULATION(), branch_dest(), bsd_uthread_fetch_registers(), bsd_uthread_store_registers(), bx_write_pc(), cancel_breakpoint(), cris_extract_return_value(), cris_software_single_step(), cris_store_return_value(), cris_supply_gregset(), debug_print_register(), default_skip_permanent_breakpoint(), displaced_in_arm_mode(), displaced_step_prepare_throw(), do_target_wait(), do_windows_fetch_inferior_registers(), do_windows_store_inferior_registers(), dump(), e500_move_ev_register(), extended_mips16_next_pc(), fbsd_collect_thread_registers(), fetch_all_gp_regs(), fetch_altivec_register(), fetch_fp_regs(), fetch_fpregs_from_thread(), fetch_gp_regs(), fetch_gregs_from_thread(), fetch_ppc_registers(), fetch_register(), fetch_register_using_p(), fetch_regs_kernel_thread(), fetch_regs_user_thread(), fetch_spe_register(), fetch_vfp_regs(), fetch_vsx_register(), fill_fpregset(), fill_fprs(), fill_gprs32(), fill_gprs64(), fill_gregset(), fill_sprs32(), fill_sprs64(), fill_vrregset(), fill_vsxregset(), find_func_descr(), find_step_target(), frv_extract_return_value(), ft32_extract_return_value(), ft32_store_return_value(), gdbsim_fetch_register(), gdbsim_store_register(), get_core_registers(), get_return_value(), get_thread_arch_aspace_regcache(), gnu_fetch_registers(), gnu_store_registers(), go32_fetch_registers(), go32_store_registers(), h8300_extract_return_value(), h8300_store_return_value(), h8300h_extract_return_value(), h8300h_store_return_value(), handle_inferior_event_1(), handle_segmentation_fault(), handle_signal_stop(), hppa_linux_fetch_inferior_registers(), hppa_linux_store_inferior_registers(), i386_collect_fpregset(), i386_collect_gregset(), i386_darwin_fetch_inferior_registers(), i386_darwin_store_inferior_registers(), i386_linux_fetch_inferior_registers(), i386_linux_get_syscall_number_from_regcache(), i386_linux_resume(), i386_linux_store_inferior_registers(), i386_mmx_regnum_to_fp_regnum(), i386_mpx_bd_base(), i386_supply_fpregset(), i386_supply_gregset(), i386nto_supply_gregset(), i386obsd_collect_uthread(), i386obsd_supply_pcb(), i386obsd_supply_uthread(), i387_collect_fsave(), i387_collect_fxsave(), i387_collect_xsave(), i387_supply_fsave(), i387_supply_fxsave(), i387_supply_xsave(), ia64_extract_return_value(), ia64_linux_fetch_register(), ia64_linux_fetch_registers(), ia64_linux_store_register(), ia64_linux_store_registers(), ia64_store_return_value(), inf_child_fetch_inferior_registers(), inf_ptrace_fetch_register(), inf_ptrace_fetch_registers(), inf_ptrace_store_register(), inf_ptrace_store_registers(), iq2000_extract_return_value(), jit_frame_prev_register(), linux_collect_thread_registers(), linux_nat_wait_1(), lm32_extract_return_value(), lm32_store_return_value(), m32c_pseudo_register_read(), m32c_pseudo_register_write(), m32c_read_flg(), m32r_extract_return_value(), m32r_linux_collect_gregset(), m32r_linux_supply_gregset(), m32r_store_return_value(), m68k_svr4_extract_return_value(), m68k_svr4_store_return_value(), m68kbsd_collect_fpregset(), m68kbsd_supply_fpregset(), m88k_store_arguments(), mi_cmd_data_write_register_values(), micromips_next_pc(), mips16_next_pc(), mips32_next_pc(), mips64_fill_fpregset(), mips64_fill_gregset(), mips64_linux_regsets_fetch_registers(), mips64_linux_regsets_store_registers(), mips64_supply_fpregset(), mips64_supply_gregset(), mips_fbsd_collect_fpregs(), mips_fbsd_collect_fpregset(), mips_fbsd_collect_gregs(), mips_fbsd_collect_gregset(), mips_fbsd_fetch_inferior_registers(), mips_fbsd_store_inferior_registers(), mips_fbsd_supply_fpregs(), mips_fbsd_supply_fpregset(), mips_fbsd_supply_gregs(), mips_fbsd_supply_gregset(), mips_fill_fpregset(), mips_fill_gregset(), mips_linux_write_pc(), mips_next_pc(), mips_read_pc(), mips_software_single_step(), mips_supply_fpregset(), mips_supply_gregset(), mips_write_pc(), mipsnbsd_fetch_inferior_registers(), mipsnbsd_fill_fpreg(), mipsnbsd_fill_reg(), mipsnbsd_store_inferior_registers(), mipsnbsd_supply_fpreg(), mipsnbsd_supply_fpregset(), mipsnbsd_supply_gregset(), mipsnbsd_supply_reg(), moxie_extract_return_value(), moxie_software_single_step(), moxie_store_return_value(), nios2_get_next_pc(), num_raw_registers(), old_fetch_inferior_registers(), old_store_inferior_registers(), parse_spufs_run(), ppc_collect_fpregset(), ppc_collect_gregset(), ppc_collect_reg(), ppc_collect_vrregset(), ppc_collect_vsxregset(), ppc_deal_with_atomic_sequence(), ppc_linux_collect_gregset(), ppc_linux_supply_gregset(), ppc_linux_syscall_record(), ppc_linux_write_pc(), ppc_ravenscar_generic_fetch_registers(), ppc_ravenscar_generic_store_registers(), ppc_supply_fpregset(), ppc_supply_gregset(), ppc_supply_reg(), ppc_supply_vrregset(), ppc_supply_vsxregset(), ppcfbsd_fetch_inferior_registers(), ppcfbsd_store_inferior_registers(), ppcfbsd_supply_pcb(), ppcnbsd_fetch_inferior_registers(), ppcnbsd_store_inferior_registers(), ppcnbsd_supply_pcb(), ppcobsd_fetch_registers(), ppcobsd_store_registers(), ppcobsd_supply_pcb(), ppu2spu_prev_arch(), ppu2spu_prev_register(), proceed(), process_g_packet(), procfs_fetch_registers(), procfs_store_registers(), ravenscar_fetch_registers(), ravenscar_prepare_to_store(), ravenscar_store_registers(), raw_write(), record_btrace_fetch_registers(), record_full_core_fetch_registers(), record_full_core_open_1(), record_full_goto_insn(), record_full_message(), record_full_reg_alloc(), record_full_registers_change(), record_full_save(), record_full_store_registers(), record_full_wait_1(), record_linux_msghdr(), record_linux_sockaddr(), record_linux_system_call(), regcache_read_pc(), regcache_register_size(), regcache_write_pc(), register_changed_p(), remote_fetch_registers(), remote_prepare_to_store(), remote_store_registers(), restore_infcall_suspend_state(), resume_1(), resume_stopped_resumed_lwps(), return_command(), rs6000_fetch_inferior_registers(), rs6000_pseudo_register_read(), rs6000_pseudo_register_write(), rs6000_software_single_step(), rs6000_store_inferior_registers(), s390_all_but_pc_registers_record(), s390_linux_fetch_inferior_registers(), s390_linux_syscall_record(), s390_software_single_step(), s390_write_pc(), save_bookmark_command(), save_infcall_suspend_state(), save_stop_reason(), sentinel_frame_prev_arch(), sh64_extract_return_value(), sh64_store_return_value(), sh_corefile_collect_regset(), sh_corefile_supply_regset(), sh_extract_return_value_fpu(), sh_extract_return_value_nofpu(), sh_store_return_value_fpu(), sh_store_return_value_nofpu(), shnbsd_fetch_inferior_registers(), shnbsd_store_inferior_registers(), sparc32_store_arguments(), sparc32obsd_collect_uthread(), sparc32obsd_supply_uthread(), sparc64_collect_fpregset(), sparc64_collect_gregset(), sparc64_extract_floating_fields(), sparc64_linux_write_pc(), sparc64_store_arguments(), sparc64_store_floating_fields(), sparc64_supply_fpregset(), sparc64_supply_gregset(), sparc64nbsd_collect_fpregset(), sparc64nbsd_collect_gregset(), sparc64nbsd_supply_fpregset(), sparc64nbsd_supply_gregset(), sparc64obsd_collect_uthread(), sparc64obsd_supply_uthread(), sparc_analyze_control_transfer(), sparc_collect_rwindow(), sparc_fetch_inferior_registers(), sparc_linux_write_pc(), sparc_ravenscar_fetch_registers(), sparc_ravenscar_store_registers(), sparc_software_single_step(), sparc_store_inferior_registers(), sparc_supply_rwindow(), sparc_write_pc(), spu2ppu_prev_arch(), spu2ppu_prev_register(), spu_fetch_inferior_registers(), spu_fetch_registers(), spu_pseudo_register_read_spu(), spu_pseudo_register_write_spu(), spu_read_pc(), spu_software_single_step(), spu_store_registers(), store_all_gp_regs(), store_altivec_register(), store_fp_regs(), store_fpregs_to_thread(), store_gp_regs(), store_gregs_to_thread(), store_ppc_registers(), store_register(), store_register_using_P(), store_registers_using_G(), store_regs(), store_regs_kernel_thread(), store_regs_user_thread(), store_spe_register(), store_vfp_regs(), store_vsx_register(), supply_64bit_reg(), supply_fpregset(), supply_fprs(), supply_gprs64(), supply_gregset(), supply_gregset_reg(), supply_register_at_address(), supply_sprs32(), supply_sprs64(), supply_vrregset(), supply_vsxregset(), tfile_fetch_registers(), tic6x_get_next_pc(), tracefile_fetch_registers(), use_displaced_stepping(), v850_extract_return_value(), v850_store_return_value(), vax_store_arguments(), windows_resume(), xfer_part(), xtensa_extract_return_value(), xtensa_register_read_masked(), xtensa_register_write_masked(), xtensa_store_return_value(), and xtensa_supply_gregset().

## ◆ aspace()

const address_space* regcache::aspace | ( |  | ) | const
| inline

Definition at line 257 of file regcache.h.

References m_aspace.

Referenced by adjust_pc_after_break(), cancel_breakpoint(), create_sentinel_frame(), displaced_step_prepare_throw(), do_target_wait(), get_thread_arch_aspace_regcache(), get_thread_arch_regcache(), handle_inferior_event_1(), handle_signal_stop(), handle_syscall_event(), keep_going_pass_signal(), proceed(), record_full_exec_insn(), record_full_wait_1(), resume_1(), resume_stopped_resumed_lwps(), save_stop_reason(), save_waitstatus(), status_callback(), and thread_still_needs_step_over_bp().

## ◆ assert_regnum()

void regcache::assert_regnum | ( | int | regnum | ) | const
| private

Definition at line 393 of file regcache.c.

References arch(), gdb_assert, gdbarch_num_regs(), and regnum.

Referenced by invalidate(), raw_collect(), raw_collect_integer(), raw_read(), raw_read_part(), raw_supply(), raw_supply_integer(), raw_supply_zeroed(), raw_update(), raw_write(), and raw_write_part().

## ◆ collect_regset()

void regcache::collect_regset | ( | const struct regset * | regset,
|  | int | regnum,
|  | void * | buf,
|  | size_t | size
| ) |  | const

Definition at line 1219 of file regcache.c.

References regnum, size, and transfer_regset().

Referenced by aarch64_fbsd_store_inferior_registers(), arm_fbsd_store_inferior_registers(), and regcache_collect_regset().

## ◆ cooked_read() [1/2]

enum register_status regcache::cooked_read | ( | int | regnum,
|  | gdb_byte * | buf
| ) |  |

Definition at line 667 of file regcache.c.

References value::computed, gdb_assert, regcache_descr::gdbarch, gdbarch_pseudo_register_read(), gdbarch_pseudo_register_read_value(), gdbarch_pseudo_register_read_value_p(), m_descr, m_readonly_p, m_register_status, memset(), num_raw_registers(), raw_read(), REG_UNAVAILABLE, REG_UNKNOWN, REG_VALID, register_buffer(), regnum, regcache_descr::sizeof_register, value_contents_raw(), value_entirely_available(), value_free_to_mark(), and value_mark().

Referenced by cooked_read(), cooked_read_value(), gdbsim_store_register(), regcache_cooked_read(), regcache_cooked_read_signed(), regcache_cooked_read_unsigned(), regcache_save(), save(), and xfer_part().

## ◆ cooked_read() [2/2]

template<typename T , typename >

enum register_status regcache::cooked_read | ( | int | regnum,
|  | T * | val
| ) |  |

Definition at line 760 of file regcache.c.

References cooked_read(), gdb_assert, regcache_descr::gdbarch, gdbarch_byte_order(), m_descr, REG_VALID, regnum, regcache_descr::sizeof_register, and status.

## ◆ cooked_read_part()

enum register_status regcache::cooked_read_part | ( | int | regnum,
|  | int | offset,
|  | int | len,
|  | gdb_byte * | buf
| ) |  |

Definition at line 980 of file regcache.c.

References gdb_assert, offset, regnum, and xfer_part().

Referenced by regcache_cooked_read_part().

## ◆ cooked_read_value()

struct value * regcache::cooked_read_value | ( | int | regnum | ) |

Definition at line 720 of file regcache.c.

References allocate_value(), cooked_read(), gdb_assert, regcache_descr::gdbarch, gdbarch_pseudo_register_read_value(), gdbarch_pseudo_register_read_value_p(), lval_register, m_descr, m_readonly_p, m_register_status, mark_value_bytes_unavailable(), num_raw_registers(), REG_UNAVAILABLE, REG_UNKNOWN, register_type(), regnum, TYPE_LENGTH, value_contents_raw(), VALUE_LVAL, VALUE_REGNUM, and value_type().

Referenced by dump(), regcache_cooked_read_value(), and register_changed_p().

## ◆ cooked_write() [1/2]

void regcache::cooked_write | ( | int | regnum,
|  | const gdb_byte * | buf
| ) |  |

Definition at line 880 of file regcache.c.

References gdb_assert, regcache_descr::gdbarch, gdbarch_pseudo_register_write(), m_descr, num_raw_registers(), raw_write(), and regnum.

Referenced by cooked_write(), regcache_cooked_write(), regcache_cooked_write_signed(), regcache_cooked_write_unsigned(), restore(), and xfer_part().

## ◆ cooked_write() [2/2]

template<typename T , typename >

void regcache::cooked_write | ( | int | regnum,
|  | T | val
| ) |  |

Definition at line 794 of file regcache.c.

References cooked_write(), gdb_assert, regcache_descr::gdbarch, gdbarch_byte_order(), m_descr, regnum, regcache_descr::sizeof_register, and store_integer().

## ◆ cooked_write_part()

void regcache::cooked_write_part | ( | int | regnum,
|  | int | offset,
|  | int | len,
|  | const gdb_byte * | buf
| ) |  |

Definition at line 994 of file regcache.c.

References gdb_assert, offset, regnum, and xfer_part().

Referenced by regcache_cooked_write_part().

## ◆ debug_print_register()

void regcache::debug_print_register | ( | const char * | func,
|  | int | regno
| ) |  |

Definition at line 1281 of file regcache.c.

References arch(), gdbarch::byte_order, core_addr_to_string_nz(), extract_unsigned_integer(), fprintf_unfiltered(), func, gdb_stdlog, gdbarch_byte_order(), gdbarch_num_regs(), gdbarch_register_name(), plongest(), register_buffer(), register_size(), and size.

Referenced by target_fetch_registers(), and target_store_registers().

## ◆ DISABLE_COPY_AND_ASSIGN()

regcache::DISABLE_COPY_AND_ASSIGN | ( | regcache |  | ) |

## ◆ dump()

void regcache::dump | ( | ui_file * | file,
|  | enum regcache_dump_what | what_to_dump
| ) |  |

Definition at line 1325 of file regcache.c.

References arch(), cooked_read_value(), fprintf_unfiltered(), gdb_assert, regcache_descr::gdbarch, gdbarch_byte_order(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_register_name(), gdbarch_register_reggroup_p(), get_register_status(), m_descr, regcache_descr::nr_cooked_registers, num_raw_registers(), print_hex_chars(), raw_update(), REG_UNAVAILABLE, REG_UNKNOWN, REG_VALID, regcache_dump_cooked, regcache_dump_groups, regcache_dump_raw, regcache_dump_remote, reggroup_name(), reggroup_next(), register_buffer(), regcache_descr::register_offset, register_type(), regnum, release_value(), remote_register_number_and_offset(), regcache_descr::sizeof_register, startswith(), status, string, string_printf(), TYPE_NAME, value_contents_all(), value_entirely_available(), value_free(), and value_optimized_out().

Referenced by regcache_print().

## ◆ get_register_status()

enum register_status regcache::get_register_status | ( | int | regnum | ) | const

Definition at line 366 of file regcache.c.

References gdb_assert, m_readonly_p, m_register_status, num_raw_registers(), and regnum.

Referenced by dump(), raw_update(), raw_write(), and regcache_register_status().

## ◆ invalidate()

void regcache::invalidate | ( | int | regnum | ) |

Definition at line 385 of file regcache.c.

References assert_regnum(), gdb_assert, m_readonly_p, m_register_status, REG_UNKNOWN, and regnum.

Referenced by regcache_invalidate().

## ◆ num_raw_registers()

int regcache::num_raw_registers | ( |  | ) | const
| protected

Definition at line 1275 of file regcache.c.

References arch(), and gdbarch_num_regs().

Referenced by cooked_read(), cooked_read_value(), cooked_write(), dump(), and get_register_status().

## ◆ ptid()

ptid_t regcache::ptid | ( |  | ) | const
| inline

Definition at line 325 of file regcache.h.

References m_ptid.

Referenced by aarch64_linux_get_syscall_number(), aix_thread_wait(), amd64_linux_get_syscall_number(), arm_linux_get_syscall_number(), bfin_linux_get_syscall_number(), cancel_breakpoint(), displaced_step_prepare_throw(), enable_watchpoints_in_psr(), get_core_register_section(), get_thread_arch_aspace_regcache(), get_thread_arch_regcache(), get_thread_regcache(), get_thread_regcache_for_ptid(), i386_linux_get_syscall_number(), i386_linux_resume(), mips_linux_get_syscall_number(), parse_spufs_run(), ppc_linux_get_syscall_number(), process_stop_reply(), procfs_do_thread_registers(), ps_lgetfpregs(), ps_lgetregs(), ps_lsetfpregs(), ps_lsetregs(), regcache_get_ptid(), regcache_thread_ptid_changed(), registers_changed_ptid(), s390_linux_get_syscall_number(), set_ptid(), sparc32_linux_get_syscall_number(), sparc64_linux_get_syscall_number(), store_debug_register(), store_debug_register_pair(), and VEC().

## ◆ raw_collect()

void regcache::raw_collect | ( | int | regnum,
|  | void * | buf
| ) |  | const

Definition at line 1092 of file regcache.c.

References assert_regnum(), gdb_assert, m_descr, register_buffer(), regnum, size, and regcache_descr::sizeof_register.

Referenced by regcache_raw_collect(), and transfer_regset().

## ◆ raw_collect_integer()

void regcache::raw_collect_integer | ( | int | regnum,
|  | gdb_byte * | addr,
|  | int | addr_len,
|  | bool | is_signed
| ) |  | const

Definition at line 1116 of file regcache.c.

References assert_regnum(), gdbarch::byte_order, copy_integer_to_size(), regcache_descr::gdbarch, gdbarch_byte_order(), m_descr, register_buffer(), regnum, and regcache_descr::sizeof_register.

Referenced by mips64_fill_fpregset(), mips64_fill_gregset(), and mips_fbsd_collect_reg().

## ◆ raw_read() [1/2]

enum register_status regcache::raw_read | ( | int | regnum,
|  | gdb_byte * | buf
| ) |  |

Definition at line 571 of file regcache.c.

References gdb_assert, m_descr, m_register_status, memset(), raw_update(), REG_VALID, register_buffer(), regnum, and regcache_descr::sizeof_register.

Referenced by cooked_read(), raw_read(), regcache_raw_read(), regcache_raw_read_signed(), regcache_raw_read_unsigned(), sh64_pseudo_register_read(), sh64_pseudo_register_write(), and xfer_part().

## ◆ raw_read() [2/2]

template<typename T , typename >

enum register_status regcache::raw_read | ( | int | regnum,
|  | T * | val
| ) |  |

Definition at line 594 of file regcache.c.

References assert_regnum(), regcache_descr::gdbarch, gdbarch_byte_order(), m_descr, raw_read(), REG_VALID, regnum, regcache_descr::sizeof_register, and status.

## ◆ raw_read_part()

enum register_status regcache::raw_read_part | ( | int | regnum,
|  | int | offset,
|  | int | len,
|  | gdb_byte * | buf
| ) |  |

Definition at line 950 of file regcache.c.

References assert_regnum(), offset, regnum, and xfer_part().

Referenced by regcache_raw_read_part().

## ◆ raw_set_cached_value()

void regcache::raw_set_cached_value | ( | int | regnum,
|  | const gdb_byte * | buf
| ) |  |

Definition at line 823 of file regcache.c.

References m_descr, m_register_status, REG_VALID, register_buffer(), regnum, and regcache_descr::sizeof_register.

Referenced by raw_write(), and regcache_raw_set_cached_value().

## ◆ raw_supply()

void regcache::raw_supply | ( | int | regnum,
|  | const void * | buf
| ) |  |

Definition at line 1011 of file regcache.c.

References assert_regnum(), gdb_assert, m_descr, m_readonly_p, m_register_status, memset(), REG_UNAVAILABLE, REG_VALID, register_buffer(), regnum, size, and regcache_descr::sizeof_register.

Referenced by gdbsim_fetch_register(), regcache_raw_supply(), and transfer_regset().

## ◆ raw_supply_integer()

void regcache::raw_supply_integer | ( | int | regnum,
|  | const gdb_byte * | addr,
|  | int | addr_len,
|  | bool | is_signed
| ) |  |

Definition at line 1044 of file regcache.c.

References assert_regnum(), gdbarch::byte_order, copy_integer_to_size(), gdb_assert, regcache_descr::gdbarch, gdbarch_byte_order(), m_descr, m_readonly_p, m_register_status, REG_VALID, register_buffer(), regnum, and regcache_descr::sizeof_register.

Referenced by mips_fbsd_supply_reg(), and supply_32bit_reg().

## ◆ raw_supply_zeroed()

void regcache::raw_supply_zeroed | ( | int | regnum | ) |

Definition at line 1067 of file regcache.c.

References assert_regnum(), gdb_assert, m_descr, m_readonly_p, m_register_status, memset(), REG_VALID, register_buffer(), regnum, size, and regcache_descr::sizeof_register.

Referenced by am33_supply_gregset_method(), frv_linux_supply_gregset(), gdbsim_fetch_register(), mips64_supply_gregset(), mips_supply_fpregset(), and mips_supply_gregset().

## ◆ raw_update()

void regcache::raw_update | ( | int | regnum | ) |

Definition at line 543 of file regcache.c.

References assert_regnum(), get_register_status(), m_readonly_p, m_register_status, REG_UNAVAILABLE, REG_UNKNOWN, regnum, and target_fetch_registers().

Referenced by dump(), raw_read(), and regcache_raw_update().

## ◆ raw_write() [1/2]

void regcache::raw_write | ( | int | regnum,
|  | const gdb_byte * | buf
| ) |  |

Definition at line 839 of file regcache.c.

References arch(), assert_regnum(), gdb_assert, gdbarch_cannot_store_register(), get_register_status(), m_descr, m_readonly_p, raw_set_cached_value(), REG_VALID, register_buffer(), regnum, regcache_invalidator::release(), regcache_descr::sizeof_register, target_prepare_to_store, and target_store_registers().

Referenced by cooked_write(), raw_write(), regcache_raw_write(), regcache_raw_write_signed(), regcache_raw_write_unsigned(), sh64_pseudo_register_write(), and xfer_part().

## ◆ raw_write() [2/2]

template<typename T , typename >

void regcache::raw_write | ( | int | regnum,
|  | T | val
| ) |  |

Definition at line 628 of file regcache.c.

References assert_regnum(), regcache_descr::gdbarch, gdbarch_byte_order(), m_descr, raw_write(), regnum, regcache_descr::sizeof_register, and store_integer().

## ◆ raw_write_part()

void regcache::raw_write_part | ( | int | regnum,
|  | int | offset,
|  | int | len,
|  | const gdb_byte * | buf
| ) |  |

Definition at line 964 of file regcache.c.

References assert_regnum(), offset, regnum, and xfer_part().

Referenced by regcache_raw_write_part().

## ◆ regcache_thread_ptid_changed()

void regcache::regcache_thread_ptid_changed | ( | ptid_t | old_ptid,
|  | ptid_t | new_ptid
| ) |  |
| static

Definition at line 470 of file regcache.c.

References current_regcache, ptid(), ptid_equal(), and set_ptid().

Referenced by _initialize_regcache().

## ◆ register_buffer()

gdb_byte * regcache::register_buffer | ( | int | regnum | ) | const
| private

Definition at line 270 of file regcache.c.

References m_descr, m_registers, regcache_descr::register_offset, and regnum.

Referenced by cooked_read(), debug_print_register(), dump(), raw_collect(), raw_collect_integer(), raw_read(), raw_set_cached_value(), raw_supply(), raw_supply_integer(), raw_supply_zeroed(), raw_write(), restore(), and save().

## ◆ restore()

void regcache::restore | ( | struct regcache * | src | ) |
| private

Definition at line 318 of file regcache.c.

References cooked_write(), gdb_assert, regcache_descr::gdbarch, gdbarch_register_reggroup_p(), m_descr, m_readonly_p, m_register_status, regcache_descr::nr_cooked_registers, REG_VALID, register_buffer(), regnum, and restore_reggroup.

Referenced by regcache_cpy().

## ◆ save()

void regcache::save | ( | regcache_cooked_read_ftype * | cooked_read,
|  | void * | src
| ) |  |

Definition at line 283 of file regcache.c.

References cooked_read(), gdb_assert, regcache_descr::gdbarch, gdbarch_register_reggroup_p(), m_descr, m_readonly_p, m_register_status, m_registers, memset(), regcache_descr::nr_cooked_registers, REG_UNKNOWN, REG_VALID, register_buffer(), register_size(), regnum, save_reggroup, regcache_descr::sizeof_cooked_registers, and status.

Referenced by regcache(), and regcache_save().

## ◆ set_ptid()

void regcache::set_ptid | ( | const ptid_t | ptid | ) |
| inline

Definition at line 330 of file regcache.h.

References m_ptid, and ptid().

Referenced by get_thread_arch_aspace_regcache(), and regcache_thread_ptid_changed().

## ◆ supply_regset()

void regcache::supply_regset | ( | const struct regset * | regset,
|  | int | regnum,
|  | const void * | buf,
|  | size_t | size
| ) |  |

Definition at line 1200 of file regcache.c.

References regnum, size, and transfer_regset().

Referenced by aarch64_fbsd_fetch_inferior_registers(), arm_fbsd_fetch_inferior_registers(), and regcache_supply_regset().

## ◆ transfer_regset()

void regcache::transfer_regset | ( | const struct regset * | regset,
|  | struct regcache * | out_regcache,
|  | int | regnum,
|  | const void * | in_buf,
|  | void * | out_buf,
|  | size_t | size
| ) |  | const
| private

Definition at line 1133 of file regcache.c.

References regcache_map_entry::count, m_descr, raw_collect(), raw_supply(), REGCACHE_MAP_SKIP, regset::regmap, regcache_map_entry::regno, regnum, regcache_map_entry::size, size, and regcache_descr::sizeof_register.

Referenced by collect_regset(), and supply_regset().

## ◆ xfer_part()

enum register_status regcache::xfer_part | ( | int | regnum,
|  | int | offset,
|  | int | len,
|  | void * | in,
|  | const void * | out,
|  | bool | is_raw
| ) |  |
| private

Definition at line 900 of file regcache.c.

References arch(), cooked_read(), cooked_write(), gdb_assert, offset, raw_read(), raw_write(), REG_VALID, register_size(), regnum, and status.

Referenced by cooked_read_part(), cooked_write_part(), raw_read_part(), and raw_write_part().

## Friends And Related Function Documentation

## ◆ get_thread_arch_aspace_regcache

struct regcache* get_thread_arch_aspace_regcache | ( | ptid_t | ptid,
|  | struct gdbarch * | gdbarch,
|  | struct address_space * | aspace
| ) |  |
| friend

Definition at line 407 of file regcache.c.

## ◆ regcache_cpy

void regcache_cpy | ( | struct regcache * | dst,
|  | struct regcache * | src
| ) |  |
| friend

Definition at line 342 of file regcache.c.

## ◆ registers_changed_ptid

void registers_changed_ptid | ( | ptid_t | ptid | ) |
| friend

Definition at line 491 of file regcache.c.

## Member Data Documentation

## ◆ current_regcache

std::forward_list< regcache * > regcache::current_regcache
| static protected

Definition at line 345 of file regcache.h.

Referenced by get_thread_arch_aspace_regcache(), regcache_thread_ptid_changed(), and registers_changed_ptid().

## ◆ m_aspace

const address_space* const regcache::m_aspace
| private

Definition at line 367 of file regcache.h.

Referenced by aspace().

## ◆ m_descr

struct regcache_descr* regcache::m_descr
| private

Definition at line 363 of file regcache.h.

Referenced by arch(), cooked_read(), cooked_read_value(), cooked_write(), dump(), raw_collect(), raw_collect_integer(), raw_read(), raw_set_cached_value(), raw_supply(), raw_supply_integer(), raw_supply_zeroed(), raw_write(), regcache(), regcache_cpy(), register_buffer(), restore(), save(), and transfer_regset().

## ◆ m_ptid

ptid_t regcache::m_ptid
| private

Definition at line 384 of file regcache.h.

Referenced by ptid(), regcache(), and set_ptid().

## ◆ m_readonly_p

const bool regcache::m_readonly_p
| private

Definition at line 381 of file regcache.h.

Referenced by cooked_read(), cooked_read_value(), get_register_status(), invalidate(), raw_supply(), raw_supply_integer(), raw_supply_zeroed(), raw_update(), raw_write(), regcache(), regcache_cpy(), restore(), and save().

## ◆ m_register_status

signed char* regcache::m_register_status
| private

Definition at line 374 of file regcache.h.

Referenced by cooked_read(), cooked_read_value(), get_register_status(), invalidate(), raw_read(), raw_set_cached_value(), raw_supply(), raw_supply_integer(), raw_supply_zeroed(), raw_update(), regcache(), restore(), save(), and ~regcache().

## ◆ m_registers

gdb_byte* regcache::m_registers
| private

Definition at line 372 of file regcache.h.

Referenced by regcache(), register_buffer(), save(), and ~regcache().

## ◆ readonly

constexpr readonly_t regcache::readonly {}
| static

Definition at line 240 of file regcache.h.

Referenced by get_return_value(), and regcache_dup().

The documentation for this class was generated from the following files:

- /tmp/gdb-8.1/gdb/regcache.h
- /tmp/gdb-8.1/gdb/regcache.c