mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
2003-10-15 Andrew Cagney <cagney@redhat.com>
* target.c (target_stack): Change to a static target_ops. (update_current_target): Walk the "struct target_ops" stack. (pop_target, do_xfer_memory, target_info): Ditto. (find_target_beneath): Ditto. (push_target): Rewrite to use the "struct target_ops" stack. (unpush_target): Ditto. * target.h (struct target_stack_item): Delete definition. (target_stack): Delete declaration. (struct target_ops): Add field "beneath".
This commit is contained in:
13
gdb/target.h
13
gdb/target.h
@@ -188,6 +188,7 @@ struct thread_info; /* fwd decl for parameter list below: */
|
||||
|
||||
struct target_ops
|
||||
{
|
||||
struct target_ops *beneath; /* To the target under this one. */
|
||||
char *to_shortname; /* Name this target type */
|
||||
char *to_longname; /* Name for printing */
|
||||
char *to_doc; /* Documentation. Does not include trailing
|
||||
@@ -326,18 +327,6 @@ struct target_ops
|
||||
|
||||
extern struct target_ops current_target;
|
||||
|
||||
/* An item on the target stack. */
|
||||
|
||||
struct target_stack_item
|
||||
{
|
||||
struct target_stack_item *next;
|
||||
struct target_ops *target_ops;
|
||||
};
|
||||
|
||||
/* The target stack. */
|
||||
|
||||
extern struct target_stack_item *target_stack;
|
||||
|
||||
/* Define easy words for doing these operations on our current target. */
|
||||
|
||||
#define target_shortname (current_target.to_shortname)
|
||||
|
||||
Reference in New Issue
Block a user