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