GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
arch-utils.c File Reference
#include "defs.h"
#include "arch-utils.h"
#include "gdbcmd.h"
#include "inferior.h"
#include "infrun.h"
#include "regcache.h"
#include "sim-regno.h"
#include "gdbcore.h"
#include "osabi.h"
#include "target-descriptions.h"
#include "objfiles.h"
#include "language.h"
#include "symtab.h"
#include "dummy-frame.h"
#include "frame-unwind.h"
#include "reggroups.h"
#include "auxv.h"
#include "observable.h"
#include "solib-target.h"
#include "gdbsupport/version.h"
#include "floatformat.h"
#include "dis-asm.h"
#include "gdbarch.c"

Go to the source code of this file.

Classes

struct  gdbarch_registration
 

Macros

#define GDBARCH_DEBUG   0
 

Enumerations

enum  set_arch { set_arch_auto , set_arch_manual }
 

Functions

bool default_displaced_step_hw_singlestep (struct gdbarch *gdbarch)
 
CORE_ADDR displaced_step_at_entry_point (struct gdbarch *gdbarch)
 
int legacy_register_sim_regno (struct gdbarch *gdbarch, int regnum)
 
CORE_ADDR default_remove_non_address_bits (struct gdbarch *gdbarch, CORE_ADDR pointer)
 
std::string default_memtag_to_string (struct gdbarch *gdbarch, struct value *tag)
 
bool default_tagged_address_p (struct gdbarch *gdbarch, struct value *address)
 
bool default_memtag_matches_p (struct gdbarch *gdbarch, struct value *address)
 
bool default_set_memtags (struct gdbarch *gdbarch, struct value *address, size_t length, const gdb::byte_vector &tags, memtag_type tag_type)
 
struct valuedefault_get_memtag (struct gdbarch *gdbarch, struct value *address, memtag_type tag_type)
 
CORE_ADDR generic_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR pc)
 
CORE_ADDR generic_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 
int generic_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
 
int generic_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 
int default_code_of_frame_writable (struct gdbarch *gdbarch, frame_info_ptr frame)
 
int core_addr_lessthan (CORE_ADDR lhs, CORE_ADDR rhs)
 
int core_addr_greaterthan (CORE_ADDR lhs, CORE_ADDR rhs)
 
CORE_ADDR core_addr_identity (struct gdbarch *gdbarch, CORE_ADDR addr)
 
CORE_ADDR convert_from_func_ptr_addr_identity (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
 
int no_op_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 
void default_coff_make_msymbol_special (int val, struct minimal_symbol *msym)
 
void default_make_symbol_special (struct symbol *sym, struct objfile *objfile)
 
CORE_ADDR default_adjust_dwarf2_addr (CORE_ADDR pc)
 
CORE_ADDR default_adjust_dwarf2_line (CORE_ADDR addr, int rel)
 
bool default_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op, struct dwarf2_frame_state *fs)
 
int cannot_register_not (struct gdbarch *gdbarch, int regnum)
 
void legacy_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
 
const struct floatformat ** default_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int len)
 
int generic_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
 
int default_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
 
int generic_instruction_nullified (struct gdbarch *gdbarch, struct regcache *regcache)
 
int default_remote_register_number (struct gdbarch *gdbarch, int regno)
 
int default_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
 
enum bfd_endian selected_byte_order (void)
 
static void show_endian (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_endian (const char *ignore_args, int from_tty, struct cmd_list_element *c)
 
static const struct bfd_arch_info * choose_architecture_for_target (const struct target_desc *target_desc, const struct bfd_arch_info *selected)
 
const char * selected_architecture_name (void)
 
static void show_architecture (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_architecture (const char *ignore_args, int from_tty, struct cmd_list_element *c)
 
int gdbarch_update_p (struct gdbarch_info info)
 
struct gdbarchgdbarch_from_bfd (bfd *abfd)
 
void set_gdbarch_from_file (bfd *abfd)
 
void initialize_current_architecture (void)
 
void gdbarch_info_fill (struct gdbarch_info *info)
 
struct gdbarchget_current_arch (void)
 
int default_has_shared_address_space (struct gdbarch *gdbarch)
 
int default_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, std::string *msg)
 
const gdb_byte * default_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
 
int default_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR *pcptr)
 
void default_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
 
int default_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
 
int default_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
 
int default_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
 
int default_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
 
bool default_program_breakpoint_here_p (struct gdbarch *gdbarch, CORE_ADDR address)
 
void default_skip_permanent_breakpoint (struct regcache *regcache)
 
CORE_ADDR default_infcall_mmap (CORE_ADDR size, unsigned prot)
 
void default_infcall_munmap (CORE_ADDR addr, CORE_ADDR size)
 
std::string default_gcc_target_options (struct gdbarch *gdbarch)
 
const char * default_gnu_triplet_regexp (struct gdbarch *gdbarch)
 
int default_addressable_memory_unit_size (struct gdbarch *gdbarch)
 
void default_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
 
int default_print_insn (bfd_vma memaddr, disassemble_info *info)
 
CORE_ADDR gdbarch_skip_prologue_noexcept (gdbarch *gdbarch, CORE_ADDR pc) noexcept
 
bool default_in_indirect_branch_thunk (gdbarch *gdbarch, CORE_ADDR pc)
 
ULONGEST default_type_align (struct gdbarch *gdbarch, struct type *type)
 
std::string default_get_pc_address_flags (frame_info_ptr frame, CORE_ADDR pc)
 
void default_read_core_file_mappings (struct gdbarch *gdbarch, struct bfd *cbfd, read_core_file_mappings_pre_loop_ftype pre_loop_cb, read_core_file_mappings_loop_ftype loop_cb)
 
bool default_use_target_description_from_corefile_notes (struct gdbarch *gdbarch, struct bfd *corefile_bfd)
 
CORE_ADDR default_get_return_buf_addr (struct type *val_type, frame_info_ptr cur_frame)
 
bool default_dwarf2_omit_typedef_p (struct type *target_type, const char *producer, const char *name)
 
static CORE_ADDR default_update_call_site_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static void show_gdbarch_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static const char * pformat (struct gdbarch *gdbarch, const struct floatformat **format)
 
static const char * pstring (const char *string)
 
static const char * pstring_ptr (char **string)
 
static const char * pstring_list (const char *const *list)
 
enum return_value_convention default_gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, struct value **read_value, const gdb_byte *writebuf)
 
obstack * gdbarch_obstack (gdbarch *arch)
 
char * gdbarch_obstack_strdup (struct gdbarch *arch, const char *string)
 
void gdbarch_free (struct gdbarch *arch)
 
struct gdbarch_tdep_basegdbarch_tdep_1 (struct gdbarch *gdbarch)
 
std::vector< const char * > gdbarch_printable_names ()
 
void gdbarch_register (enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep, gdbarch_supports_arch_info_ftype *supports_arch_info)
 
struct gdbarch_listgdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info)
 
struct gdbarchgdbarch_find_by_info (struct gdbarch_info info)
 
void set_target_gdbarch (struct gdbarch *new_gdbarch)
 
struct gdbarchtarget_gdbarch (void)
 
void _initialize_gdbarch_utils ()
 

Variables

static enum bfd_endian target_byte_order_user = BFD_ENDIAN_UNKNOWN
 
static const char endian_big [] = "big"
 
static const char endian_little [] = "little"
 
static const char endian_auto [] = "auto"
 
static const char *const endian_enum []
 
static const char * set_endian_string = endian_auto
 
static const struct bfd_arch_info * target_architecture_user
 
static const char * set_architecture_string
 
static const bfd_arch_info_type * default_bfd_arch
 
static const bfd_target * default_bfd_vec
 
static enum bfd_endian default_byte_order = BFD_ENDIAN_UNKNOWN
 
static std::vector< const char * > arches
 
unsigned int gdbarch_debug = GDBARCH_DEBUG
 
static struct gdbarch_registrationgdbarch_registry = NULL
 

Macro Definition Documentation

◆ GDBARCH_DEBUG

#define GDBARCH_DEBUG   0

Definition at line 1127 of file arch-utils.c.

Enumeration Type Documentation

◆ set_arch

enum set_arch
Enumerator
set_arch_auto 
set_arch_manual 

Definition at line 520 of file arch-utils.c.

Function Documentation

◆ _initialize_gdbarch_utils()

void _initialize_gdbarch_utils ( )

Definition at line 1506 of file arch-utils.c.

Referenced by initialize_all_files().

◆ cannot_register_not()

int cannot_register_not ( struct gdbarch * gdbarch,
int regnum )

Definition at line 249 of file arch-utils.c.

◆ choose_architecture_for_target()

static const struct bfd_arch_info * choose_architecture_for_target ( const struct target_desc * target_desc,
const struct bfd_arch_info * selected )
static

Definition at line 449 of file arch-utils.c.

References tdesc_architecture(), and tdesc_compatible_p().

Referenced by gdbarch_info_fill().

◆ convert_from_func_ptr_addr_identity()

CORE_ADDR convert_from_func_ptr_addr_identity ( struct gdbarch * gdbarch,
CORE_ADDR addr,
struct target_ops * targ )

Definition at line 197 of file arch-utils.c.

◆ core_addr_greaterthan()

int core_addr_greaterthan ( CORE_ADDR lhs,
CORE_ADDR rhs )

Definition at line 183 of file arch-utils.c.

Referenced by hppa_gdbarch_init(), and xstormy16_gdbarch_init().

◆ core_addr_identity()

CORE_ADDR core_addr_identity ( struct gdbarch * gdbarch,
CORE_ADDR addr )

Definition at line 191 of file arch-utils.c.

◆ core_addr_lessthan()

int core_addr_lessthan ( CORE_ADDR lhs,
CORE_ADDR rhs )

◆ default_addressable_memory_unit_size()

int default_addressable_memory_unit_size ( struct gdbarch * gdbarch)

Definition at line 1004 of file arch-utils.c.

References gdbarch_bfd_arch_info().

◆ default_adjust_dwarf2_addr()

CORE_ADDR default_adjust_dwarf2_addr ( CORE_ADDR pc)

Definition at line 226 of file arch-utils.c.

◆ default_adjust_dwarf2_line()

CORE_ADDR default_adjust_dwarf2_line ( CORE_ADDR addr,
int rel )

Definition at line 234 of file arch-utils.c.

◆ default_breakpoint_from_pc()

const gdb_byte * default_breakpoint_from_pc ( struct gdbarch * gdbarch,
CORE_ADDR * pcptr,
int * lenptr )

◆ default_breakpoint_kind_from_current_state()

int default_breakpoint_kind_from_current_state ( struct gdbarch * gdbarch,
struct regcache * regcache,
CORE_ADDR * pcptr )

Definition at line 882 of file arch-utils.c.

References gdbarch_breakpoint_kind_from_pc().

◆ default_code_of_frame_writable()

int default_code_of_frame_writable ( struct gdbarch * gdbarch,
frame_info_ptr frame )

Definition at line 168 of file arch-utils.c.

◆ default_coff_make_msymbol_special()

void default_coff_make_msymbol_special ( int val,
struct minimal_symbol * msym )

Definition at line 210 of file arch-utils.c.

◆ default_displaced_step_hw_singlestep()

bool default_displaced_step_hw_singlestep ( struct gdbarch * gdbarch)

Definition at line 48 of file arch-utils.c.

References gdbarch_software_single_step_p().

◆ default_dwarf2_omit_typedef_p()

bool default_dwarf2_omit_typedef_p ( struct type * target_type,
const char * producer,
const char * name )

Definition at line 1112 of file arch-utils.c.

◆ default_execute_dwarf_cfa_vendor_op()

bool default_execute_dwarf_cfa_vendor_op ( struct gdbarch * gdbarch,
gdb_byte op,
struct dwarf2_frame_state * fs )

Definition at line 242 of file arch-utils.c.

◆ default_fast_tracepoint_valid_at()

int default_fast_tracepoint_valid_at ( struct gdbarch * gdbarch,
CORE_ADDR addr,
std::string * msg )

Definition at line 863 of file arch-utils.c.

◆ default_floatformat_for_type()

const struct floatformat ** default_floatformat_for_type ( struct gdbarch * gdbarch,
const char * name,
int len )

◆ default_gcc_target_options()

std::string default_gcc_target_options ( struct gdbarch * gdbarch)

Definition at line 983 of file arch-utils.c.

References gdbarch_ptr_bit().

◆ default_gdbarch_return_value()

enum return_value_convention default_gdbarch_return_value ( struct gdbarch * gdbarch,
struct value * function,
struct type * valtype,
struct regcache * regcache,
struct value ** read_value,
const gdb_byte * writebuf )

Definition at line 1195 of file arch-utils.c.

References value::allocate().

Referenced by sparc64_init_abi(), and verify_gdbarch().

◆ default_gen_return_address()

void default_gen_return_address ( struct gdbarch * gdbarch,
struct agent_expr * ax,
struct axs_value * value,
CORE_ADDR scope )

Definition at line 891 of file arch-utils.c.

◆ default_get_memtag()

struct value * default_get_memtag ( struct gdbarch * gdbarch,
struct value * address,
memtag_type tag_type )

Definition at line 135 of file arch-utils.c.

◆ default_get_pc_address_flags()

std::string default_get_pc_address_flags ( frame_info_ptr frame,
CORE_ADDR pc )

Definition at line 1080 of file arch-utils.c.

◆ default_get_return_buf_addr()

CORE_ADDR default_get_return_buf_addr ( struct type * val_type,
frame_info_ptr cur_frame )

Definition at line 1106 of file arch-utils.c.

◆ default_gnu_triplet_regexp()

const char * default_gnu_triplet_regexp ( struct gdbarch * gdbarch)

Definition at line 993 of file arch-utils.c.

References gdbarch_bfd_arch_info().

◆ default_guess_tracepoint_registers()

void default_guess_tracepoint_registers ( struct gdbarch * gdbarch,
struct regcache * regcache,
CORE_ADDR addr )

◆ default_has_shared_address_space()

int default_has_shared_address_space ( struct gdbarch * gdbarch)

Definition at line 855 of file arch-utils.c.

◆ default_in_indirect_branch_thunk()

bool default_in_indirect_branch_thunk ( gdbarch * gdbarch,
CORE_ADDR pc )

Definition at line 1064 of file arch-utils.c.

◆ default_infcall_mmap()

CORE_ADDR default_infcall_mmap ( CORE_ADDR size,
unsigned prot )

Definition at line 968 of file arch-utils.c.

◆ default_infcall_munmap()

void default_infcall_munmap ( CORE_ADDR addr,
CORE_ADDR size )

Definition at line 974 of file arch-utils.c.

◆ default_insn_is_call()

int default_insn_is_call ( struct gdbarch * gdbarch,
CORE_ADDR addr )

Definition at line 908 of file arch-utils.c.

◆ default_insn_is_jump()

int default_insn_is_jump ( struct gdbarch * gdbarch,
CORE_ADDR addr )

Definition at line 918 of file arch-utils.c.

◆ default_insn_is_ret()

int default_insn_is_ret ( struct gdbarch * gdbarch,
CORE_ADDR addr )

Definition at line 913 of file arch-utils.c.

◆ default_make_symbol_special()

void default_make_symbol_special ( struct symbol * sym,
struct objfile * objfile )

Definition at line 218 of file arch-utils.c.

◆ default_memtag_matches_p()

bool default_memtag_matches_p ( struct gdbarch * gdbarch,
struct value * address )

Definition at line 115 of file arch-utils.c.

◆ default_memtag_to_string()

std::string default_memtag_to_string ( struct gdbarch * gdbarch,
struct value * tag )

Definition at line 97 of file arch-utils.c.

◆ default_print_insn()

int default_print_insn ( bfd_vma memaddr,
disassemble_info * info )

◆ default_program_breakpoint_here_p()

bool default_program_breakpoint_here_p ( struct gdbarch * gdbarch,
CORE_ADDR address )

◆ default_read_core_file_mappings()

void default_read_core_file_mappings ( struct gdbarch * gdbarch,
struct bfd * cbfd,
read_core_file_mappings_pre_loop_ftype pre_loop_cb,
read_core_file_mappings_loop_ftype loop_cb )

Definition at line 1087 of file arch-utils.c.

◆ default_remote_register_number()

int default_remote_register_number ( struct gdbarch * gdbarch,
int regno )

Definition at line 340 of file arch-utils.c.

◆ default_remove_non_address_bits()

CORE_ADDR default_remove_non_address_bits ( struct gdbarch * gdbarch,
CORE_ADDR pointer )

Definition at line 88 of file arch-utils.c.

◆ default_return_in_first_hidden_param_p()

int default_return_in_first_hidden_param_p ( struct gdbarch * gdbarch,
struct type * type )

◆ default_set_memtags()

bool default_set_memtags ( struct gdbarch * gdbarch,
struct value * address,
size_t length,
const gdb::byte_vector & tags,
memtag_type tag_type )

Definition at line 124 of file arch-utils.c.

◆ default_skip_permanent_breakpoint()

void default_skip_permanent_breakpoint ( struct regcache * regcache)

◆ default_stabs_argument_has_addr()

int default_stabs_argument_has_addr ( struct gdbarch * gdbarch,
struct type * type )

Definition at line 327 of file arch-utils.c.

Referenced by sparc64_init_abi().

◆ default_tagged_address_p()

bool default_tagged_address_p ( struct gdbarch * gdbarch,
struct value * address )

Definition at line 106 of file arch-utils.c.

◆ default_type_align()

ULONGEST default_type_align ( struct gdbarch * gdbarch,
struct type * type )

Definition at line 1072 of file arch-utils.c.

◆ default_update_call_site_pc()

static CORE_ADDR default_update_call_site_pc ( struct gdbarch * gdbarch,
CORE_ADDR pc )
static

Definition at line 1119 of file arch-utils.c.

◆ default_use_target_description_from_corefile_notes()

bool default_use_target_description_from_corefile_notes ( struct gdbarch * gdbarch,
struct bfd * corefile_bfd )

Definition at line 1097 of file arch-utils.c.

◆ default_vsyscall_range()

int default_vsyscall_range ( struct gdbarch * gdbarch,
struct mem_range * range )

Definition at line 349 of file arch-utils.c.

◆ displaced_step_at_entry_point()

CORE_ADDR displaced_step_at_entry_point ( struct gdbarch * gdbarch)

Definition at line 54 of file arch-utils.c.

References entry_point_address(), and gdbarch_breakpoint_from_pc().

Referenced by ppc_displaced_step_prepare().

◆ gdbarch_find_by_info()

struct gdbarch * gdbarch_find_by_info ( struct gdbarch_info info)

◆ gdbarch_free()

void gdbarch_free ( struct gdbarch * arch)

◆ gdbarch_from_bfd()

struct gdbarch * gdbarch_from_bfd ( bfd * abfd)

◆ gdbarch_info_fill()

void gdbarch_info_fill ( struct gdbarch_info * info)

◆ gdbarch_list_lookup_by_info()

struct gdbarch_list * gdbarch_list_lookup_by_info ( struct gdbarch_list * arches,
const struct gdbarch_info * info )

◆ gdbarch_obstack()

obstack * gdbarch_obstack ( gdbarch * arch)

◆ gdbarch_obstack_strdup()

char * gdbarch_obstack_strdup ( struct gdbarch * arch,
const char * string )

Definition at line 1220 of file arch-utils.c.

References gdbarch::obstack.

Referenced by nbsd_get_siginfo_type(), and reggroup_gdbarch_new().

◆ gdbarch_printable_names()

std::vector< const char * > gdbarch_printable_names ( )

◆ gdbarch_register()

void gdbarch_register ( enum bfd_architecture bfd_architecture ,
gdbarch_init_ftype * init,
gdbarch_dump_tdep_ftype * dump_tdep,
gdbarch_supports_arch_info_ftype * supports_arch_info )

◆ gdbarch_skip_prologue_noexcept()

CORE_ADDR gdbarch_skip_prologue_noexcept ( gdbarch * gdbarch,
CORE_ADDR pc )
noexcept

◆ gdbarch_tdep_1()

struct gdbarch_tdep_base * gdbarch_tdep_1 ( struct gdbarch * gdbarch)

Definition at line 1243 of file arch-utils.c.

References gdb_printf(), gdb_stdlog, and gdbarch_debug.

◆ gdbarch_update_p()

int gdbarch_update_p ( struct gdbarch_info info)

◆ generic_convert_register_p()

int generic_convert_register_p ( struct gdbarch * gdbarch,
int regnum,
struct type * type )

Definition at line 320 of file arch-utils.c.

◆ generic_in_solib_return_trampoline()

int generic_in_solib_return_trampoline ( struct gdbarch * gdbarch,
CORE_ADDR pc,
const char * name )

Definition at line 155 of file arch-utils.c.

◆ generic_instruction_nullified()

int generic_instruction_nullified ( struct gdbarch * gdbarch,
struct regcache * regcache )

Definition at line 333 of file arch-utils.c.

◆ generic_skip_solib_resolver()

CORE_ADDR generic_skip_solib_resolver ( struct gdbarch * gdbarch,
CORE_ADDR pc )

Definition at line 149 of file arch-utils.c.

◆ generic_skip_trampoline_code()

CORE_ADDR generic_skip_trampoline_code ( frame_info_ptr frame,
CORE_ADDR pc )

Definition at line 143 of file arch-utils.c.

◆ generic_stack_frame_destroyed_p()

int generic_stack_frame_destroyed_p ( struct gdbarch * gdbarch,
CORE_ADDR pc )

Definition at line 162 of file arch-utils.c.

◆ get_current_arch()

struct gdbarch * get_current_arch ( void )

Definition at line 846 of file arch-utils.c.

References get_frame_arch(), get_selected_frame(), has_stack_frames(), and target_gdbarch().

Referenced by add_solib_catchpoint(), add_symbol_file_command(), agent_eval_command_one(), break_command_1(), break_range_command(), catch_ada_exception_command(), catch_ada_handlers_command(), catch_assert_command(), catch_exec_command_1(), catch_fork_command_1(), catch_syscall_command_1(), catch_syscall_completer(), compile_to_object(), create_signal_catchpoint(), create_syscall_event_catchpoint(), create_tracepoint_from_upload(), disassemble_command(), disassembler_options_completer(), do_one_display(), do_set_command(), dprintf_command(), echo_command(), edit_command(), find_command(), ftrace_command(), gdbpy_print_insn(), gdbscm_current_arch(), gdbscm_make_value(), gdbscm_register_breakpoint_x(), gdbscm_value_call(), handle_gnu_v3_exceptions(), i386_mpx_enabled(), i386_mpx_get_bt_entry(), i386_mpx_info_bounds(), i386_mpx_print_bounds(), i386_mpx_set_bounds(), inferior_call_waitpid(), info_checkpoints_command(), info_exceptions_command(), info_line_command(), info_probes_for_spops(), core_target::info_proc(), info_proc_cmd_1(), jump_command(), list_command(), maint_agent_printf_command(), maintenance_print_architecture(), maintenance_print_reggroups(), maintenance_print_user_registers(), merge_uploaded_tracepoints(), mi_cmd_break_insert_1(), mi_cmd_catch_assert(), mi_cmd_catch_exception(), mi_cmd_catch_handlers(), mi_cmd_data_list_register_names(), mi_cmd_data_read_memory(), mi_cmd_data_read_memory_bytes(), mi_cmd_data_write_memory(), mi_cmd_data_write_memory_bytes(), mi_cmd_disassemble(), mi_cmd_info_ada_exceptions(), msp430_gdbarch_init(), overlay_load_command(), parse_cmd_to_aexpr(), parse_exp_in_context(), record_full_restore(), reg_or_group_completer_1(), set_charset_sfunc(), set_disassembler_options(), set_host_charset_sfunc(), set_target_charset_sfunc(), set_target_wide_charset_sfunc(), show_architecture(), show_convenience(), show_disassembler_options_sfunc(), show_disassembly_style_sfunc(), show_endian(), show_osabi(), show_target_charset_name(), show_target_wide_charset_name(), skip_function_command(), strace_command(), tfind_line_command(), trace_command(), tui_get_begin_asm_address(), tui_reg_command(), vlscm_binop_gdbthrow(), vlscm_rich_compare(), and vlscm_unop_gdbthrow().

◆ initialize_current_architecture()

void initialize_current_architecture ( void )

◆ legacy_register_sim_regno()

int legacy_register_sim_regno ( struct gdbarch * gdbarch,
int regnum )

◆ legacy_virtual_frame_pointer()

void legacy_virtual_frame_pointer ( struct gdbarch * gdbarch,
CORE_ADDR pc,
int * frame_regnum,
LONGEST * frame_offset )

◆ no_op_reg_to_regnum()

int no_op_reg_to_regnum ( struct gdbarch * gdbarch,
int reg )

Definition at line 204 of file arch-utils.c.

References value::reg.

◆ pformat()

static const char * pformat ( struct gdbarch * gdbarch,
const struct floatformat ** format )
static

Definition at line 1138 of file arch-utils.c.

References gdbarch_byte_order().

Referenced by gdbarch_dump().

◆ pstring()

static const char * pstring ( const char * string)
static

Definition at line 1148 of file arch-utils.c.

Referenced by gdbarch_dump().

◆ pstring_list()

static const char * pstring_list ( const char *const * list)
static

Definition at line 1167 of file arch-utils.c.

Referenced by gdbarch_dump().

◆ pstring_ptr()

static const char * pstring_ptr ( char ** string)
static

Definition at line 1156 of file arch-utils.c.

Referenced by gdbarch_dump().

◆ selected_architecture_name()

const char * selected_architecture_name ( void )

Definition at line 527 of file arch-utils.c.

References set_architecture_string, and target_architecture_user.

Referenced by gdbsim_target_open().

◆ selected_byte_order()

enum bfd_endian selected_byte_order ( void )

Definition at line 372 of file arch-utils.c.

References target_byte_order_user.

Referenced by gdbsim_target_open().

◆ set_architecture()

static void set_architecture ( const char * ignore_args,
int from_tty,
struct cmd_list_element * c )
static

◆ set_endian()

static void set_endian ( const char * ignore_args,
int from_tty,
struct cmd_list_element * c )
static

◆ set_gdbarch_from_file()

void set_gdbarch_from_file ( bfd * abfd)

◆ set_target_gdbarch()

void set_target_gdbarch ( struct gdbarch * new_gdbarch)

◆ show_architecture()

static void show_architecture ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

◆ show_endian()

static void show_endian ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 380 of file arch-utils.c.

References gdb_printf(), gdbarch_byte_order(), get_current_arch(), and target_byte_order_user.

Referenced by set_endian().

◆ show_gdbarch_debug()

static void show_gdbarch_debug ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 1131 of file arch-utils.c.

References gdb_printf().

◆ target_gdbarch()

struct gdbarch * target_gdbarch ( void )

Definition at line 1499 of file arch-utils.c.

References current_inferior(), and inferior::gdbarch.

Referenced by ada_get_tcb_types_info(), ada_lookup_simple_minsym(), ada_tag_value_at_base_address(), ada_tasks_inferior_data_sniffer(), add_symbol_overload_list_qualified(), add_vsyscall_page(), adi_print_versions(), adi_read_versions(), adi_write_versions(), remote_target::append_resumption(), arc_insn_dump(), arm_show_abi(), arm_update_current_architecture(), attach_command(), ppc_linux_nat_target::auxv_parse(), procfs_target::auxv_parse(), s390_linux_nat_target::auxv_parse(), bpfinishpy_handle_exit(), breakpoint_address_match(), breakpoint_address_match_range(), breakpoint_init_inferior(), breakpoint_location_address_range_overlap(), breakpoints_should_be_inserted_now(), bsd_uthread_activate(), bsd_uthread_check_magic(), bsd_uthread_lookup_offset(), bsd_uthread_read_memory_address(), btrace_compute_ftrace_bts(), btrace_insn_history(), build_traceframe_info(), procfs_target::can_use_hw_breakpoint(), catch_syscall_split_args(), check_for_saved(), check_for_saved(), check_for_saved(), clear_so(), clear_solib(), collection_list::collection_list(), compare_sections_command(), compile_object_load(), convert_one_symbol(), convert_one_symbol(), convert_symbol_bmsym(), convert_symbol_bmsym(), copy_sections(), cp_lookup_bare_symbol(), create_fetch_memtags_request(), create_store_memtags_request(), current_me_module(), d_lookup_symbol(), darwin_bfd_open(), darwin_check_osabi(), darwin_current_sos(), darwin_debug_regions(), darwin_debug_regions_recurse(), darwin_get_dyld_bfd(), darwin_load_image_infos(), darwin_read_exec_load_addr_at_init(), darwin_read_exec_load_addr_from_dyld(), darwin_solib_create_inferior_hook(), darwin_solib_read_all_image_info_addr(), darwin_validate_exec_header(), dcache_info_1(), dcache_print_line(), decode_loadmap(), default_auxv_parse(), default_gcore_arch(), default_gcore_target(), default_region_ok_for_hw_watchpoint(), detach_command(), display_one_tib(), do_assign(), do_examine(), do_examine(), dsbt_current_sos(), dsbt_print_loadmap(), dump_arc_instruction_command(), effective_target_file_system_kind(), elf_gnu_ifunc_resolve_by_cache(), elf_gnu_ifunc_resolve_by_got(), elf_locate_base(), enable_break(), enable_break(), enable_break(), enable_break2(), encode_actions_1(), exec_entry_point(), bsd_uthread_target::extra_thread_info(), fetch_loadmap(), fetch_loadmap(), core_target::fetch_memtags(), find_canonical_descriptor_in_load_object(), find_main_name(), fbsd_nat_target::find_memory_regions(), nbsd_nat_target::find_memory_regions(), finish_step_over(), remote_target::flash_erase(), flash_erase_command(), fprint_auxv_entry(), fprint_target_auxv(), free_so(), value::from_xmethod(), frv_current_sos(), frv_relocate_main_executable(), gcc_cplus_symbol_address(), gcc_symbol_address(), gcore_copy_callback(), gcore_copy_memtag_section_callback(), gcore_create_callback(), gcore_create_memtag_section_callback(), gcore_memory_sections(), gdb_bfd_lookup_symbol_from_symtab(), gdb_bfd_scan_elf_dyntag(), gdbarch_update_p(), gdbpy_lookup_objfile(), gdbsim_xfer_memory(), generic_load(), get_current_arch(), ravenscar_thread_target::get_fpu_state(), remote_target::get_memory_packet_size(), remote_target::get_remote_packet_size(), remote_target::get_remote_state(), get_running_thread_id(), tfile_target::get_trace_state_variable_value(), remote_target::get_trace_status(), gnu_xfer_auxv(), gnu_xfer_memory(), handle_one(), handle_solib_event(), i386_darwin_sstep_at_sigreturn(), i386_pseudo_register_read_into_value(), i386_pseudo_register_write(), in_solib_dynsym_resolve_code(), info_cb(), info_mappings_callback(), info_mem_command(), info_proc_mappings(), info_program_command(), info_sharedlibrary_command(), info_static_tracepoint_markers_command(), info_task(), remote_target::insert_breakpoint(), insert_breakpoint_locations(), remote_target::insert_hw_breakpoint(), procfs_target::insert_watchpoint(), remote_target::insert_watchpoint(), jit_breakpoint_re_set(), keep_going_stepped_thread(), ld_so_xfer_auxv(), lm_addr_check(), lm_base(), lm_base(), lm_info_read(), load_progress(), lookup_global_or_static_symbol(), language_defn::lookup_symbol_nonlocal(), ada_language::lookup_symbol_nonlocal(), maintenance_info_frame_unwinders(), maintenance_print_record_instruction(), maybe_new_address_space(), me_module_register_set(), memory_error(), memory_tag_check_command(), memory_tag_print_tag_command(), memory_tag_set_allocation_tag_command(), memory_tag_with_logical_tag_command(), memory_xfer_partial(), mi_cmd_trace_frame_collected(), mi_output_solib_attribs(), microblaze_fetch_instruction(), mips_linux_in_dynsym_stub(), mips_show_dr(), moxie_process_readu(), moxie_process_record(), nto_find_and_open_solib(), nto_init_solib_absolute_prefix(), nto_read_auxv_from_initial_stack(), nto_truncate_ptr(), mi_interp::on_memory_changed(), mi_interp::on_solib_unloaded(), nto_procfs_target::open(), open_symbol_file_object(), pspace_deleter::operator()(), parse_set_allocation_tag_input(), parse_static_tracepoint_marker_definition(), pd_enable(), post_create_inferior(), print_command_1(), print_one_breakpoint_location(), proc_watchpoint_address(), procfs_address_to_host_pointer(), ps_get_thread_area(), ps_lgetfpregs(), ps_lgetregs(), ps_lsetfpregs(), ps_lsetregs(), python_all_objfiles_removed(), python_inferior_exit(), python_on_inferior_call_post(), python_on_inferior_call_pre(), python_on_memory_change(), python_on_register_change(), python_on_resume(), ravenscar_inferior_created(), remote_target::read_description(), read_memory_robust(), read_program_header(), record_full_arch_list_add_mem(), record_full_open_1(), recpy_bt_insn_decoded(), regcache_print(), reload_shared_libraries(), remote_target::remote_add_inferior(), remote_address_masked(), remote_target::remote_check_symbols(), remote_target::remote_detach_1(), remote_target::remote_get_noisy_reply(), remote_read_description_p(), remote_target::remove_breakpoint(), remote_target::remove_hw_breakpoint(), remote_target::remove_watchpoint(), restore_one_section(), rl78_analyze_prologue(), rx_analyze_prologue(), scan_dyntag_auxv(), remote_target::search_memory(), set_use_libopcodes_styling(), setup_sections_data::setup_one_section(), should_validate_memtags(), show_addr_not_tagged(), show_fp_model(), show_mask_address(), show_mips_abi(), show_mipsfpu_command(), show_use_libopcodes_styling(), solib_bfd_open(), solib_create_inferior_hook(), solib_find(), solib_find_1(), solib_keep_data_in_core(), solib_map_sections(), solib_svr4_r_brk(), solib_svr4_r_ldsomap(), solib_svr4_r_map(), solib_svr4_r_next(), remote_target::start_remote_1(), status_callback(), store_regs(), collection_list::stringify(), svr4_current_sos(), svr4_exec_displacement(), svr4_fetch_link_map_offsets(), svr4_have_link_map_offsets(), svr4_read_so_list(), svr4_truncate_ptr(), target_find_description(), target_pre_inferior(), target_read(), target_read_uint32(), target_translate_tls_address(), target_write_with_progress(), tfile_get_traceframe_address(), bsd_uthread_target::thread_alive(), tfile_target::trace_find(), trace_save(), traceframe_walk_blocks(), update_address_spaces(), update_inserted_breakpoint_locations(), update_solib_breakpoints(), update_solib_list(), bsd_uthread_target::wait(), windows_solib_create_inferior_hook(), windows_xfer_shared_libraries(), write_gcore_file_1(), linux_nat_target::xfer_partial(), record_full_target::xfer_partial(), remote_target::xfer_partial(), tfile_target::xfer_partial(), rs6000_nat_target::xfer_shared_libraries(), z80_software_single_step(), munmap_list::~munmap_list(), and program_space::~program_space().

Variable Documentation

◆ arches

std::vector<const char *> arches
static

◆ default_bfd_arch

const bfd_arch_info_type* default_bfd_arch
static

Definition at line 671 of file arch-utils.c.

Referenced by gdbarch_info_fill(), and initialize_current_architecture().

◆ default_bfd_vec

const bfd_target* default_bfd_vec
static

Definition at line 678 of file arch-utils.c.

Referenced by initialize_current_architecture().

◆ default_byte_order

enum bfd_endian default_byte_order = BFD_ENDIAN_UNKNOWN
static

Definition at line 681 of file arch-utils.c.

Referenced by gdbarch_info_fill(), and initialize_current_architecture().

◆ endian_auto

const char endian_auto[] = "auto"
static

Definition at line 361 of file arch-utils.c.

Referenced by set_endian().

◆ endian_big

const char endian_big[] = "big"
static

Definition at line 359 of file arch-utils.c.

Referenced by set_endian().

◆ endian_enum

const char* const endian_enum[]
static
Initial value:
=
{
NULL,
}
static const char endian_little[]
Definition arch-utils.c:360
static const char endian_auto[]
Definition arch-utils.c:361
static const char endian_big[]
Definition arch-utils.c:359

Definition at line 362 of file arch-utils.c.

◆ endian_little

const char endian_little[] = "little"
static

Definition at line 360 of file arch-utils.c.

Referenced by set_endian().

◆ gdbarch_debug

unsigned int gdbarch_debug = GDBARCH_DEBUG

Definition at line 1129 of file arch-utils.c.

Referenced by gdbarch_addr_bit(), gdbarch_addr_bits_remove(), gdbarch_address_class_name_to_type_flags(), gdbarch_address_class_type_flags(), gdbarch_address_class_type_flags_to_name(), gdbarch_address_to_pointer(), gdbarch_addressable_memory_unit_size(), gdbarch_adjust_breakpoint_address(), gdbarch_adjust_dwarf2_addr(), gdbarch_adjust_dwarf2_line(), gdbarch_auto_charset(), gdbarch_auto_wide_charset(), gdbarch_auxv_parse(), gdbarch_ax_pseudo_register_collect(), gdbarch_ax_pseudo_register_push_stack(), gdbarch_believe_pcc_promotion(), gdbarch_bfd_arch_info(), gdbarch_bfloat16_bit(), gdbarch_bfloat16_format(), gdbarch_breakpoint_from_pc(), gdbarch_breakpoint_kind_from_current_state(), gdbarch_breakpoint_kind_from_pc(), gdbarch_byte_order(), gdbarch_byte_order_for_code(), gdbarch_call_dummy_location(), gdbarch_cannot_fetch_register(), gdbarch_cannot_step_breakpoint(), gdbarch_cannot_store_register(), gdbarch_char_signed(), gdbarch_code_of_frame_writable(), gdbarch_coff_make_msymbol_special(), gdbarch_convert_from_func_ptr_addr(), gdbarch_convert_register_p(), gdbarch_core_info_proc(), gdbarch_core_pid_to_str(), gdbarch_core_read_description(), gdbarch_core_read_x86_xsave_layout(), gdbarch_core_thread_name(), gdbarch_core_xfer_shared_libraries(), gdbarch_core_xfer_shared_libraries_aix(), gdbarch_core_xfer_siginfo(), gdbarch_create_memtag_section(), gdbarch_decode_memtag_section(), gdbarch_decr_pc_after_break(), gdbarch_deprecated_fp_regnum(), gdbarch_deprecated_function_start_offset(), gdbarch_disassembler_options(), gdbarch_disassembler_options_implicit(), gdbarch_displaced_step_buffer_length(), gdbarch_displaced_step_copy_insn(), gdbarch_displaced_step_copy_insn_closure_by_addr(), gdbarch_displaced_step_finish(), gdbarch_displaced_step_fixup(), gdbarch_displaced_step_hw_singlestep(), gdbarch_displaced_step_prepare(), gdbarch_displaced_step_restore_all_in_ptid(), gdbarch_double_bit(), gdbarch_double_format(), gdbarch_dtrace_disable_probe(), gdbarch_dtrace_enable_probe(), gdbarch_dtrace_parse_probe_argument(), gdbarch_dtrace_probe_is_enabled(), gdbarch_dummy_id(), gdbarch_dwarf2_addr_size(), gdbarch_dwarf2_omit_typedef_p(), gdbarch_dwarf2_reg_to_regnum(), gdbarch_ecoff_reg_to_regnum(), gdbarch_elf_make_msymbol_special(), gdbarch_execute_dwarf_cfa_vendor_op(), gdbarch_fast_tracepoint_valid_at(), gdbarch_fetch_pointer_argument(), gdbarch_fetch_tls_load_module_address(), gdbarch_fill_memtag_section(), gdbarch_find_by_info(), gdbarch_find_memory_regions(), gdbarch_float_bit(), gdbarch_float_format(), gdbarch_floatformat_for_type(), gdbarch_fp0_regnum(), gdbarch_frame_align(), gdbarch_frame_args_skip(), gdbarch_frame_num_args(), gdbarch_frame_red_zone_size(), gdbarch_gcc_target_options(), gdbarch_gcore_bfd_target(), gdbarch_gdb_signal_from_target(), gdbarch_gdb_signal_to_target(), gdbarch_gen_return_address(), gdbarch_get_longjmp_target(), gdbarch_get_memtag(), gdbarch_get_pc_address_flags(), gdbarch_get_return_buf_addr(), gdbarch_get_siginfo_type(), gdbarch_get_syscall_number(), gdbarch_get_thread_local_address(), gdbarch_gnu_triplet_regexp(), gdbarch_guess_tracepoint_registers(), gdbarch_half_bit(), gdbarch_half_format(), gdbarch_has_dos_based_file_system(), gdbarch_has_global_breakpoints(), gdbarch_has_global_solist(), gdbarch_has_shared_address_space(), gdbarch_have_nonsteppable_watchpoint(), gdbarch_in_indirect_branch_thunk(), gdbarch_in_solib_return_trampoline(), gdbarch_infcall_mmap(), gdbarch_infcall_munmap(), gdbarch_info_proc(), gdbarch_inner_than(), gdbarch_insn_is_call(), gdbarch_insn_is_jump(), gdbarch_insn_is_ret(), gdbarch_int_bit(), gdbarch_integer_to_address(), gdbarch_iterate_over_objfiles_in_search_order(), gdbarch_iterate_over_regset_sections(), gdbarch_long_bit(), gdbarch_long_double_bit(), gdbarch_long_double_format(), gdbarch_long_long_bit(), gdbarch_make_corefile_notes(), gdbarch_make_symbol_special(), gdbarch_max_insn_length(), gdbarch_memory_insert_breakpoint(), gdbarch_memory_remove_breakpoint(), gdbarch_memtag_granule_size(), gdbarch_memtag_matches_p(), gdbarch_memtag_to_string(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_osabi(), gdbarch_overlay_update(), gdbarch_pc_regnum(), gdbarch_pointer_to_address(), gdbarch_print_auxv_entry(), gdbarch_print_float_info(), gdbarch_print_insn(), gdbarch_print_registers_info(), gdbarch_print_vector_info(), gdbarch_process_record(), gdbarch_process_record_signal(), gdbarch_program_breakpoint_here_p(), gdbarch_ps_regnum(), gdbarch_pseudo_register_read(), gdbarch_pseudo_register_read_value(), gdbarch_pseudo_register_write(), gdbarch_ptr_bit(), gdbarch_push_dummy_call(), gdbarch_push_dummy_code(), gdbarch_ravenscar_ops(), gdbarch_read_core_file_mappings(), gdbarch_read_pc(), gdbarch_record_special_symbol(), gdbarch_register(), gdbarch_register_name(), gdbarch_register_reggroup_p(), gdbarch_register_sim_regno(), gdbarch_register_to_value(), gdbarch_register_type(), gdbarch_relocate_instruction(), gdbarch_remote_register_number(), gdbarch_remove_non_address_bits(), gdbarch_report_signal_info(), gdbarch_return_in_first_hidden_param_p(), gdbarch_return_value_as_value(), gdbarch_sdb_reg_to_regnum(), gdbarch_set_memtags(), gdbarch_short_bit(), gdbarch_single_step_through_delay(), gdbarch_skip_entrypoint(), gdbarch_skip_main_prologue(), gdbarch_skip_permanent_breakpoint(), gdbarch_skip_prologue(), gdbarch_skip_solib_resolver(), gdbarch_skip_trampoline_code(), gdbarch_so_ops(), gdbarch_software_single_step(), gdbarch_sofun_address_maybe_missing(), gdbarch_solib_symbols_extension(), gdbarch_sp_regnum(), gdbarch_stab_reg_to_regnum(), gdbarch_stabs_argument_has_addr(), gdbarch_stack_frame_destroyed_p(), gdbarch_stap_adjust_register(), gdbarch_stap_gdb_register_prefix(), gdbarch_stap_gdb_register_suffix(), gdbarch_stap_integer_prefixes(), gdbarch_stap_integer_suffixes(), gdbarch_stap_is_single_operand(), gdbarch_stap_parse_special_token(), gdbarch_stap_register_indirection_prefixes(), gdbarch_stap_register_indirection_suffixes(), gdbarch_stap_register_prefixes(), gdbarch_stap_register_suffixes(), gdbarch_sw_breakpoint_from_kind(), gdbarch_syscalls_info(), gdbarch_tagged_address_p(), gdbarch_target_desc(), gdbarch_tdep_1(), gdbarch_type_align(), gdbarch_unwind_pc(), gdbarch_unwind_sp(), gdbarch_update_call_site_pc(), gdbarch_update_p(), gdbarch_use_target_description_from_corefile_notes(), gdbarch_valid_disassembler_options(), gdbarch_value_from_register(), gdbarch_value_to_register(), gdbarch_vbit_in_delta(), gdbarch_virtual_frame_pointer(), gdbarch_vsyscall_range(), gdbarch_vtable_function_descriptors(), gdbarch_wchar_bit(), gdbarch_wchar_signed(), gdbarch_write_pc(), gdbarch_xml_syscall_file(), ia64_dummy_id(), ia64_frame_this_id(), ia64_sigtramp_frame_this_id(), and mips_gdbarch_init().

◆ gdbarch_registry

struct gdbarch_registration* gdbarch_registry = NULL
static

Definition at line 1268 of file arch-utils.c.

Referenced by gdbarch_find_by_info(), gdbarch_printable_names(), and gdbarch_register().

◆ set_architecture_string

const char* set_architecture_string
static

◆ set_endian_string

const char* set_endian_string = endian_auto
static

Definition at line 369 of file arch-utils.c.

Referenced by set_endian().

◆ target_architecture_user

const struct bfd_arch_info* target_architecture_user
static

◆ target_byte_order_user

enum bfd_endian target_byte_order_user = BFD_ENDIAN_UNKNOWN
static

Definition at line 357 of file arch-utils.c.

Referenced by gdbarch_info_fill(), selected_byte_order(), set_endian(), and show_endian().