GDB (xrefs)
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/bsd-uthread.c File Reference
#include "defs.h"
#include "gdbcore.h"
#include "gdbthread.h"
#include "inferior.h"
#include "objfiles.h"
#include "observer.h"
#include "regcache.h"
#include "solib.h"
#include "solist.h"
#include "symfile.h"
#include "target.h"
#include "gdb_assert.h"
#include "gdb_obstack.h"
#include "bsd-uthread.h"

Go to the source code of this file.

Classes

struct  bsd_uthread_ops

Defines

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

Functions

static void * bsd_uthread_init (struct obstack *obstack)
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_close (void)
static void bsd_uthread_deactivate (void)
static void bsd_uthread_inferior_created (struct target_ops *ops, int from_tty)
static void bsd_uthread_solib_loaded (struct so_list *so)
static void bsd_uthread_solib_unloaded (struct so_list *so)
static void bsd_uthread_mourn_inferior (struct target_ops *ops)
static void bsd_uthread_fetch_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
static void bsd_uthread_store_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
static LONGEST bsd_uthread_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
static ptid_t bsd_uthread_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, int options)
static void bsd_uthread_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal sig)
static int bsd_uthread_thread_alive (struct target_ops *ops, ptid_t ptid)
static void bsd_uthread_find_new_threads (struct target_ops *ops)
static char * bsd_uthread_extra_thread_info (struct thread_info *info)
static char * bsd_uthread_pid_to_str (struct target_ops *ops, ptid_t ptid)
static struct target_opsbsd_uthread_target (void)
void _initialize_bsd_uthread (void)

Variables

static struct target_opsbsd_uthread_ops_hack
static struct gdbarch_databsd_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 * bsd_uthread_solib_names []
static char * bsd_uthread_state []
initialize_file_ftype _initialize_bsd_uthread

Define Documentation

#define BSD_UTHREAD_PS_DEAD   18

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

Referenced by bsd_uthread_thread_alive().

#define BSD_UTHREAD_PS_RUNNING   0

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

#define BSD_UTHREAD_PTHREAD_MAGIC   0xd09ba115

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

Referenced by bsd_uthread_check_magic(), and bsd_uthread_wait().


Function Documentation

void _initialize_bsd_uthread ( void  )
static int bsd_uthread_activate ( struct objfile objfile) [static]
static void bsd_uthread_check_magic ( CORE_ADDR  addr) [static]
static void bsd_uthread_close ( void  ) [static]

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

Referenced by bsd_uthread_target().

static void bsd_uthread_deactivate ( void  ) [static]

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

References unpush_target().

Referenced by bsd_uthread_mourn_inferior(), and bsd_uthread_solib_unloaded().

static char* bsd_uthread_extra_thread_info ( struct thread_info info) [static]
static void bsd_uthread_fetch_registers ( struct target_ops ops,
struct regcache regcache,
int  regnum 
) [static]
static void bsd_uthread_find_new_threads ( struct target_ops ops) [static]
static void bsd_uthread_inferior_created ( struct target_ops ops,
int  from_tty 
) [static]

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

References bsd_uthread_activate().

Referenced by _initialize_bsd_uthread().

static void* bsd_uthread_init ( struct obstack *  obstack) [static]

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

References OBSTACK_ZALLOC.

Referenced by _initialize_bsd_uthread().

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

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

References lookup_minimal_symbol(), and SYMBOL_VALUE_ADDRESS.

Referenced by bsd_uthread_activate(), and bsd_uthread_lookup_offset().

static int bsd_uthread_lookup_offset ( const char *  name,
struct objfile objfile 
) [static]
static void bsd_uthread_mourn_inferior ( struct target_ops ops) [static]
static char* bsd_uthread_pid_to_str ( struct target_ops ops,
ptid_t  ptid 
) [static]

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

References normal_pid_to_str(), ptid_get_pid(), ptid_get_tid(), and xsnprintf().

Referenced by bsd_uthread_target().

static void bsd_uthread_resume ( struct target_ops ops,
ptid_t  ptid,
int  step,
enum gdb_signal  sig 
) [static]

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

References target_ops::beneath, find_target_beneath(), and target_ops::to_resume.

Referenced by bsd_uthread_target().

void bsd_uthread_set_collect_uthread ( struct gdbarch gdbarch,
void(*)(const struct regcache *, int, CORE_ADDR collect_uthread 
)
void bsd_uthread_set_supply_uthread ( struct gdbarch gdbarch,
void(*)(struct regcache *, int, CORE_ADDR supply_uthread 
)
static void bsd_uthread_solib_loaded ( struct so_list so) [static]
static void bsd_uthread_solib_unloaded ( struct so_list so) [static]

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

References bsd_uthread_deactivate(), and so_list::so_original_name.

Referenced by _initialize_bsd_uthread().

static void bsd_uthread_store_registers ( struct target_ops ops,
struct regcache regcache,
int  regnum 
) [static]
static struct target_ops* bsd_uthread_target ( void  ) [static, read]
static int bsd_uthread_thread_alive ( struct target_ops ops,
ptid_t  ptid 
) [static]
static ptid_t bsd_uthread_wait ( struct target_ops ops,
ptid_t  ptid,
struct target_waitstatus status,
int  options 
) [static]
static LONGEST bsd_uthread_xfer_partial ( struct target_ops ops,
enum target_object  object,
const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
) [static]

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

References target_ops::beneath, gdb_assert, and target_ops::to_xfer_partial.

Referenced by bsd_uthread_target().


Variable Documentation

Referenced by initialize_all_files().

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

struct gdbarch_data* bsd_uthread_data [static]

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

struct target_ops* bsd_uthread_ops_hack [static]

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

const char* bsd_uthread_solib_name [static]

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

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

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

Referenced by bsd_uthread_solib_loaded().

char* 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 457 of file bsd-uthread.c.

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

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

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

Referenced by bsd_uthread_find_new_threads().

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

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

Referenced by bsd_uthread_extra_thread_info(), and bsd_uthread_thread_alive().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines