GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
dtrace-probe.c File Reference
#include "defs.h"
#include "probe.h"
#include "elf-bfd.h"
#include "gdbtypes.h"
#include "obstack.h"
#include "objfiles.h"
#include "complaints.h"
#include "value.h"
#include "ax.h"
#include "ax-gdb.h"
#include "language.h"
#include "parser-defs.h"
#include "inferior.h"
#include "expop.h"

Go to the source code of this file.

Classes

struct  dtrace_probe_arg
 
struct  dtrace_probe_enabler
 
class  dtrace_static_probe_ops
 
class  dtrace_probe
 
struct  dtrace_dof_hdr
 
struct  dtrace_dof_sect
 
struct  dtrace_dof_provider
 
struct  dtrace_dof_probe
 

Macros

#define SHT_SUNW_dof   0x6ffffff4
 
#define DOF_UINT(dof, field)
 
#define DTRACE_DOF_PTR(dof, offset)   (&((char *) (dof))[(offset)])
 
#define DTRACE_DOF_SECT(dof, idx)
 

Enumerations

enum  dtrace_dof_sect_type {
  DTRACE_DOF_SECT_TYPE_NONE = 0 , DTRACE_DOF_SECT_TYPE_ECBDESC = 3 , DTRACE_DOF_SECT_TYPE_STRTAB = 8 , DTRACE_DOF_SECT_TYPE_PROVIDER = 15 ,
  DTRACE_DOF_SECT_TYPE_PROBES = 16 , DTRACE_DOF_SECT_TYPE_PRARGS = 17 , DTRACE_DOF_SECT_TYPE_PROFFS = 18 , DTRACE_DOF_SECT_TYPE_PRENOFFS = 26
}
 
enum  dtrace_dof_ident {
  DTRACE_DOF_ID_MAG0 = 0 , DTRACE_DOF_ID_MAG1 = 1 , DTRACE_DOF_ID_MAG2 = 2 , DTRACE_DOF_ID_MAG3 = 3 ,
  DTRACE_DOF_ID_ENCODING = 5
}
 
enum  dtrace_dof_encoding { DTRACE_DOF_ENCODE_LSB = 1 , DTRACE_DOF_ENCODE_MSB = 2 }
 

Functions

static void dtrace_process_dof_probe (struct objfile *objfile, struct gdbarch *gdbarch, std::vector< std::unique_ptr< probe > > *probesp, struct dtrace_dof_hdr *dof, struct dtrace_dof_probe *probe, struct dtrace_dof_provider *provider, char *strtab, char *offtab, char *eofftab, char *argtab, uint64_t strtab_size)
 
static void dtrace_process_dof (asection *sect, struct objfile *objfile, std::vector< std::unique_ptr< probe > > *probesp, struct dtrace_dof_hdr *dof)
 
static void info_probes_dtrace_command (const char *arg, int from_tty)
 
void _initialize_dtrace_probe ()
 

Variables

const dtrace_static_probe_ops dtrace_static_probe_ops {}
 

Macro Definition Documentation

◆ DOF_UINT

#define DOF_UINT ( dof,
field )
Value:
extract_unsigned_integer ((gdb_byte *) &(field), \
sizeof ((field)), \
(((dof)->dofh_ident[DTRACE_DOF_ID_ENCODING] \
? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE))
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
Definition defs.h:480
@ DTRACE_DOF_ENCODE_MSB
@ DTRACE_DOF_ID_ENCODING

Definition at line 352 of file dtrace-probe.c.

Referenced by dtrace_process_dof(), and dtrace_process_dof_probe().

◆ DTRACE_DOF_PTR

#define DTRACE_DOF_PTR ( dof,
offset )   (&((char *) (dof))[(offset)])

Definition at line 363 of file dtrace-probe.c.

Referenced by dtrace_process_dof().

◆ DTRACE_DOF_SECT

#define DTRACE_DOF_SECT ( dof,
idx )
Value:
((struct dtrace_dof_sect *) \
DTRACE_DOF_PTR ((dof), \
DOF_UINT ((dof), (dof)->dofh_secoff) \
+ ((idx) * DOF_UINT ((dof), (dof)->dofh_secsize))))
#define DTRACE_DOF_PTR(dof, offset)
#define DOF_UINT(dof, field)

Definition at line 369 of file dtrace-probe.c.

Referenced by dtrace_process_dof().

◆ SHT_SUNW_dof

#define SHT_SUNW_dof   0x6ffffff4

Definition at line 41 of file dtrace-probe.c.

Referenced by dtrace_static_probe_ops::get_probes().

Enumeration Type Documentation

◆ dtrace_dof_encoding

Enumerator
DTRACE_DOF_ENCODE_LSB 
DTRACE_DOF_ENCODE_MSB 

Definition at line 228 of file dtrace-probe.c.

◆ dtrace_dof_ident

Enumerator
DTRACE_DOF_ID_MAG0 
DTRACE_DOF_ID_MAG1 
DTRACE_DOF_ID_MAG2 
DTRACE_DOF_ID_MAG3 
DTRACE_DOF_ID_ENCODING 

Definition at line 212 of file dtrace-probe.c.

◆ dtrace_dof_sect_type

Enumerator
DTRACE_DOF_SECT_TYPE_NONE 
DTRACE_DOF_SECT_TYPE_ECBDESC 
DTRACE_DOF_SECT_TYPE_STRTAB 
DTRACE_DOF_SECT_TYPE_PROVIDER 
DTRACE_DOF_SECT_TYPE_PROBES 
DTRACE_DOF_SECT_TYPE_PRARGS 
DTRACE_DOF_SECT_TYPE_PROFFS 
DTRACE_DOF_SECT_TYPE_PRENOFFS 

Definition at line 183 of file dtrace-probe.c.

Function Documentation

◆ _initialize_dtrace_probe()

void _initialize_dtrace_probe ( )

Definition at line 894 of file dtrace-probe.c.

Referenced by initialize_all_files().

◆ dtrace_process_dof()

static void dtrace_process_dof ( asection * sect,
struct objfile * objfile,
std::vector< std::unique_ptr< probe > > * probesp,
struct dtrace_dof_hdr * dof )
static

◆ dtrace_process_dof_probe()

static void dtrace_process_dof_probe ( struct objfile * objfile,
struct gdbarch * gdbarch,
std::vector< std::unique_ptr< probe > > * probesp,
struct dtrace_dof_hdr * dof,
struct dtrace_dof_probe * probe,
struct dtrace_dof_provider * provider,
char * strtab,
char * offtab,
char * eofftab,
char * argtab,
uint64_t strtab_size )
static

◆ info_probes_dtrace_command()

static void info_probes_dtrace_command ( const char * arg,
int from_tty )
static

Definition at line 887 of file dtrace-probe.c.

References info_probes_for_spops().

Variable Documentation

◆ dtrace_static_probe_ops

const dtrace_static_probe_ops dtrace_static_probe_ops {}

Definition at line 103 of file dtrace-probe.c.

Referenced by dtrace_probe::get_static_ops().