summaryrefslogtreecommitdiff
path: root/gdb/target-descriptions.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-11-28 22:10:26 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-11-28 22:10:26 +0000
commitcb420038d38ccc2768241fd87444113ca638350f (patch)
tree2d8938f4b8f991813f853d760ebd29bbd750c8bb /gdb/target-descriptions.h
parentf869f466caaa11489074942b75099647e2da9f44 (diff)
downloadgdb-cb420038d38ccc2768241fd87444113ca638350f.tar.gz
* Makefile.in (SFILES): Add new and missed files.
(target_descriptions_h): New. (COMMON_OBS): Add target-descriptions.o. (arch-utils.o, infcmd.o, remote.o, target.o): Update. (target-descriptions.o): New. * arch-utils.c (gdbarch_info_fill): Check for a target description. * target-descriptions.c, target-descriptions.h: New files. * gdbarch.sh: Add target_desc to info. Declare it in gdbarch.h. Correct typos. (gdbarch_list_lookup_by_info): Check target_desc. * gdbarch.c, gdbarch.h: Regenerated. * target.c (update_current_target): Mention to_read_description. (target_pre_inferior): Call target_clear_description. (target_read_description): New. * target.h (struct target_ops): Add to_read_description. (target_read_description): New prototype. * infcmd.c (post_create_inferior): Call target_find_description. * remote.c (remote_open_1): Likewise. (extended_remote_create_inferior): Add a comment. (extended_remote_async_create_inferior): Likewise.
Diffstat (limited to 'gdb/target-descriptions.h')
-rw-r--r--gdb/target-descriptions.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/gdb/target-descriptions.h b/gdb/target-descriptions.h
new file mode 100644
index 00000000000..bbcf879a866
--- /dev/null
+++ b/gdb/target-descriptions.h
@@ -0,0 +1,52 @@
+/* Target description support for GDB.
+
+ Copyright (C) 2006
+ Free Software Foundation, Inc.
+
+ Contributed by CodeSourcery.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+#ifndef TARGET_DESCRIPTIONS_H
+#define TARGET_DESCRIPTIONS_H 1
+
+struct target_desc;
+
+/* Fetch the current target's description, and switch the current
+ architecture to one which incorporates that description. */
+
+void target_find_description (void);
+
+/* Discard any description fetched from the current target, and switch
+ the current architecture to one with no target description. */
+
+void target_clear_description (void);
+
+/* Return the global current target description. This should only be
+ used by gdbarch initialization code; most access should be through
+ an existing gdbarch. */
+
+const struct target_desc *target_current_description (void);
+
+/* Accessors for target descriptions. */
+
+/* Methods for constructing a target description. */
+
+struct target_desc *allocate_target_description (void);
+
+#endif /* TARGET_DESCRIPTIONS_H */