mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-11 14:14:23 +00:00
* 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:
parent
81bb31c0d9
commit
3cf03773b7
@ -1,3 +1,25 @@
|
||||
2010-06-11 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2010-06-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* breakpoint.c (breakpoint_restore_shadows): New OWNER comment.
|
||||
|
@ -108,4 +108,6 @@ extern struct agent_expr *gen_trace_for_var (CORE_ADDR, struct gdbarch *,
|
||||
|
||||
extern struct agent_expr *gen_eval_for_expr (CORE_ADDR, struct expression *);
|
||||
|
||||
extern int trace_kludge;
|
||||
|
||||
#endif /* AX_GDB_H */
|
||||
|
@ -334,9 +334,9 @@ signed_address_type (struct gdbarch *gdbarch, int addr_size)
|
||||
/* Check that the current operator is either at the end of an
|
||||
expression, or that it is followed by a composition operator. */
|
||||
|
||||
static void
|
||||
require_composition (const gdb_byte *op_ptr, const gdb_byte *op_end,
|
||||
const char *op_name)
|
||||
void
|
||||
dwarf_expr_require_composition (const gdb_byte *op_ptr, const gdb_byte *op_end,
|
||||
const char *op_name)
|
||||
{
|
||||
/* It seems like DW_OP_GNU_uninit should be handled here. However,
|
||||
it doesn't seem to make sense for DW_OP_*_value, and it was not
|
||||
@ -511,7 +511,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
|
||||
|
||||
case DW_OP_regx:
|
||||
op_ptr = read_uleb128 (op_ptr, op_end, ®);
|
||||
require_composition (op_ptr, op_end, "DW_OP_regx");
|
||||
dwarf_expr_require_composition (op_ptr, op_end, "DW_OP_regx");
|
||||
|
||||
result = reg;
|
||||
ctx->location = DWARF_VALUE_REGISTER;
|
||||
@ -528,13 +528,14 @@ execute_stack_op (struct dwarf_expr_context *ctx,
|
||||
ctx->data = op_ptr;
|
||||
ctx->location = DWARF_VALUE_LITERAL;
|
||||
op_ptr += len;
|
||||
require_composition (op_ptr, op_end, "DW_OP_implicit_value");
|
||||
dwarf_expr_require_composition (op_ptr, op_end,
|
||||
"DW_OP_implicit_value");
|
||||
}
|
||||
goto no_push;
|
||||
|
||||
case DW_OP_stack_value:
|
||||
ctx->location = DWARF_VALUE_STACK;
|
||||
require_composition (op_ptr, op_end, "DW_OP_stack_value");
|
||||
dwarf_expr_require_composition (op_ptr, op_end, "DW_OP_stack_value");
|
||||
goto no_push;
|
||||
|
||||
case DW_OP_breg0:
|
||||
|
@ -209,4 +209,7 @@ CORE_ADDR dwarf2_read_address (struct gdbarch *gdbarch, const gdb_byte *buf,
|
||||
|
||||
const char *dwarf_stack_op_name (unsigned int, int);
|
||||
|
||||
void dwarf_expr_require_composition (const gdb_byte *, const gdb_byte *,
|
||||
const char *);
|
||||
|
||||
#endif /* dwarf2expr.h */
|
||||
|
958
gdb/dwarf2loc.c
958
gdb/dwarf2loc.c
File diff suppressed because it is too large
Load Diff
34
gdb/vec.h
34
gdb/vec.h
@ -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) \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user