1 /* Longjump free calls to GDB internal routines.
3 Copyright (C) 1999, 2000, 2005, 2007, 2008, 2009
4 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 #include "exceptions.h"
26 gdb_parse_exp_1 (char **stringptr
, struct block
*block
, int comma
,
27 struct expression
**expression
)
29 volatile struct gdb_exception except
;
31 TRY_CATCH (except
, RETURN_MASK_ERROR
)
33 *expression
= parse_exp_1 (stringptr
, block
, comma
);
36 if (except
.reason
< 0)
42 gdb_evaluate_expression (struct expression
*exp
, struct value
**value
)
44 volatile struct gdb_exception except
;
46 TRY_CATCH (except
, RETURN_MASK_ERROR
)
48 *value
= evaluate_expression(exp
);
51 if (except
.reason
< 0)
57 gdb_value_fetch_lazy (struct value
*val
)
59 volatile struct gdb_exception except
;
61 TRY_CATCH (except
, RETURN_MASK_ERROR
)
63 value_fetch_lazy (val
);
66 if (except
.reason
< 0)
72 gdb_value_equal (struct value
*val1
, struct value
*val2
, int *result
)
74 volatile struct gdb_exception except
;
76 TRY_CATCH (except
, RETURN_MASK_ERROR
)
78 *result
= value_equal (val1
, val2
);
81 if (except
.reason
< 0)
87 gdb_value_assign (struct value
*val1
, struct value
*val2
,
88 struct value
**result
)
90 volatile struct gdb_exception except
;
92 TRY_CATCH (except
, RETURN_MASK_ERROR
)
94 *result
= value_assign (val1
, val2
);
97 if (except
.reason
< 0)
103 gdb_value_subscript (struct value
*val
, LONGEST index
,
104 struct value
**result
)
106 volatile struct gdb_exception except
;
108 TRY_CATCH (except
, RETURN_MASK_ERROR
)
110 *result
= value_subscript (val
, index
);
113 if (except
.reason
< 0)
119 gdb_value_ind (struct value
*val
, struct value
**result
)
121 volatile struct gdb_exception except
;
123 TRY_CATCH (except
, RETURN_MASK_ERROR
)
125 *result
= value_ind (val
);
128 if (except
.reason
< 0)
134 gdb_parse_and_eval_type (char *p
, int length
, struct type
**type
)
136 volatile struct gdb_exception except
;
138 TRY_CATCH (except
, RETURN_MASK_ERROR
)
140 *type
= parse_and_eval_type (p
, length
);
143 if (except
.reason
< 0)
149 gdb_value_struct_elt (struct ui_out
*uiout
, struct value
**result
,
150 struct value
**argp
, struct value
**args
, char *name
,
151 int *static_memfuncp
, char *err
)
153 volatile struct gdb_exception except
;
155 TRY_CATCH (except
, RETURN_MASK_ERROR
)
157 *result
= value_struct_elt (argp
, args
, name
, static_memfuncp
, err
);
160 if (except
.reason
< 0)
This page took 0.033991 seconds and 4 git commands to generate.