GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
amdgpu-tdep.c File Reference
#include "defs.h"
#include "amd-dbgapi-target.h"
#include "amdgpu-tdep.h"
#include "arch-utils.h"
#include "disasm.h"
#include "dwarf2/frame.h"
#include "frame-unwind.h"
#include "gdbarch.h"
#include "gdbsupport/selftest.h"
#include "gdbtypes.h"
#include "inferior.h"
#include "objfiles.h"
#include "observable.h"
#include "producer.h"
#include "reggroups.h"

Go to the source code of this file.

Classes

struct  amd_dbgapi_register_type
 
struct  amd_dbgapi_register_type_integer
 
struct  amd_dbgapi_register_type_float
 
struct  amd_dbgapi_register_type_double
 
struct  amd_dbgapi_register_type_vector
 
struct  amd_dbgapi_register_type_code_ptr
 
struct  amd_dbgapi_register_type_flags
 
struct  amd_dbgapi_register_type_flags::field
 
struct  amd_dbgapi_register_type_enum
 
struct  amd_dbgapi_register_type_enum::enumerator
 
struct  amdgpu_frame_cache
 

Macros

#define IDENTIFIER   "[A-Za-z0-9_.]+"
 
#define WS   "[ \t]+"
 
#define WSOPT   "[ \t]*"
 

Typedefs

using amd_dbgapi_register_type_up = std::unique_ptr<amd_dbgapi_register_type>
 
using amd_dbgapi_register_type_flags_up = std::unique_ptr<amd_dbgapi_register_type_flags>
 
using amd_dbgapi_register_type_enum_up = std::unique_ptr<amd_dbgapi_register_type_enum>
 
using amd_dbgapi_register_type_map = std::unordered_map<std::string, amd_dbgapi_register_type_up>
 

Functions

bool is_amdgpu_arch (struct gdbarch *arch)
 
amdgpu_gdbarch_tdepget_amdgpu_gdbarch_tdep (gdbarch *arch)
 
static return_value_convention amdgpu_return_value_as_value (gdbarch *arch, value *function, type *valtype, regcache *regcache, value **read_value, const gdb_byte *writebuf)
 
static const char * amdgpu_register_name (struct gdbarch *gdbarch, int regnum)
 
static int amdgpu_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_reg)
 
static ULONGEST try_strtoulst (gdb::string_view s)
 
static const amd_dbgapi_register_typeparse_amd_dbgapi_register_type (gdb::string_view type_name, amd_dbgapi_register_type_map &type_map)
 
static void parse_amd_dbgapi_register_type_enum_fields (amd_dbgapi_register_type_enum &enum_type, gdb::string_view fields)
 
static void parse_amd_dbgapi_register_type_flags_fields (amd_dbgapi_register_type_flags &flags_type, int bits, gdb::string_view name, gdb::string_view fields, amd_dbgapi_register_type_map &type_map)
 
static const amd_dbgapi_register_typeparse_amd_dbgapi_register_type_scalar (gdb::string_view name, amd_dbgapi_register_type_map &type_map)
 
static typeamd_dbgapi_register_type_to_gdb_type (const amd_dbgapi_register_type &type, struct gdbarch *gdbarch)
 
static typeamdgpu_register_type (struct gdbarch *gdbarch, int regnum)
 
static int amdgpu_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const reggroup *group)
 
static int amdgpu_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *)
 
static const gdb_byte * amdgpu_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
 
static amdgpu_frame_cache * amdgpu_frame_cache (frame_info_ptr this_frame, void **this_cache)
 
static void amdgpu_frame_this_id (frame_info_ptr this_frame, void **this_cache, frame_id *this_id)
 
static frame_id amdgpu_dummy_id (struct gdbarch *gdbarch, frame_info_ptr this_frame)
 
static struct valueamdgpu_frame_prev_register (frame_info_ptr this_frame, void **this_cache, int regnum)
 
static int print_insn_amdgpu (bfd_vma memaddr, struct disassemble_info *info)
 
static CORE_ADDR amdgpu_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
 
static bool amdgpu_supports_arch_info (const struct bfd_arch_info *info)
 
static struct gdbarchamdgpu_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
void _initialize_amdgpu_tdep ()
 

Variables

static const frame_unwind amdgpu_frame_unwind
 

Macro Definition Documentation

◆ IDENTIFIER

#define IDENTIFIER   "[A-Za-z0-9_.]+"

◆ WS

#define WS   "[ \t]+"

◆ WSOPT

#define WSOPT   "[ \t]*"

Typedef Documentation

◆ amd_dbgapi_register_type_enum_up

Definition at line 341 of file amdgpu-tdep.c.

◆ amd_dbgapi_register_type_flags_up

Definition at line 286 of file amdgpu-tdep.c.

◆ amd_dbgapi_register_type_map

using amd_dbgapi_register_type_map = std::unordered_map<std::string, amd_dbgapi_register_type_up>

Definition at line 344 of file amdgpu-tdep.c.

◆ amd_dbgapi_register_type_up

Definition at line 155 of file amdgpu-tdep.c.

Function Documentation

◆ _initialize_amdgpu_tdep()

void _initialize_amdgpu_tdep ( )

Definition at line 1376 of file amdgpu-tdep.c.

◆ amd_dbgapi_register_type_to_gdb_type()

static type * amd_dbgapi_register_type_to_gdb_type ( const amd_dbgapi_register_type & type,
struct gdbarch * gdbarch )
static

◆ amdgpu_breakpoint_kind_from_pc()

static int amdgpu_breakpoint_kind_from_pc ( struct gdbarch * gdbarch,
CORE_ADDR *  )
static

Definition at line 827 of file amdgpu-tdep.c.

◆ amdgpu_dummy_id()

static frame_id amdgpu_dummy_id ( struct gdbarch * gdbarch,
frame_info_ptr this_frame )
static

Definition at line 880 of file amdgpu-tdep.c.

◆ amdgpu_dwarf_reg_to_regnum()

static int amdgpu_dwarf_reg_to_regnum ( struct gdbarch * gdbarch,
int dwarf_reg )
static

◆ amdgpu_frame_cache()

static amdgpu_frame_cache * amdgpu_frame_cache ( frame_info_ptr this_frame,
void ** this_cache )
static

Definition at line 846 of file amdgpu-tdep.c.

◆ amdgpu_frame_prev_register()

static struct value * amdgpu_frame_prev_register ( frame_info_ptr this_frame,
void ** this_cache,
int regnum )
static

Definition at line 886 of file amdgpu-tdep.c.

◆ amdgpu_frame_this_id()

static void amdgpu_frame_this_id ( frame_info_ptr this_frame,
void ** this_cache,
frame_id * this_id )
static

Definition at line 862 of file amdgpu-tdep.c.

◆ amdgpu_gdbarch_init()

static struct gdbarch * amdgpu_gdbarch_init ( struct gdbarch_info info,
struct gdbarch_list * arches )
static

Definition at line 1030 of file amdgpu-tdep.c.

◆ amdgpu_register_name()

static const char * amdgpu_register_name ( struct gdbarch * gdbarch,
int regnum )
static

◆ amdgpu_register_reggroup_p()

static int amdgpu_register_reggroup_p ( struct gdbarch * gdbarch,
int regnum,
const reggroup * group )
static

Definition at line 806 of file amdgpu-tdep.c.

◆ amdgpu_register_type()

static type * amdgpu_register_type ( struct gdbarch * gdbarch,
int regnum )
static

Definition at line 776 of file amdgpu-tdep.c.

◆ amdgpu_return_value_as_value()

static return_value_convention amdgpu_return_value_as_value ( gdbarch * arch,
value * function,
type * valtype,
regcache * regcache,
value ** read_value,
const gdb_byte * writebuf )
static

Definition at line 57 of file amdgpu-tdep.c.

◆ amdgpu_skip_prologue()

static CORE_ADDR amdgpu_skip_prologue ( struct gdbarch * gdbarch,
CORE_ADDR start_pc )
static

Definition at line 993 of file amdgpu-tdep.c.

◆ amdgpu_supports_arch_info()

static bool amdgpu_supports_arch_info ( const struct bfd_arch_info * info)
static

Definition at line 1019 of file amdgpu-tdep.c.

◆ amdgpu_sw_breakpoint_from_kind()

static const gdb_byte * amdgpu_sw_breakpoint_from_kind ( struct gdbarch * gdbarch,
int kind,
int * size )
static

Definition at line 833 of file amdgpu-tdep.c.

◆ get_amdgpu_gdbarch_tdep()

amdgpu_gdbarch_tdep * get_amdgpu_gdbarch_tdep ( gdbarch * arch)

◆ is_amdgpu_arch()

bool is_amdgpu_arch ( struct gdbarch * arch)

◆ parse_amd_dbgapi_register_type()

static const amd_dbgapi_register_type & parse_amd_dbgapi_register_type ( gdb::string_view type_name,
amd_dbgapi_register_type_map & type_map )
static

◆ parse_amd_dbgapi_register_type_enum_fields()

static void parse_amd_dbgapi_register_type_enum_fields ( amd_dbgapi_register_type_enum & enum_type,
gdb::string_view fields )
static

◆ parse_amd_dbgapi_register_type_flags_fields()

static void parse_amd_dbgapi_register_type_flags_fields ( amd_dbgapi_register_type_flags & flags_type,
int bits,
gdb::string_view name,
gdb::string_view fields,
amd_dbgapi_register_type_map & type_map )
static

◆ parse_amd_dbgapi_register_type_scalar()

static const amd_dbgapi_register_type & parse_amd_dbgapi_register_type_scalar ( gdb::string_view name,
amd_dbgapi_register_type_map & type_map )
static

◆ print_insn_amdgpu()

static int print_insn_amdgpu ( bfd_vma memaddr,
struct disassemble_info * info )
static

Definition at line 905 of file amdgpu-tdep.c.

◆ try_strtoulst()

static ULONGEST try_strtoulst ( gdb::string_view s)
static

Variable Documentation

◆ amdgpu_frame_unwind

const frame_unwind amdgpu_frame_unwind
static
Initial value:
= {
"amdgpu",
nullptr,
nullptr,
nullptr,
}
static void amdgpu_frame_this_id(frame_info_ptr this_frame, void **this_cache, frame_id *this_id)
static struct value * amdgpu_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)
int default_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
enum unwind_stop_reason default_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
@ NORMAL_FRAME
Definition frame.h:187

Definition at line 892 of file amdgpu-tdep.c.