GDB (API)
/home/stan/gdb/src/gdb/gdbtk/generic/gdbtk-wrapper.h
Go to the documentation of this file.
00001 /* longjmp-free interface between gdb and gdbtk.
00002    Copyright (C) 1999, 2000, 2002, 2008 Free Software Foundation, Inc.
00003 
00004 This file is part of GDB.  It contains routines to safely call common gdb
00005 functions without the fear of longjmp'ing.
00006  
00007 This program is free software; you can redistribute it and/or modify
00008 it under the terms of the GNU General Public License as published by
00009 the Free Software Foundation; either version 2 of the License, or
00010 (at your option) any later version.
00011  
00012 This program is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016  
00017 You should have received a copy of the GNU General Public License
00018 along with this program; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020 Boston, MA 02110-1301, USA.  */
00021 
00022 #ifndef GDBTK_WRAPPER_H
00023 #define GDBTK_WRAPPER_H
00024 #include "vec.h"
00025 
00026 /* Use this struct used to pass arguments to wrapper routines. We assume
00027    (arbitrarily) that no gdb function takes more than ten arguments. */
00028 struct gdb_wrapper_arguments {
00029 
00030   /* Pointer to some result from the gdb function call, if any */
00031   union
00032   {
00033     int integer;
00034     void *ptr;
00035   } result;
00036 
00037   /* The list of arguments. */
00038   union
00039   {
00040     void *ptr;
00041     int integer;
00042   } args[10];
00043 };
00044 
00045 /* FIXME: cagney/2002-01-04: GDB no longer uses or supplies the
00046    value_ptr typedef.  Provide one here to keep the Insight code
00047    immediatly happy.  */
00048 typedef struct value *value_ptr;
00049 
00050 /* Whenever any gdb function wrapper is called, its return status is: */
00051 typedef enum gdb_wrapper_status { GDB_OK, GDB_ERROR } gdb_result;
00052 
00053 /* This list of functions which have been wrapped. Please keep this list
00054    in alphabetical order, using "GDB_" to prefix the actual name of the
00055    function. */
00056 extern gdb_result GDB_evaluate_expression (struct expression *expr,
00057                                            value_ptr * val);
00058 extern gdb_result GDB_type_print (value_ptr val, char *varstring,
00059                                   struct ui_file *stream, int show);
00060 extern gdb_result GDB_val_print (struct type *type, char *valaddr,
00061                                  CORE_ADDR address, struct ui_file *stream,
00062                                  int format, int deref_ref, int recurse,
00063                                  enum val_prettyformat pretty);
00064 extern gdb_result GDB_value_fetch_lazy (value_ptr value);
00065 extern gdb_result GDB_value_equal (value_ptr val1, value_ptr val2,
00066                                    int *result);
00067 /*
00068 extern gdb_result GDB_parse_exp_1 (char **stringptr, struct block *block,
00069                                    int comma, struct expression **result);
00070 */
00071 extern gdb_result GDB_evaluate_type (struct expression *exp,
00072                                      value_ptr * result);
00073 extern gdb_result GDB_block_for_pc (CORE_ADDR pc, struct block **result);
00074 extern gdb_result GDB_block_innermost_frame (struct block *block,
00075                                              struct frame_info **result);
00076 extern gdb_result GDB_reinit_frame_cache (void);
00077 extern gdb_result GDB_value_ind (value_ptr val, value_ptr * rval);
00078 extern gdb_result GDB_value_slice (value_ptr val, int low, int num,
00079                                    value_ptr * rval);
00080 extern gdb_result GDB_value_coerce_array (value_ptr val, value_ptr * rval);
00081 extern gdb_result GDB_value_struct_elt (value_ptr * argp, value_ptr * args,
00082                                         char *name, int *static_memfunc,
00083                                         char *err, value_ptr * rval);
00084 extern gdb_result GDB_value_cast (struct type *type, value_ptr val,
00085                                   value_ptr * rval);
00086 gdb_result GDB_get_frame_block (struct frame_info *fi, struct block **rval);
00087 extern gdb_result GDB_get_prev_frame (struct frame_info *fi,
00088                                       struct frame_info **result);
00089 extern gdb_result GDB_get_next_frame (struct frame_info *fi,
00090                                       struct frame_info **result);
00091 extern gdb_result GDB_find_relative_frame (struct frame_info *fi,
00092                                            int *start,
00093                                            struct frame_info **result);
00094 extern gdb_result GDB_get_current_frame (struct frame_info **result);
00095 extern gdb_result GDB_varobj_update (struct varobj **varp, int explicit,
00096                                      VEC (varobj_update_result) **changes);
00097 #endif /* GDBTK_WRAPPER_H */
00098 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines