| 1 | /* GDB variable objects API. |
| 2 | Copyright 1999 Free Software Foundation, Inc. |
| 3 | |
| 4 | This program is free software; you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by |
| 6 | the Free Software Foundation; either version 2 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU General Public License |
| 15 | along with this program; if not, write to the Free Software |
| 16 | Foundation, Inc., 59 Temple Place - Suite 330, |
| 17 | Boston, MA 02111-1307, USA. */ |
| 18 | |
| 19 | #ifndef VAROBJ_H |
| 20 | #define VAROBJ_H 1 |
| 21 | |
| 22 | #include "symtab.h" |
| 23 | #include "gdbtypes.h" |
| 24 | |
| 25 | /* Enumeration for the format types */ |
| 26 | enum varobj_display_formats |
| 27 | { |
| 28 | FORMAT_NATURAL, /* What gdb actually calls 'natural' */ |
| 29 | FORMAT_BINARY, /* Binary display */ |
| 30 | FORMAT_DECIMAL, /* Decimal display */ |
| 31 | FORMAT_HEXADECIMAL, /* Hex display */ |
| 32 | FORMAT_OCTAL /* Octal display */ |
| 33 | }; |
| 34 | |
| 35 | /* String representations of gdb's format codes (defined in varobj.c) */ |
| 36 | extern char *varobj_format_string[]; |
| 37 | |
| 38 | /* Languages supported by this variable objects system. */ |
| 39 | enum varobj_languages |
| 40 | { |
| 41 | vlang_unknown = 0, vlang_c, vlang_cplus, vlang_java, vlang_end |
| 42 | }; |
| 43 | |
| 44 | /* String representations of gdb's known languages (defined in varobj.c) */ |
| 45 | extern char *varobj_language_string[]; |
| 46 | |
| 47 | /* Struct thar describes a variable object instance */ |
| 48 | struct varobj; |
| 49 | |
| 50 | /* API functions */ |
| 51 | |
| 52 | extern struct varobj *varobj_create (char *objname, |
| 53 | char *expression, CORE_ADDR frame); |
| 54 | |
| 55 | extern char *varobj_gen_name (void); |
| 56 | |
| 57 | extern struct varobj *varobj_get_handle (char *name); |
| 58 | |
| 59 | extern char *varobj_get_objname (struct varobj *var); |
| 60 | |
| 61 | extern char *varobj_get_expression (struct varobj *var); |
| 62 | |
| 63 | extern int varobj_delete (struct varobj *var, char ***dellist, |
| 64 | int only_children); |
| 65 | |
| 66 | extern enum varobj_display_formats varobj_set_display_format ( |
| 67 | struct varobj *var, |
| 68 | enum varobj_display_formats format); |
| 69 | |
| 70 | extern enum varobj_display_formats varobj_get_display_format ( |
| 71 | struct varobj *var); |
| 72 | |
| 73 | extern int varobj_get_num_children (struct varobj *var); |
| 74 | |
| 75 | extern int varobj_list_children (struct varobj *var, |
| 76 | struct varobj ***childlist); |
| 77 | |
| 78 | extern char *varobj_get_type (struct varobj *var); |
| 79 | |
| 80 | extern enum varobj_languages varobj_get_language (struct varobj *var); |
| 81 | |
| 82 | extern int varobj_get_attributes (struct varobj *var); |
| 83 | |
| 84 | extern char *varobj_get_value (struct varobj *var); |
| 85 | |
| 86 | extern int varobj_set_value (struct varobj *var, char *expression); |
| 87 | |
| 88 | extern int varobj_list (struct varobj ***rootlist); |
| 89 | |
| 90 | extern int varobj_update (struct varobj *var, struct varobj ***changelist); |
| 91 | |
| 92 | #endif /* VAROBJ_H */ |