1 /* Longjump free calls to GDB internal routines.
3 Copyright (C) 1999, 2000, 2005, 2007, 2008, 2009, 2010, 2011
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"
27 gdb_parse_exp_1 (char **stringptr
, struct block
*block
, int comma
,
28 struct expression
**expression
)
30 volatile struct gdb_exception except
;
32 TRY_CATCH (except
, RETURN_MASK_ERROR
)
34 *expression
= parse_exp_1 (stringptr
, block
, comma
);
37 if (except
.reason
< 0)
43 gdb_evaluate_expression (struct expression
*exp
, struct value
**value
)
45 volatile struct gdb_exception except
;
47 TRY_CATCH (except
, RETURN_MASK_ERROR
)
49 *value
= evaluate_expression(exp
);
52 if (except
.reason
< 0)
58 gdb_value_fetch_lazy (struct value
*val
)
60 volatile struct gdb_exception except
;
62 TRY_CATCH (except
, RETURN_MASK_ERROR
)
64 value_fetch_lazy (val
);
67 if (except
.reason
< 0)
73 gdb_value_equal (struct value
*val1
, struct value
*val2
, int *result
)
75 volatile struct gdb_exception except
;
77 TRY_CATCH (except
, RETURN_MASK_ERROR
)
79 *result
= value_equal (val1
, val2
);
82 if (except
.reason
< 0)
88 gdb_value_assign (struct value
*val1
, struct value
*val2
,
89 struct value
**result
)
91 volatile struct gdb_exception except
;
93 TRY_CATCH (except
, RETURN_MASK_ERROR
)
95 *result
= value_assign (val1
, val2
);
98 if (except
.reason
< 0)
104 gdb_value_subscript (struct value
*val
, LONGEST index
,
105 struct value
**result
)
107 volatile struct gdb_exception except
;
109 TRY_CATCH (except
, RETURN_MASK_ERROR
)
111 *result
= value_subscript (val
, index
);
114 if (except
.reason
< 0)
120 gdb_value_ind (struct value
*val
, struct value
**result
)
122 volatile struct gdb_exception except
;
124 TRY_CATCH (except
, RETURN_MASK_ERROR
)
126 *result
= value_ind (val
);
129 if (except
.reason
< 0)
135 gdb_parse_and_eval_type (char *p
, int length
, struct type
**type
)
137 volatile struct gdb_exception except
;
139 TRY_CATCH (except
, RETURN_MASK_ERROR
)
141 *type
= parse_and_eval_type (p
, length
);
144 if (except
.reason
< 0)
150 gdb_value_struct_elt (struct ui_out
*uiout
, struct value
**result
,
151 struct value
**argp
, struct value
**args
, char *name
,
152 int *static_memfuncp
, char *err
)
154 volatile struct gdb_exception except
;
156 TRY_CATCH (except
, RETURN_MASK_ERROR
)
158 *result
= value_struct_elt (argp
, args
, name
, static_memfuncp
, err
);
161 if (except
.reason
< 0)
166 /* Call target_find_new_threads without throwing exception. Exception is
167 printed if it got thrown. */
170 gdb_target_find_new_threads (void)
172 volatile struct gdb_exception except
;
174 TRY_CATCH (except
, RETURN_MASK_ERROR
)
176 target_find_new_threads ();
179 if (except
.reason
< 0)
181 exception_print (gdb_stderr
, except
);
This page took 0.04728 seconds and 4 git commands to generate.