GDB (xrefs)
Classes | Defines | Typedefs | Enumerations | Functions | Variables
/home/stan/gdb/src/gdb/ada-tasks.c File Reference
#include "defs.h"
#include "observer.h"
#include "gdbcmd.h"
#include "target.h"
#include "ada-lang.h"
#include "gdbcore.h"
#include "inferior.h"
#include "gdbthread.h"
#include "progspace.h"
#include "objfiles.h"

Go to the source code of this file.

Classes

struct  atcb_fieldnos
struct  ada_tasks_pspace_data
struct  ada_tasks_inferior_data

Defines

#define KNOWN_TASKS_NAME   "system__tasking__debug__known_tasks"
#define KNOWN_TASKS_LIST   "system__tasking__debug__first_task"

Typedefs

typedef struct ada_task_info ada_task_info_s

Enumerations

enum  task_states {
  Unactivated, Runnable, Terminated, Activator_Sleep,
  Acceptor_Sleep, Entry_Caller_Sleep, Async_Select_Sleep, Delay_Sleep,
  Master_Completion_Sleep, Master_Phase_2_Sleep, Interrupt_Server_Idle_Sleep, Interrupt_Server_Blocked_Interrupt_Sleep,
  Timer_Server_Sleep, AST_Server_Sleep, Asynchronous_Hold, Interrupt_Server_Blocked_On_Event_Flag,
  Activating, Acceptor_Delay_Sleep
}
enum  ada_known_tasks_kind { ADA_TASKS_UNKNOWN = 0, ADA_TASKS_NOT_FOUND, ADA_TASKS_ARRAY, ADA_TASKS_LIST }

Functions

 DEF_VEC_O (ada_task_info_s)
static struct
ada_tasks_pspace_data
get_ada_tasks_pspace_data (struct program_space *pspace)
static struct
ada_tasks_inferior_data
get_ada_tasks_inferior_data (struct inferior *inf)
int ada_get_task_number (ptid_t ptid)
static int get_task_number_from_id (CORE_ADDR task_id, struct inferior *inf)
int valid_task_id (int task_num)
static int ada_task_is_alive (struct ada_task_info *task_info)
void iterate_over_live_ada_tasks (ada_task_list_iterator_ftype *iterator)
static void value_as_string (char *dest, struct value *val, int length)
static void read_fat_string_value (char *dest, struct value *val, int max_len)
static void get_tcb_types_info (void)
static ptid_t ptid_from_atcb_common (struct value *common_value)
static void read_atcb (CORE_ADDR task_id, struct ada_task_info *task_info)
static void add_ada_task (CORE_ADDR task_id, struct inferior *inf)
static int read_known_tasks_array (struct ada_tasks_inferior_data *data)
static int read_known_tasks_list (struct ada_tasks_inferior_data *data)
static void ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
static int read_known_tasks (void)
int ada_build_task_list (void)
void print_ada_task_info (struct ui_out *uiout, char *arg_str, struct inferior *inf)
static void info_task (struct ui_out *uiout, char *taskno_str, struct inferior *inf)
static void info_tasks_command (char *arg, int from_tty)
static void display_current_task_id (void)
static void task_command_1 (char *taskno_str, int from_tty, struct inferior *inf)
static void task_command (char *taskno_str, int from_tty)
static void ada_task_list_changed (struct inferior *inf)
static void ada_tasks_invalidate_pspace_data (struct program_space *pspace)
static void ada_tasks_invalidate_inferior_data (struct inferior *inf)
static void ada_normal_stop_observer (struct bpstats *unused_args, int unused_args2)
static void ada_new_objfile_observer (struct objfile *objfile)
void _initialize_tasks (void)

Variables

static const int MAX_NUMBER_OF_KNOWN_TASKS = 1000
static const char * task_states []
static const char * long_task_states []
static struct program_space_data * ada_tasks_pspace_data_handle
static struct inferior_data * ada_tasks_inferior_data_handle
initialize_file_ftype _initialize_tasks

Define Documentation

#define KNOWN_TASKS_LIST   "system__tasking__debug__first_task"

Definition at line 39 of file ada-tasks.c.

Referenced by ada_tasks_inferior_data_sniffer().

#define KNOWN_TASKS_NAME   "system__tasking__debug__known_tasks"

Definition at line 31 of file ada-tasks.c.

Referenced by ada_tasks_inferior_data_sniffer().


Typedef Documentation

Definition at line 163 of file ada-tasks.c.


Enumeration Type Documentation

Enumerator:
ADA_TASKS_UNKNOWN 
ADA_TASKS_NOT_FOUND 
ADA_TASKS_ARRAY 
ADA_TASKS_LIST 

Definition at line 169 of file ada-tasks.c.

Enumerator:
Unactivated 
Runnable 
Terminated 
Activator_Sleep 
Acceptor_Sleep 
Entry_Caller_Sleep 
Async_Select_Sleep 
Delay_Sleep 
Master_Completion_Sleep 
Master_Phase_2_Sleep 
Interrupt_Server_Idle_Sleep 
Interrupt_Server_Blocked_Interrupt_Sleep 
Timer_Server_Sleep 
AST_Server_Sleep 
Asynchronous_Hold 
Interrupt_Server_Blocked_On_Event_Flag 
Activating 
Acceptor_Delay_Sleep 

Definition at line 41 of file ada-tasks.c.


Function Documentation

void _initialize_tasks ( void  )
static void ada_new_objfile_observer ( struct objfile objfile) [static]
static void ada_normal_stop_observer ( struct bpstats unused_args,
int  unused_args2 
) [static]

Definition at line 1388 of file ada-tasks.c.

References ada_task_list_changed(), and current_inferior().

Referenced by _initialize_tasks().

static int ada_task_is_alive ( struct ada_task_info task_info) [static]

Definition at line 348 of file ada-tasks.c.

References ada_task_info::state, and Terminated.

Referenced by iterate_over_live_ada_tasks(), read_atcb(), and task_command_1().

static void ada_task_list_changed ( struct inferior inf) [static]
static void ada_tasks_inferior_data_sniffer ( struct ada_tasks_inferior_data data) [static]
static void ada_tasks_invalidate_inferior_data ( struct inferior inf) [static]
static void ada_tasks_invalidate_pspace_data ( struct program_space pspace) [static]
static void add_ada_task ( CORE_ADDR  task_id,
struct inferior inf 
) [static]
static void display_current_task_id ( void  ) [static]

Definition at line 1259 of file ada-tasks.c.

References _, ada_get_task_number(), inferior_ptid, and printf_filtered().

Referenced by task_command().

static struct ada_tasks_inferior_data* get_ada_tasks_inferior_data ( struct inferior inf) [static, read]
static struct ada_tasks_pspace_data* get_ada_tasks_pspace_data ( struct program_space pspace) [static, read]
static int get_task_number_from_id ( CORE_ADDR  task_id,
struct inferior inf 
) [static]
static void get_tcb_types_info ( void  ) [static]
static void info_task ( struct ui_out uiout,
char *  taskno_str,
struct inferior inf 
) [static]
static void info_tasks_command ( char *  arg,
int  from_tty 
) [static]

Definition at line 1245 of file ada-tasks.c.

References current_inferior(), current_uiout, info_task(), and print_ada_task_info().

Referenced by _initialize_tasks().

void print_ada_task_info ( struct ui_out uiout,
char *  arg_str,
struct inferior inf 
)
static ptid_t ptid_from_atcb_common ( struct value common_value) [static]
static void read_atcb ( CORE_ADDR  task_id,
struct ada_task_info task_info 
) [static]
static void read_fat_string_value ( char *  dest,
struct value val,
int  max_len 
) [static]
static int read_known_tasks ( void  ) [static]
static int read_known_tasks_array ( struct ada_tasks_inferior_data data) [static]
static int read_known_tasks_list ( struct ada_tasks_inferior_data data) [static]
static void task_command ( char *  taskno_str,
int  from_tty 
) [static]
static void task_command_1 ( char *  taskno_str,
int  from_tty,
struct inferior inf 
) [static]
int valid_task_id ( int  task_num)
static void value_as_string ( char *  dest,
struct value val,
int  length 
) [static]

Definition at line 380 of file ada-tasks.c.

References memcpy(), and value_contents().

Referenced by read_atcb().


Variable Documentation

struct inferior_data* ada_tasks_inferior_data_handle [static]

Definition at line 239 of file ada-tasks.c.

Referenced by _initialize_tasks(), and get_ada_tasks_inferior_data().

struct program_space_data* ada_tasks_pspace_data_handle [static]

Definition at line 161 of file ada-tasks.c.

Referenced by _initialize_tasks(), and get_ada_tasks_pspace_data().

const char* long_task_states[] [static]
Initial value:
 {
  N_("Unactivated"),
  N_("Runnable"),
  N_("Terminated"),
  N_("Waiting for child activation"),
  N_("Blocked in accept or select with terminate"),
  N_("Waiting on entry call"),
  N_("Asynchronous Selective Wait"),
  N_("Delay Sleep"),
  N_("Waiting for children termination"),
  N_("Waiting for children in terminate alternative"),
  "",
  "",
  "",
  "",
  N_("Asynchronous Hold"),
  "",
  N_("Activating"),

}

Definition at line 86 of file ada-tasks.c.

Referenced by info_task().

Definition at line 34 of file ada-tasks.c.

Referenced by ada_tasks_inferior_data_sniffer().

const char* task_states[] [static]
Initial value:
 {
  N_("Unactivated"),
  N_("Runnable"),
  N_("Terminated"),
  N_("Child Activation Wait"),
  N_("Accept or Select Term"),
  N_("Waiting on entry call"),
  N_("Async Select Wait"),
  N_("Delay Sleep"),
  N_("Child Termination Wait"),
  N_("Wait Child in Term Alt"),
  "",
  "",
  "",
  "",
  N_("Asynchronous Hold"),
  "",
  N_("Activating"),

}

Definition at line 64 of file ada-tasks.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines