* vec.h (VEC_cleanup): New macro.

(DEF_VEC_ALLOC_FUNC_I): Update.
	(DEF_VEC_ALLOC_FUNC_P): Likewise.
	(DEF_VEC_ALLOC_FUNC_O): Likewise.
	* dwarf2loc.c (struct axs_var_loc): Remove.
	(unimplemented): New function.
	(translate_register): Likewise.
	(access_memory): Likewise.
	(compile_dwarf_to_ax): Likewise.
	(dwarf2_tracepoint_var_loc): Remove.
	(dwarf2_tracepoint_var_access): Likewise.
	(dwarf2_tracepoint_var_ref): Likewise.
	(locexpr_tracepoint_var_ref): Use compile_dwarf_to_ax.
	(loclist_tracepoint_var_ref): Likewise.
	* dwarf2expr.h (dwarf_expr_require_composition): Declare.
	* dwarf2expr.c (dwarf_expr_require_composition): Rename from
	require_composition.  No longer static.
	(execute_stack_op): Update.
	* ax-gdb.h (trace_kludge): Declare.
This commit is contained in:
Tom Tromey
2010-06-11 15:21:11 +00:00
parent 81bb31c0d9
commit 3cf03773b7
6 changed files with 789 additions and 243 deletions

View File

@@ -184,6 +184,13 @@
#define VEC_free(T,V) (VEC_OP(T,free)(&V))
/* A cleanup function for a vector.
void VEC_T_cleanup(void *);
Clean up a vector. */
#define VEC_cleanup(T) (VEC_OP(T,cleanup))
/* Use these to determine the required size and initialization of a
vector embedded within another structure (as the final member).
@@ -461,6 +468,15 @@ static inline void VEC_OP (T,free) \
*vec_ = NULL; \
} \
\
static inline void VEC_OP (T,cleanup) \
(void *arg_) \
{ \
VEC(T) **vec_ = arg_; \
if (*vec_) \
vec_free_ (*vec_); \
*vec_ = NULL; \
} \
\
static inline int VEC_OP (T,reserve) \
(VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) \
{ \
@@ -699,6 +715,15 @@ static inline void VEC_OP (T,free) \
*vec_ = NULL; \
} \
\
static inline void VEC_OP (T,cleanup) \
(void *arg_) \
{ \
VEC(T) **vec_ = arg_; \
if (*vec_) \
vec_free_ (*vec_); \
*vec_ = NULL; \
} \
\
static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) \
{ \
size_t len_ = vec_ ? vec_->num : 0; \
@@ -957,6 +982,15 @@ static inline void VEC_OP (T,free) \
*vec_ = NULL; \
} \
\
static inline void VEC_OP (T,cleanup) \
(void *arg_) \
{ \
VEC(T) **vec_ = arg_; \
if (*vec_) \
vec_free_ (*vec_); \
*vec_ = NULL; \
} \
\
static inline int VEC_OP (T,reserve) \
(VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) \
{ \