GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
bsd-uthread.c File Reference
#include "defs.h"
#include "gdbcore.h"
#include "gdbthread.h"
#include "inferior.h"
#include "objfiles.h"
#include "observable.h"
#include "regcache.h"
#include "solib.h"
#include "solist.h"
#include "symfile.h"
#include "target.h"
#include "gdbsupport/gdb_obstack.h"
#include "bsd-uthread.h"

Go to the source code of this file.

Classes

struct  bsd_uthread_target
 
struct  bsd_uthread_ops
 

Macros

#define BSD_UTHREAD_PTHREAD_MAGIC   0xd09ba115
 
#define BSD_UTHREAD_PS_RUNNING   0
 
#define BSD_UTHREAD_PS_DEAD   18
 

Functions

static struct bsd_uthread_opsget_bsd_uthread (struct gdbarch *gdbarch)
 
void bsd_uthread_set_supply_uthread (struct gdbarch *gdbarch, void(*supply_uthread)(struct regcache *, int, CORE_ADDR))
 
void bsd_uthread_set_collect_uthread (struct gdbarch *gdbarch, void(*collect_uthread)(const struct regcache *, int, CORE_ADDR))
 
static void bsd_uthread_check_magic (CORE_ADDR addr)
 
static CORE_ADDR bsd_uthread_lookup_address (const char *name, struct objfile *objfile)
 
static int bsd_uthread_lookup_offset (const char *name, struct objfile *objfile)
 
static CORE_ADDR bsd_uthread_read_memory_address (CORE_ADDR addr)
 
static int bsd_uthread_activate (struct objfile *objfile)
 
static void bsd_uthread_deactivate (void)
 
static void bsd_uthread_inferior_created (inferior *inf)
 
static void bsd_uthread_solib_loaded (struct so_list *so)
 
static void bsd_uthread_solib_unloaded (program_space *pspace, so_list *so)
 
void _initialize_bsd_uthread ()
 

Variables

static const target_info bsd_uthread_target_info
 
static bsd_uthread_target bsd_uthread_ops
 
static const registry< gdbarch >::key< struct bsd_uthread_opsbsd_uthread_data
 
static CORE_ADDR bsd_uthread_thread_run_addr
 
static CORE_ADDR bsd_uthread_thread_list_addr
 
static int bsd_uthread_thread_state_offset = -1
 
static int bsd_uthread_thread_next_offset = -1
 
static int bsd_uthread_thread_ctx_offset
 
static const char * bsd_uthread_solib_name
 
static int bsd_uthread_active
 
static const char *const bsd_uthread_solib_names []
 
static const char *const bsd_uthread_state []
 

Macro Definition Documentation

◆ BSD_UTHREAD_PS_DEAD

#define BSD_UTHREAD_PS_DEAD   18

Definition at line 137 of file bsd-uthread.c.

Referenced by bsd_uthread_target::thread_alive().

◆ BSD_UTHREAD_PS_RUNNING

#define BSD_UTHREAD_PS_RUNNING   0

Definition at line 136 of file bsd-uthread.c.

◆ BSD_UTHREAD_PTHREAD_MAGIC

#define BSD_UTHREAD_PTHREAD_MAGIC   0xd09ba115

Definition at line 121 of file bsd-uthread.c.

Referenced by bsd_uthread_check_magic(), and bsd_uthread_target::wait().

Function Documentation

◆ _initialize_bsd_uthread()

void _initialize_bsd_uthread ( )

◆ bsd_uthread_activate()

static int bsd_uthread_activate ( struct objfile * objfile)
static

◆ bsd_uthread_check_magic()

static void bsd_uthread_check_magic ( CORE_ADDR addr)
static

◆ bsd_uthread_deactivate()

static void bsd_uthread_deactivate ( void )
static

◆ bsd_uthread_inferior_created()

static void bsd_uthread_inferior_created ( inferior * inf)
static

Definition at line 263 of file bsd-uthread.c.

References bsd_uthread_activate().

Referenced by _initialize_bsd_uthread().

◆ bsd_uthread_lookup_address()

static CORE_ADDR bsd_uthread_lookup_address ( const char * name,
struct objfile * objfile )
static

◆ bsd_uthread_lookup_offset()

static int bsd_uthread_lookup_offset ( const char * name,
struct objfile * objfile )
static

◆ bsd_uthread_read_memory_address()

static CORE_ADDR bsd_uthread_read_memory_address ( CORE_ADDR addr)
static

◆ bsd_uthread_set_collect_uthread()

void bsd_uthread_set_collect_uthread ( struct gdbarch * gdbarch,
void(*)(const struct regcache *, int, CORE_ADDR) collect_uthread )

◆ bsd_uthread_set_supply_uthread()

void bsd_uthread_set_supply_uthread ( struct gdbarch * gdbarch,
void(*)(struct regcache *, int, CORE_ADDR) supply_uthread )

◆ bsd_uthread_solib_loaded()

static void bsd_uthread_solib_loaded ( struct so_list * so)
static

◆ bsd_uthread_solib_unloaded()

static void bsd_uthread_solib_unloaded ( program_space * pspace,
so_list * so )
static

◆ get_bsd_uthread()

static struct bsd_uthread_ops * get_bsd_uthread ( struct gdbarch * gdbarch)
static

Variable Documentation

◆ bsd_uthread_active

int bsd_uthread_active
static

◆ bsd_uthread_data

const registry<gdbarch>::key<struct bsd_uthread_ops> bsd_uthread_data
static

Definition at line 83 of file bsd-uthread.c.

Referenced by get_bsd_uthread().

◆ bsd_uthread_ops

bsd_uthread_target bsd_uthread_ops
static

Definition at line 68 of file bsd-uthread.c.

◆ bsd_uthread_solib_name

const char* bsd_uthread_solib_name
static

◆ bsd_uthread_solib_names

const char* const bsd_uthread_solib_names[]
static
Initial value:
=
{
"/usr/lib/libc_r.so",
"/usr/lib/libpthread.so",
NULL
}

Definition at line 269 of file bsd-uthread.c.

Referenced by bsd_uthread_solib_loaded().

◆ bsd_uthread_state

const char* const bsd_uthread_state[]
static
Initial value:
=
{
"RUNNING",
"SIGTHREAD",
"MUTEX_WAIT",
"COND_WAIT",
"FDLR_WAIT",
"FDLW_WAIT",
"FDR_WAIT",
"FDW_WAIT",
"FILE_WAIT",
"POLL_WAIT",
"SELECT_WAIT",
"SLEEP_WAIT",
"WAIT_WAIT",
"SIGSUSPEND",
"SIGWAIT",
"SPINBLOCK",
"JOIN",
"SUSPENDED",
"DEAD",
"DEADLOCK"
}

Definition at line 486 of file bsd-uthread.c.

Referenced by bsd_uthread_target::extra_thread_info().

◆ bsd_uthread_target_info

const target_info bsd_uthread_target_info
static
Initial value:
= {
"bsd-uthreads",
N_("BSD user-level threads"),
}

Definition at line 36 of file bsd-uthread.c.

Referenced by bsd_uthread_target::info().

◆ bsd_uthread_thread_ctx_offset

int bsd_uthread_thread_ctx_offset
static

◆ bsd_uthread_thread_list_addr

CORE_ADDR bsd_uthread_thread_list_addr
static

◆ bsd_uthread_thread_next_offset

int bsd_uthread_thread_next_offset = -1
static

◆ bsd_uthread_thread_run_addr

CORE_ADDR bsd_uthread_thread_run_addr
static

◆ bsd_uthread_thread_state_offset

int bsd_uthread_thread_state_offset = -1
static