1 /* Longjump free calls to GDB internal routines.
3 Copyright (C) 1999, 2000, 2005, 2007, 2008 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #include "exceptions.h"
25 gdb_parse_exp_1 (char **stringptr
, struct block
*block
, int comma
,
26 struct expression
**expression
)
28 volatile struct gdb_exception except
;
30 TRY_CATCH (except
, RETURN_MASK_ERROR
)
32 *expression
= parse_exp_1 (stringptr
, block
, comma
);
35 if (except
.reason
< 0)
41 gdb_evaluate_expression (struct expression
*exp
, struct value
**value
)
43 volatile struct gdb_exception except
;
45 TRY_CATCH (except
, RETURN_MASK_ERROR
)
47 *value
= evaluate_expression(exp
);
50 if (except
.reason
< 0)
56 gdb_value_fetch_lazy (struct value
*val
)
58 volatile struct gdb_exception except
;
60 TRY_CATCH (except
, RETURN_MASK_ERROR
)
62 value_fetch_lazy (val
);
65 if (except
.reason
< 0)
71 gdb_value_equal (struct value
*val1
, struct value
*val2
, int *result
)
73 volatile struct gdb_exception except
;
75 TRY_CATCH (except
, RETURN_MASK_ERROR
)
77 *result
= value_equal (val1
, val2
);
80 if (except
.reason
< 0)
86 gdb_value_assign (struct value
*val1
, struct value
*val2
,
87 struct value
**result
)
89 volatile struct gdb_exception except
;
91 TRY_CATCH (except
, RETURN_MASK_ERROR
)
93 *result
= value_assign (val1
, val2
);
96 if (except
.reason
< 0)
102 gdb_value_subscript (struct value
*val1
, struct value
*val2
,
103 struct value
**result
)
105 volatile struct gdb_exception except
;
107 TRY_CATCH (except
, RETURN_MASK_ERROR
)
109 *result
= value_subscript (val1
, val2
);
112 if (except
.reason
< 0)
118 gdb_value_ind (struct value
*val
, struct value
**result
)
120 volatile struct gdb_exception except
;
122 TRY_CATCH (except
, RETURN_MASK_ERROR
)
124 *result
= value_ind (val
);
127 if (except
.reason
< 0)
133 gdb_parse_and_eval_type (char *p
, int length
, struct type
**type
)
135 volatile struct gdb_exception except
;
137 TRY_CATCH (except
, RETURN_MASK_ERROR
)
139 *type
= parse_and_eval_type (p
, length
);
142 if (except
.reason
< 0)
148 gdb_value_struct_elt (struct ui_out
*uiout
, struct value
**result
,
149 struct value
**argp
, struct value
**args
, char *name
,
150 int *static_memfuncp
, char *err
)
152 volatile struct gdb_exception except
;
154 TRY_CATCH (except
, RETURN_MASK_ALL
)
156 *result
= value_struct_elt (argp
, args
, name
, static_memfuncp
, err
);
159 if (except
.reason
< 0)
This page took 0.031851 seconds and 4 git commands to generate.