minor ravenscar-thread cleanup
The use of the ravenscar_open static global is unnecessary. This patch removes it. It also removes some routines that were created in association with the management of this global. gdb/ChangeLog: * ravenscar-thread.c (ravenscar_is_open): Delete. (ravenscar_initialize): Move most of the code from here... (ravenscar_inferior_created): ... to there. Invert logic. (ravenscar_close): Delete. (init_ravenscar_thread_ops): Remove setting of ravenscar_ops.to_close.
This commit is contained in:
parent
3d6e24f050
commit
25abf4decf
|
@ -1,3 +1,12 @@
|
||||||
|
2012-12-15 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* ravenscar-thread.c (ravenscar_is_open): Delete.
|
||||||
|
(ravenscar_initialize): Move most of the code from here...
|
||||||
|
(ravenscar_inferior_created): ... to there. Invert logic.
|
||||||
|
(ravenscar_close): Delete.
|
||||||
|
(init_ravenscar_thread_ops): Remove setting of
|
||||||
|
ravenscar_ops.to_close.
|
||||||
|
|
||||||
2012-12-15 Joel Brobecker <brobecker@adacore.com>
|
2012-12-15 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* objfiles.c (init_entry_point_info): Move function from here...
|
* objfiles.c (init_entry_point_info): Move function from here...
|
||||||
|
|
|
@ -34,10 +34,6 @@
|
||||||
/* If non-null, ravenscar task support is enabled. */
|
/* If non-null, ravenscar task support is enabled. */
|
||||||
static int ravenscar_task_support = 1;
|
static int ravenscar_task_support = 1;
|
||||||
|
|
||||||
/* Non-null if the ravenscar thread layer has been pushed on the target
|
|
||||||
stack. */
|
|
||||||
static int ravenscar_is_open = 0;
|
|
||||||
|
|
||||||
/* This module's target-specific operations. */
|
/* This module's target-specific operations. */
|
||||||
static struct target_ops ravenscar_ops;
|
static struct target_ops ravenscar_ops;
|
||||||
|
|
||||||
|
@ -70,7 +66,6 @@ static void ravenscar_fetch_registers (struct target_ops *ops,
|
||||||
static void ravenscar_store_registers (struct target_ops *ops,
|
static void ravenscar_store_registers (struct target_ops *ops,
|
||||||
struct regcache *regcache, int regnum);
|
struct regcache *regcache, int regnum);
|
||||||
static void ravenscar_prepare_to_store (struct regcache *regcache);
|
static void ravenscar_prepare_to_store (struct regcache *regcache);
|
||||||
static void ravenscar_initialize (char *name, int from_tty);
|
|
||||||
static void ravenscar_resume (struct target_ops *ops, ptid_t ptid, int step,
|
static void ravenscar_resume (struct target_ops *ops, ptid_t ptid, int step,
|
||||||
enum gdb_signal siggnal);
|
enum gdb_signal siggnal);
|
||||||
static void ravenscar_mourn_inferior (struct target_ops *ops);
|
static void ravenscar_mourn_inferior (struct target_ops *ops);
|
||||||
|
@ -179,12 +174,6 @@ get_running_thread_id (void)
|
||||||
return extract_typed_address (buf, builtin_type_void_data_ptr);
|
return extract_typed_address (buf, builtin_type_void_data_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
ravenscar_close (int quitting)
|
|
||||||
{
|
|
||||||
ravenscar_is_open = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ravenscar_resume (struct target_ops *ops, ptid_t ptid, int step,
|
ravenscar_resume (struct target_ops *ops, ptid_t ptid, int step,
|
||||||
enum gdb_signal siggnal)
|
enum gdb_signal siggnal)
|
||||||
|
@ -332,9 +321,12 @@ ravenscar_mourn_inferior (struct target_ops *ops)
|
||||||
static void
|
static void
|
||||||
ravenscar_inferior_created (struct target_ops *target, int from_tty)
|
ravenscar_inferior_created (struct target_ops *target, int from_tty)
|
||||||
{
|
{
|
||||||
if (ravenscar_task_support
|
if (!ravenscar_task_support || !has_ravenscar_runtime ())
|
||||||
&& has_ravenscar_runtime ())
|
return;
|
||||||
ravenscar_initialize (NULL, 0);
|
|
||||||
|
base_magic_null_ptid = inferior_ptid;
|
||||||
|
ravenscar_update_inferior_ptid ();
|
||||||
|
push_target (&ravenscar_ops);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -348,20 +340,6 @@ ravenscar_register_arch_ops (struct ravenscar_arch_ops *ops)
|
||||||
current_arch_ops = ops;
|
current_arch_ops = ops;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize Ravenscar support. */
|
|
||||||
|
|
||||||
static void
|
|
||||||
ravenscar_initialize (char *name, int from_tty)
|
|
||||||
{
|
|
||||||
if (ravenscar_is_open)
|
|
||||||
return;
|
|
||||||
|
|
||||||
base_magic_null_ptid = inferior_ptid;
|
|
||||||
ravenscar_update_inferior_ptid ();
|
|
||||||
push_target (&ravenscar_ops);
|
|
||||||
ravenscar_is_open = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ptid_t
|
static ptid_t
|
||||||
ravenscar_get_ada_task_ptid (long lwp, long thread)
|
ravenscar_get_ada_task_ptid (long lwp, long thread)
|
||||||
{
|
{
|
||||||
|
@ -374,7 +352,6 @@ init_ravenscar_thread_ops (void)
|
||||||
ravenscar_ops.to_shortname = "ravenscar";
|
ravenscar_ops.to_shortname = "ravenscar";
|
||||||
ravenscar_ops.to_longname = "Ravenscar tasks.";
|
ravenscar_ops.to_longname = "Ravenscar tasks.";
|
||||||
ravenscar_ops.to_doc = "Ravenscar tasks support.";
|
ravenscar_ops.to_doc = "Ravenscar tasks support.";
|
||||||
ravenscar_ops.to_close = ravenscar_close;
|
|
||||||
ravenscar_ops.to_resume = ravenscar_resume;
|
ravenscar_ops.to_resume = ravenscar_resume;
|
||||||
ravenscar_ops.to_wait = ravenscar_wait;
|
ravenscar_ops.to_wait = ravenscar_wait;
|
||||||
ravenscar_ops.to_fetch_registers = ravenscar_fetch_registers;
|
ravenscar_ops.to_fetch_registers = ravenscar_fetch_registers;
|
||||||
|
|
Loading…
Reference in New Issue