77 "system__bb__threads__initialize";
91 enum gdb_signal siggnal);
244 return (msym_ravenscar_runtime_initializer.
minsym 246 && msym_running_thread.
minsym);
269 struct type *builtin_type_void_data_ptr =
275 object_size =
TYPE_LENGTH (builtin_type_void_data_ptr);
277 + (cpu - 1) * object_size);
278 buf_size = object_size;
279 buf = (
gdb_byte *) alloca (buf_size);
286 enum gdb_signal siggnal)
358 return "Ravenscar task";
373 snprintf (buf,
sizeof (buf),
"Thread %#x", (
int)
ptid_get_tid (ptid));
540 warning (
_(
"%s. Task/thread support disabled."), err_msg);
597 "\"set ravenscar\" must be followed by the name of a setting.\n"));
618 Support for Ravenscar task/thread switching is enabled\n"));
621 Support for Ravenscar task/thread switching is disabled\n"));
640 _(
"Prefix command for changing Ravenscar-specific settings"),
644 _(
"Prefix command for showing Ravenscar-specific settings"),
649 Enable or disable support for GNAT Ravenscar tasks"),
_(
"\ 650 Show whether support for GNAT Ravenscar tasks is enabled"),
652 Enable or disable support for task/thread switching with the GNAT\n\ 653 Ravenscar run-time library for bareboard configuration."),
struct gdbarch * target_gdbarch(void)
void _initialize_ravenscar(void)
int default_child_has_stack(struct target_ops *ops)
static constexpr ptid_t tid
struct thread_info * add_thread(ptid_t ptid)
struct thread_info * find_thread_ptid(ptid_t ptid)
CORE_ADDR extract_typed_address(const gdb_byte *buf, struct type *type)
static int has_ravenscar_runtime(void)
int ptid_get_pid(const ptid_t &ptid)
#define BMSYMBOL_VALUE_ADDRESS(symbol)
int(* to_has_memory)(struct target_ops *)
void warning(const char *fmt,...)
static int ravenscar_core_of_thread(struct target_ops *ops, ptid_t ptid)
static CORE_ADDR get_running_thread_id(int cpu)
void(* to_fetch_registers)(struct regcache *, int)
int(* to_has_stack)(struct target_ops *)
void push_target(struct target_ops *t)
struct ravenscar_arch_ops * gdbarch_ravenscar_ops(struct gdbarch *gdbarch)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
int(* to_core_of_thread)(struct target_ops *, ptid_t ptid) TARGET_DEFAULT_RETURN(-1)
static int ravenscar_task_support
ptid_t regcache_get_ptid(const struct regcache *regcache)
int unpush_target(struct target_ops *t)
static void show_ravenscar_task_switching_command(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int ravenscar_stopped_data_address(struct target_ops *ops, CORE_ADDR *addr_p)
struct ada_task_info * ada_get_task_info_from_ptid(ptid_t ptid)
const char *(* to_pid_to_str)(struct target_ops *, ptid_t) TARGET_DEFAULT_FUNC(default_pid_to_str)
static void ravenscar_update_thread_list(struct target_ops *ops)
static ptid_t ravenscar_get_ada_task_ptid(struct target_ops *self, long lwp, long thread)
static int ravenscar_runtime_initialized(void)
static int ravenscar_stopped_by_watchpoint(struct target_ops *ops)
int default_child_has_execution(struct target_ops *ops, ptid_t the_ptid)
static void set_ravenscar_command(const char *arg, int from_tty)
static struct cmd_list_element * set_ravenscar_list
static struct target_ops ravenscar_ops
static const char * ravenscar_pid_to_str(struct target_ops *ops, ptid_t ptid)
static ptid_t ravenscar_active_task(int cpu)
ptid_t ptid_build(int pid, long lwp, long tid)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_const_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
struct observer * observer_attach_inferior_created(observer_inferior_created_ftype *f)
int default_child_has_memory(struct target_ops *ops)
static void init_ravenscar_thread_ops(void)
struct cmd_list_element * setlist
static ptid_t get_base_thread_from_ravenscar_task(ptid_t ptid)
static void ravenscar_prepare_to_store(struct target_ops *self, struct regcache *regcache)
static ptid_t ravenscar_wait(struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, int options)
static int is_ravenscar_task(ptid_t ptid)
void complete_target_initialization(struct target_ops *t)
static int ravenscar_task_is_currently_active(ptid_t ptid)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
static int ravenscar_get_thread_base_cpu(ptid_t ptid)
long ptid_get_tid(const ptid_t &ptid)
void(* to_resume)(struct target_ops *, ptid_t, int TARGET_DEBUG_PRINTER(target_debug_print_step), enum gdb_signal) TARGET_DEFAULT_NORETURN(noprocess())
struct cmd_list_element * showlist
static int ravenscar_stopped_by_sw_breakpoint(struct target_ops *ops)
int default_child_has_all_memory(struct target_ops *ops)
int(* to_has_execution)(struct target_ops *, ptid_t)
static const char running_thread_name[]
static void show_ravenscar_command(const char *args, int from_tty)
static void ravenscar_mourn_inferior(struct target_ops *ops)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
struct target_ops * find_target_beneath(struct target_ops *t)
void printf_unfiltered(const char *format,...)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
static void ravenscar_inferior_created(struct target_ops *target, int from_tty)
long ptid_get_lwp(const ptid_t &ptid)
static const char known_tasks_name[]
void cmd_show_list(struct cmd_list_element *list, int from_tty, const char *prefix)
static void ravenscar_add_thread(struct ada_task_info *task)
static const char first_task_name[]
static const char * ravenscar_extra_thread_info(struct target_ops *self, struct thread_info *tp)
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
static void ravenscar_store_registers(struct target_ops *ops, struct regcache *regcache, int regnum)
void(* to_fetch_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_IGNORE()
void(* to_mourn_inferior)(struct target_ops *) TARGET_DEFAULT_FUNC(default_mourn_inferior)
const char *(* to_extra_thread_info)(struct target_ops *, struct thread_info *) TARGET_DEFAULT_RETURN(NULL)
int default_child_has_registers(struct target_ops *ops)
struct type * builtin_data_ptr
struct minimal_symbol * minsym
static int ravenscar_thread_alive(struct target_ops *ops, ptid_t ptid)
int(* to_stopped_by_sw_breakpoint)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
static struct cmd_list_element * show_ravenscar_list
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static constexpr ptid_t lwp
void iterate_over_live_ada_tasks(ada_task_list_iterator_ftype *iterator)
int(* to_stopped_by_watchpoint)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
const char * ada_get_tcb_types_info(void)
int(* to_stopped_by_hw_breakpoint)(struct target_ops *) TARGET_DEFAULT_RETURN(0)
int ptid_equal(const ptid_t &ptid1, const ptid_t &ptid2)
const char * to_shortname
static void ravenscar_fetch_registers(struct target_ops *ops, struct regcache *regcache, int regnum)
int(* to_has_all_memory)(struct target_ops *)
static struct bound_minimal_symbol get_running_thread_msymbol(void)
#define TYPE_LENGTH(thistype)
static void ravenscar_update_inferior_ptid(void)
int(* to_thread_alive)(struct target_ops *, ptid_t ptid) TARGET_DEFAULT_RETURN(0)
int ada_build_task_list(void)
int(* to_stopped_data_address)(struct target_ops *, CORE_ADDR *) TARGET_DEFAULT_RETURN(0)
void(* to_update_thread_list)(struct target_ops *) TARGET_DEFAULT_IGNORE()
void(* to_prepare_to_store)(struct target_ops *, struct regcache *) TARGET_DEFAULT_NORETURN(noprocess())
void(* to_store_registers)(struct target_ops *, struct regcache *, int) TARGET_DEFAULT_NORETURN(noprocess())
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
int(* to_has_registers)(struct target_ops *)
ptid_t(* to_wait)(struct target_ops *, ptid_t, struct target_waitstatus *, int TARGET_DEBUG_PRINTER(target_debug_print_options)) TARGET_DEFAULT_FUNC(default_target_wait)
ptid_t(* to_get_ada_task_ptid)(struct target_ops *, long lwp, long thread) TARGET_DEFAULT_FUNC(default_get_ada_task_ptid)
void(* to_store_registers)(struct regcache *, int)
static int ravenscar_stopped_by_hw_breakpoint(struct target_ops *ops)
static void ravenscar_resume(struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal siggnal)
void(* to_prepare_to_store)(struct regcache *)
struct target_ops * beneath
static const char ravenscar_runtime_initializer[]