Commit | Line | Data |
---|---|---|
424163ea DJ |
1 | /* Target description support for GDB. |
2 | ||
6aba47ca | 3 | Copyright (C) 2006, 2007 Free Software Foundation, Inc. |
424163ea DJ |
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 | ||
23181151 DJ |
47 | /* Return the BFD architecture associated with this target |
48 | description, or NULL if no architecture was specified. */ | |
49 | ||
50 | const struct bfd_arch_info *tdesc_architecture | |
51 | (const struct target_desc *); | |
52 | ||
29709017 DJ |
53 | /* Return the string value of a property named KEY, or NULL if the |
54 | property was not specified. */ | |
55 | ||
56 | const char *tdesc_property (const struct target_desc *, | |
57 | const char *key); | |
58 | ||
424163ea DJ |
59 | /* Methods for constructing a target description. */ |
60 | ||
61 | struct target_desc *allocate_target_description (void); | |
23181151 DJ |
62 | struct cleanup *make_cleanup_free_target_description (struct target_desc *); |
63 | void set_tdesc_architecture (struct target_desc *, | |
64 | const struct bfd_arch_info *); | |
424163ea | 65 | |
29709017 DJ |
66 | void set_tdesc_property (struct target_desc *, |
67 | const char *key, const char *value); | |
68 | ||
424163ea | 69 | #endif /* TARGET_DESCRIPTIONS_H */ |