GDB (xrefs)
Functions | Variables
/tmp/gdb-8.1/gdb/ravenscar-thread.c File Reference
#include "defs.h"
#include "gdbcore.h"
#include "gdbthread.h"
#include "ada-lang.h"
#include "target.h"
#include "inferior.h"
#include "command.h"
#include "ravenscar-thread.h"
#include "observer.h"
#include "gdbcmd.h"
#include "top.h"
#include "regcache.h"
#include "objfiles.h"

Go to the source code of this file.

Functions

static void ravenscar_update_thread_list (struct target_ops *ops)
 
static ptid_t ravenscar_active_task (int cpu)
 
static const char * ravenscar_extra_thread_info (struct target_ops *self, struct thread_info *tp)
 
static int ravenscar_thread_alive (struct target_ops *ops, ptid_t ptid)
 
static void ravenscar_fetch_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
 
static void ravenscar_store_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
 
static void ravenscar_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 
static void ravenscar_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal siggnal)
 
static void ravenscar_mourn_inferior (struct target_ops *ops)
 
static void ravenscar_update_inferior_ptid (void)
 
static int has_ravenscar_runtime (void)
 
static int ravenscar_runtime_initialized (void)
 
static void ravenscar_inferior_created (struct target_ops *target, int from_tty)
 
static int is_ravenscar_task (ptid_t ptid)
 
static int ravenscar_get_thread_base_cpu (ptid_t ptid)
 
static int ravenscar_task_is_currently_active (ptid_t ptid)
 
static ptid_t get_base_thread_from_ravenscar_task (ptid_t ptid)
 
static struct bound_minimal_symbol get_running_thread_msymbol (void)
 
static CORE_ADDR get_running_thread_id (int cpu)
 
static ptid_t ravenscar_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, int options)
 
static void ravenscar_add_thread (struct ada_task_info *task)
 
static const char * ravenscar_pid_to_str (struct target_ops *ops, ptid_t ptid)
 
static int ravenscar_stopped_by_sw_breakpoint (struct target_ops *ops)
 
static int ravenscar_stopped_by_hw_breakpoint (struct target_ops *ops)
 
static int ravenscar_stopped_by_watchpoint (struct target_ops *ops)
 
static int ravenscar_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p)
 
static int ravenscar_core_of_thread (struct target_ops *ops, ptid_t ptid)
 
static ptid_t ravenscar_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
 
static void init_ravenscar_thread_ops (void)
 
static void set_ravenscar_command (const char *arg, int from_tty)
 
static void show_ravenscar_command (const char *args, int from_tty)
 
static void show_ravenscar_task_switching_command (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
void _initialize_ravenscar (void)
 

Variables

static int ravenscar_task_support = 1
 
static struct target_ops ravenscar_ops
 
static ptid_t base_ptid
 
static const char running_thread_name [] = "__gnat_running_thread_table"
 
static const char known_tasks_name [] = "system__tasking__debug__known_tasks"
 
static const char first_task_name [] = "system__tasking__debug__first_task"
 
static const char ravenscar_runtime_initializer []
 
static struct cmd_list_elementset_ravenscar_list
 
static struct cmd_list_elementshow_ravenscar_list
 

Function Documentation

◆ _initialize_ravenscar()

void _initialize_ravenscar ( void  )

◆ get_base_thread_from_ravenscar_task()

static ptid_t get_base_thread_from_ravenscar_task ( ptid_t  ptid)
static

◆ get_running_thread_id()

static CORE_ADDR get_running_thread_id ( int  cpu)
static

◆ get_running_thread_msymbol()

static struct bound_minimal_symbol get_running_thread_msymbol ( void  )
static

◆ has_ravenscar_runtime()

static int has_ravenscar_runtime ( void  )
static

◆ init_ravenscar_thread_ops()

static void init_ravenscar_thread_ops ( void  )
static

Definition at line 555 of file ravenscar-thread.c.

References default_child_has_all_memory(), default_child_has_execution(), default_child_has_memory(), default_child_has_registers(), default_child_has_stack(), OPS_MAGIC, ravenscar_core_of_thread(), ravenscar_extra_thread_info(), ravenscar_fetch_registers(), ravenscar_get_ada_task_ptid(), ravenscar_mourn_inferior(), ravenscar_ops, ravenscar_pid_to_str(), ravenscar_prepare_to_store(), ravenscar_resume(), ravenscar_stopped_by_hw_breakpoint(), ravenscar_stopped_by_sw_breakpoint(), ravenscar_stopped_by_watchpoint(), ravenscar_stopped_data_address(), ravenscar_store_registers(), ravenscar_thread_alive(), ravenscar_update_thread_list(), ravenscar_wait(), thread_stratum, target_ops::to_core_of_thread, target_ops::to_doc, target_ops::to_extra_thread_info, target_ops::to_fetch_registers, target_ops::to_get_ada_task_ptid, target_ops::to_has_all_memory, target_ops::to_has_execution, target_ops::to_has_memory, target_ops::to_has_registers, target_ops::to_has_stack, target_ops::to_longname, target_ops::to_magic, target_ops::to_mourn_inferior, target_ops::to_pid_to_str, target_ops::to_prepare_to_store, target_ops::to_resume, target_ops::to_shortname, target_ops::to_stopped_by_hw_breakpoint, target_ops::to_stopped_by_sw_breakpoint, target_ops::to_stopped_by_watchpoint, target_ops::to_stopped_data_address, target_ops::to_store_registers, target_ops::to_stratum, target_ops::to_thread_alive, target_ops::to_update_thread_list, and target_ops::to_wait.

Referenced by _initialize_ravenscar().

◆ is_ravenscar_task()

static int is_ravenscar_task ( ptid_t  ptid)
static

◆ ravenscar_active_task()

static ptid_t ravenscar_active_task ( int  cpu)
static

◆ ravenscar_add_thread()

static void ravenscar_add_thread ( struct ada_task_info task)
static

Definition at line 325 of file ravenscar-thread.c.

References add_thread(), find_thread_ptid(), and ada_task_info::ptid.

Referenced by ravenscar_update_thread_list().

◆ ravenscar_core_of_thread()

static int ravenscar_core_of_thread ( struct target_ops ops,
ptid_t  ptid 
)
static

◆ ravenscar_extra_thread_info()

static const char * ravenscar_extra_thread_info ( struct target_ops self,
struct thread_info tp 
)
static

Definition at line 356 of file ravenscar-thread.c.

Referenced by init_ravenscar_thread_ops().

◆ ravenscar_fetch_registers()

static void ravenscar_fetch_registers ( struct target_ops ops,
struct regcache regcache,
int  regnum 
)
static

◆ ravenscar_get_ada_task_ptid()

static ptid_t ravenscar_get_ada_task_ptid ( struct target_ops self,
long  lwp,
long  thread 
)
static

Definition at line 549 of file ravenscar-thread.c.

References base_ptid, ptid_build(), and ptid_get_pid().

Referenced by init_ravenscar_thread_ops().

◆ ravenscar_get_thread_base_cpu()

static int ravenscar_get_thread_base_cpu ( ptid_t  ptid)
static

◆ ravenscar_inferior_created()

static void ravenscar_inferior_created ( struct target_ops target,
int  from_tty 
)
static

◆ ravenscar_mourn_inferior()

static void ravenscar_mourn_inferior ( struct target_ops ops)
static

◆ ravenscar_pid_to_str()

static const char* ravenscar_pid_to_str ( struct target_ops ops,
ptid_t  ptid 
)
static

Definition at line 369 of file ravenscar-thread.c.

References ptid_get_tid().

Referenced by init_ravenscar_thread_ops().

◆ ravenscar_prepare_to_store()

static void ravenscar_prepare_to_store ( struct target_ops self,
struct regcache regcache 
)
static

◆ ravenscar_resume()

static void ravenscar_resume ( struct target_ops ops,
ptid_t  ptid,
int  step,
enum gdb_signal  siggnal 
)
static

◆ ravenscar_runtime_initialized()

static int ravenscar_runtime_initialized ( void  )
static

◆ ravenscar_stopped_by_hw_breakpoint()

static int ravenscar_stopped_by_hw_breakpoint ( struct target_ops ops)
static

◆ ravenscar_stopped_by_sw_breakpoint()

static int ravenscar_stopped_by_sw_breakpoint ( struct target_ops ops)
static

◆ ravenscar_stopped_by_watchpoint()

static int ravenscar_stopped_by_watchpoint ( struct target_ops ops)
static

◆ ravenscar_stopped_data_address()

static int ravenscar_stopped_data_address ( struct target_ops ops,
CORE_ADDR addr_p 
)
static

◆ ravenscar_store_registers()

static void ravenscar_store_registers ( struct target_ops ops,
struct regcache regcache,
int  regnum 
)
static

◆ ravenscar_task_is_currently_active()

static int ravenscar_task_is_currently_active ( ptid_t  ptid)
static

◆ ravenscar_thread_alive()

static int ravenscar_thread_alive ( struct target_ops ops,
ptid_t  ptid 
)
static

Definition at line 362 of file ravenscar-thread.c.

Referenced by init_ravenscar_thread_ops().

◆ ravenscar_update_inferior_ptid()

static void ravenscar_update_inferior_ptid ( void  )
static

◆ ravenscar_update_thread_list()

static void ravenscar_update_thread_list ( struct target_ops ops)
static

◆ ravenscar_wait()

static ptid_t ravenscar_wait ( struct target_ops ops,
ptid_t  ptid,
struct target_waitstatus status,
int  options 
)
static

◆ set_ravenscar_command()

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

◆ show_ravenscar_command()

static void show_ravenscar_command ( const char *  args,
int  from_tty 
)
static

Definition at line 604 of file ravenscar-thread.c.

References cmd_show_list(), and show_ravenscar_list.

Referenced by _initialize_ravenscar().

◆ show_ravenscar_task_switching_command()

static void show_ravenscar_task_switching_command ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 612 of file ravenscar-thread.c.

References _, fprintf_filtered(), and ravenscar_task_support.

Referenced by _initialize_ravenscar().

Variable Documentation

◆ base_ptid

ptid_t base_ptid
static

◆ first_task_name

const char first_task_name[] = "system__tasking__debug__first_task"
static

Definition at line 74 of file ravenscar-thread.c.

Referenced by has_ravenscar_runtime().

◆ known_tasks_name

const char known_tasks_name[] = "system__tasking__debug__known_tasks"
static

Definition at line 73 of file ravenscar-thread.c.

Referenced by has_ravenscar_runtime().

◆ ravenscar_ops

struct target_ops ravenscar_ops
static

◆ ravenscar_runtime_initializer

const char ravenscar_runtime_initializer[]
static
Initial value:
=
"system__bb__threads__initialize"

Definition at line 76 of file ravenscar-thread.c.

Referenced by has_ravenscar_runtime().

◆ ravenscar_task_support

int ravenscar_task_support = 1
static

◆ running_thread_name

const char running_thread_name[] = "__gnat_running_thread_table"
static

Definition at line 71 of file ravenscar-thread.c.

Referenced by get_running_thread_msymbol().

◆ set_ravenscar_list

struct cmd_list_element* set_ravenscar_list
static

Definition at line 588 of file ravenscar-thread.c.

Referenced by _initialize_ravenscar(), and set_ravenscar_command().

◆ show_ravenscar_list

struct cmd_list_element* show_ravenscar_list
static

Definition at line 589 of file ravenscar-thread.c.

Referenced by _initialize_ravenscar(), and show_ravenscar_command().