GDB (xrefs)
Classes | Macros | Functions | Variables
/tmp/gdb-8.1/gdb/fbsd-tdep.c File Reference
#include "defs.h"
#include "auxv.h"
#include "gdbcore.h"
#include "inferior.h"
#include "regcache.h"
#include "regset.h"
#include "gdbthread.h"
#include "xml-syscall.h"
#include "elf-bfd.h"
#include "fbsd-tdep.h"

Go to the source code of this file.

Classes

struct  fbsd_gdbarch_data
 
struct  fbsd_collect_regset_section_cb_data
 
struct  fbsd_corefile_thread_data
 

Macros

#define LWPINFO_OFFSET   0x4
 
#define LWPINFO_PL_FLAGS   0x8
 
#define LWPINFO64_PL_SIGINFO   0x30
 
#define LWPINFO32_PL_SIGINFO   0x2c
 
#define PL_FLAG_SI   0x20 /* siginfo is valid */
 
#define SIZE64_SIGINFO_T   80
 
#define SIZE32_SIGINFO_T   64
 
#define _TAGNAME(tag)   #tag
 
#define TAGNAME(tag)   _TAGNAME(AT_##tag)
 
#define TAG(tag, text, kind)   case AT_FREEBSD_##tag: name = TAGNAME(tag); description = text; format = kind; break
 

Functions

static void * init_fbsd_gdbarch_data (struct gdbarch *gdbarch)
 
static struct fbsd_gdbarch_dataget_fbsd_gdbarch_data (struct gdbarch *gdbarch)
 
static const char * fbsd_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
 
static const char * fbsd_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr)
 
static LONGEST fbsd_core_xfer_siginfo (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
 
static int find_signalled_thread (struct thread_info *info, void *data)
 
static void fbsd_collect_regset_section_cb (const char *sect_name, int size, const struct regset *regset, const char *human_name, void *cb_data)
 
static char * fbsd_collect_thread_registers (const struct regcache *regcache, ptid_t ptid, bfd *obfd, char *note_data, int *note_size, enum gdb_signal stop_signal)
 
static void fbsd_corefile_thread (struct thread_info *info, struct fbsd_corefile_thread_data *args)
 
static char * fbsd_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
 
static void fbsd_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val)
 
static struct typefbsd_get_siginfo_type (struct gdbarch *gdbarch)
 
static LONGEST fbsd_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
 
void fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
void _initialize_fbsd_tdep (void)
 

Variables

static struct gdbarch_datafbsd_gdbarch_data_handle
 

Macro Definition Documentation

◆ _TAGNAME

#define _TAGNAME (   tag)    #tag

◆ LWPINFO32_PL_SIGINFO

#define LWPINFO32_PL_SIGINFO   0x2c

Definition at line 46 of file fbsd-tdep.c.

Referenced by fbsd_core_xfer_siginfo().

◆ LWPINFO64_PL_SIGINFO

#define LWPINFO64_PL_SIGINFO   0x30

Definition at line 45 of file fbsd-tdep.c.

Referenced by fbsd_core_xfer_siginfo().

◆ LWPINFO_OFFSET

#define LWPINFO_OFFSET   0x4

Definition at line 41 of file fbsd-tdep.c.

Referenced by fbsd_core_xfer_siginfo().

◆ LWPINFO_PL_FLAGS

#define LWPINFO_PL_FLAGS   0x8

Definition at line 44 of file fbsd-tdep.c.

Referenced by fbsd_core_xfer_siginfo().

◆ PL_FLAG_SI

#define PL_FLAG_SI   0x20 /* siginfo is valid */

Definition at line 49 of file fbsd-tdep.c.

Referenced by fbsd_core_xfer_siginfo().

◆ SIZE32_SIGINFO_T

#define SIZE32_SIGINFO_T   64

Definition at line 53 of file fbsd-tdep.c.

Referenced by fbsd_core_xfer_siginfo().

◆ SIZE64_SIGINFO_T

#define SIZE64_SIGINFO_T   80

Definition at line 52 of file fbsd-tdep.c.

Referenced by fbsd_core_xfer_siginfo().

◆ TAG

#define TAG (   tag,
  text,
  kind 
)    case AT_FREEBSD_##tag: name = TAGNAME(tag); description = text; format = kind; break

Referenced by fbsd_print_auxv_entry().

◆ TAGNAME

#define TAGNAME (   tag)    _TAGNAME(AT_##tag)

Function Documentation

◆ _initialize_fbsd_tdep()

void _initialize_fbsd_tdep ( void  )

◆ fbsd_collect_regset_section_cb()

static void fbsd_collect_regset_section_cb ( const char *  sect_name,
int  size,
const struct regset regset,
const char *  human_name,
void *  cb_data 
)
static

◆ fbsd_collect_thread_registers()

static char* fbsd_collect_thread_registers ( const struct regcache regcache,
ptid_t  ptid,
bfd *  obfd,
char *  note_data,
int *  note_size,
enum gdb_signal  stop_signal 
)
static

◆ fbsd_core_pid_to_str()

static const char* fbsd_core_pid_to_str ( struct gdbarch gdbarch,
ptid_t  ptid 
)
static

Definition at line 78 of file fbsd-tdep.c.

References normal_pid_to_str(), ptid_get_lwp(), and xsnprintf().

Referenced by fbsd_init_abi().

◆ fbsd_core_thread_name()

static const char* fbsd_core_thread_name ( struct gdbarch gdbarch,
struct thread_info thr 
)
static

Definition at line 95 of file fbsd-tdep.c.

References thread_section_name::c_str(), core_bfd, thread_info::ptid, ptid_get_lwp(), and size.

Referenced by fbsd_init_abi().

◆ fbsd_core_xfer_siginfo()

static LONGEST fbsd_core_xfer_siginfo ( struct gdbarch gdbarch,
gdb_byte readbuf,
ULONGEST  offset,
ULONGEST  len 
)
static

◆ fbsd_corefile_thread()

static void fbsd_corefile_thread ( struct thread_info info,
struct fbsd_corefile_thread_data args 
)
static

◆ fbsd_get_siginfo_type()

static struct type* fbsd_get_siginfo_type ( struct gdbarch gdbarch)
static

◆ fbsd_get_syscall_number()

static LONGEST fbsd_get_syscall_number ( struct gdbarch gdbarch,
ptid_t  ptid 
)
static

Definition at line 500 of file fbsd-tdep.c.

References _, and internal_error().

Referenced by fbsd_init_abi().

◆ fbsd_init_abi()

void fbsd_init_abi ( struct gdbarch_info  info,
struct gdbarch gdbarch 
)

◆ fbsd_make_corefile_notes()

static char* fbsd_make_corefile_notes ( struct gdbarch gdbarch,
bfd *  obfd,
int *  note_size 
)
static

◆ fbsd_print_auxv_entry()

static void fbsd_print_auxv_entry ( struct gdbarch gdbarch,
struct ui_file file,
CORE_ADDR  type,
CORE_ADDR  val 
)
static

◆ find_signalled_thread()

static int find_signalled_thread ( struct thread_info info,
void *  data 
)
static

◆ get_fbsd_gdbarch_data()

static struct fbsd_gdbarch_data* get_fbsd_gdbarch_data ( struct gdbarch gdbarch)
static

Definition at line 69 of file fbsd-tdep.c.

References fbsd_gdbarch_data_handle.

Referenced by fbsd_get_siginfo_type().

◆ init_fbsd_gdbarch_data()

static void* init_fbsd_gdbarch_data ( struct gdbarch gdbarch)
static

Definition at line 63 of file fbsd-tdep.c.

References GDBARCH_OBSTACK_ZALLOC.

Referenced by _initialize_fbsd_tdep().

Variable Documentation

◆ fbsd_gdbarch_data_handle

struct gdbarch_data* fbsd_gdbarch_data_handle
static

Definition at line 55 of file fbsd-tdep.c.

Referenced by _initialize_fbsd_tdep(), and get_fbsd_gdbarch_data().