1/* GDB variable objects API. 2 Copyright 1999, 2000 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 */ 26enum 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 35enum varobj_type 36 { 37 USE_SPECIFIED_FRAME, /* Use the frame passed to varobj_create */ 38 USE_CURRENT_FRAME, /* Use the current frame */ 39 USE_SELECTED_FRAME /* Always reevaluate in selected frame */ 40 }; 41 42/* String representations of gdb's format codes (defined in varobj.c) */ 43extern char *varobj_format_string[]; 44 45/* Languages supported by this variable objects system. */ 46enum varobj_languages 47 { 48 vlang_unknown = 0, vlang_c, vlang_cplus, vlang_java, vlang_end 49 }; 50 51/* String representations of gdb's known languages (defined in varobj.c) */ 52extern char *varobj_language_string[]; 53 54/* Struct thar describes a variable object instance */ 55struct varobj; 56 57/* API functions */ 58 59extern struct varobj *varobj_create (char *objname, 60 char *expression, CORE_ADDR frame, 61 enum varobj_type type); 62 63extern char *varobj_gen_name (void); 64 65extern struct varobj *varobj_get_handle (char *name); 66 67extern char *varobj_get_objname (struct varobj *var); 68 69extern char *varobj_get_expression (struct varobj *var); 70 71extern int varobj_delete (struct varobj *var, char ***dellist, 72 int only_children); 73 74extern enum varobj_display_formats varobj_set_display_format ( 75 struct varobj *var, 76 enum varobj_display_formats format); 77 78extern enum varobj_display_formats varobj_get_display_format ( 79 struct varobj *var); 80 81extern int varobj_get_num_children (struct varobj *var); 82 83extern int varobj_list_children (struct varobj *var, 84 struct varobj ***childlist); 85 86extern char *varobj_get_type (struct varobj *var); 87 88extern enum varobj_languages varobj_get_language (struct varobj *var); 89 90extern int varobj_get_attributes (struct varobj *var); 91 92extern char *varobj_get_value (struct varobj *var); 93 94extern int varobj_set_value (struct varobj *var, char *expression); 95 96extern int varobj_list (struct varobj ***rootlist); 97 98extern int varobj_update (struct varobj **varp, struct varobj ***changelist); 99 100#endif /* VAROBJ_H */ 101