Copyright updates for 2007.
[external/binutils.git] / gdb / target-descriptions.h
1 /* Target description support for GDB.
2
3    Copyright (C) 2006, 2007 Free Software Foundation, Inc.
4
5    Contributed by CodeSourcery.
6
7    This file is part of GDB.
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 2 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 51 Franklin Street, Fifth Floor,
22    Boston, MA 02110-1301, USA.  */
23
24 #ifndef TARGET_DESCRIPTIONS_H
25 #define TARGET_DESCRIPTIONS_H 1
26
27 struct target_desc;
28
29 /* Fetch the current target's description, and switch the current
30    architecture to one which incorporates that description.  */
31
32 void target_find_description (void);
33
34 /* Discard any description fetched from the current target, and switch
35    the current architecture to one with no target description.  */
36
37 void target_clear_description (void);
38
39 /* Return the global current target description.  This should only be
40    used by gdbarch initialization code; most access should be through
41    an existing gdbarch.  */
42
43 const struct target_desc *target_current_description (void);
44
45 /* Accessors for target descriptions.  */
46
47 /* Return the string value of a property named KEY, or NULL if the
48    property was not specified.  */
49
50 const char *tdesc_property (const struct target_desc *,
51                             const char *key);
52
53 /* Methods for constructing a target description.  */
54
55 struct target_desc *allocate_target_description (void);
56
57 void set_tdesc_property (struct target_desc *,
58                          const char *key, const char *value);
59
60 #endif /* TARGET_DESCRIPTIONS_H */