1 /* longjmp-free interface between gdb and gdbtk.
2 Copyright 1999 Free Software Foundation, Inc.
4 This file is part of GDB. It contains routines to safely call common gdb
5 functions without the fear of longjmp'ing.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21 #ifndef GDBTK_WRAPPER_H
22 #define GDBTK_WRAPPER_H
23 /* Use this struct used to pass arguments to wrapper routines. We assume
24 (arbitrarily) that no gdb function takes more than ten arguments. */
25 struct gdb_wrapper_arguments
{
27 /* Pointer to some result from the gdb function call, if any */
30 /* The list of arguments. */
34 /* Whenever any gdb function wrapper is called, its return status is: */
35 typedef enum gdb_wrapper_status
{ GDB_OK
, GDB_ERROR
} gdb_result
;
37 /* This list of functions which have been wrapped. Please keep this list
38 in alphabetical order, using "GDB_" to prefix the actual name of the
40 extern gdb_result GDB_evaluate_expression
PARAMS ((struct expression
*expr
, value_ptr
*val
));
41 extern gdb_result GDB_select_frame
PARAMS ((struct frame_info
*fi
, int level
));
42 extern gdb_result GDB_type_print
PARAMS ((value_ptr val
, char *varstring
, GDB_FILE
*stream
, int show
));
43 extern gdb_result GDB_val_print
PARAMS ((struct type
*type
, char *valaddr
,
44 CORE_ADDR address
, GDB_FILE
*stream
,
45 int format
, int deref_ref
, int recurse
,
46 enum val_prettyprint pretty
));
47 extern gdb_result GDB_value_fetch_lazy
PARAMS ((value_ptr value
));
48 extern gdb_result GDB_value_equal
PARAMS ((value_ptr val1
, value_ptr val2
, int *result
));
49 extern gdb_result GDB_parse_exp_1
PARAMS ((char **stringptr
, struct block
*block
, int comma
,
50 struct expression
**result
));
51 extern gdb_result GDB_evaluate_type
PARAMS ((struct expression
*exp
, value_ptr
*result
));
52 extern gdb_result GDB_block_for_pc
PARAMS ((CORE_ADDR pc
, struct block
**result
));
53 extern gdb_result GDB_block_innermost_frame
PARAMS ((struct block
*block
,
54 struct frame_info
**result
));
55 extern gdb_result GDB_reinit_frame_cache
PARAMS ((void));
56 extern gdb_result GDB_find_frame_addr_in_frame_chain
PARAMS ((CORE_ADDR addr
,
57 struct frame_info
**result
));
58 #endif /* GDBTK_WRAPPER_H */
60 /* Local variables: */
61 /* change-log-default-name: "ChangeLog-gdbtk" */