Simplify agent_expr constructor
This simplifies the agent_expr constructor a bit, and removes the destructor entirely. Reviewed-by: John Baldwin <jhb@FreeBSD.org>
This commit is contained in:
parent
a2bbca9fa5
commit
b0b5ba6b7f
2 changed files with 6 additions and 17 deletions
|
@ -36,19 +36,6 @@ static void generic_ext (struct agent_expr *x, enum agent_op op, int n);
|
|||
|
||||
/* Functions for building expressions. */
|
||||
|
||||
agent_expr::agent_expr (struct gdbarch *gdbarch, CORE_ADDR scope)
|
||||
{
|
||||
this->gdbarch = gdbarch;
|
||||
this->scope = scope;
|
||||
|
||||
this->tracing = 0;
|
||||
this->trace_string = 0;
|
||||
}
|
||||
|
||||
agent_expr::~agent_expr ()
|
||||
{
|
||||
}
|
||||
|
||||
/* Append the low N bytes of VAL as an N-byte integer to the
|
||||
expression X, in big-endian order. */
|
||||
static void
|
||||
|
|
10
gdb/ax.h
10
gdb/ax.h
|
@ -81,9 +81,11 @@ enum agent_flaws
|
|||
struct agent_expr
|
||||
{
|
||||
/* Construct an empty agent expression. */
|
||||
explicit agent_expr (struct gdbarch *gdbarch, CORE_ADDR scope);
|
||||
|
||||
~agent_expr ();
|
||||
agent_expr (struct gdbarch *gdbarch, CORE_ADDR scope)
|
||||
: gdbarch (gdbarch),
|
||||
scope (scope),
|
||||
tracing (0)
|
||||
{ }
|
||||
|
||||
/* The bytes of the expression. */
|
||||
gdb::byte_vector buf;
|
||||
|
@ -139,7 +141,7 @@ struct agent_expr
|
|||
tracenz bytecode to record nonzero bytes, up to a length that
|
||||
is the value of trace_string. */
|
||||
|
||||
int trace_string;
|
||||
int trace_string = 0;
|
||||
};
|
||||
|
||||
/* An agent_expr owning pointer. */
|
||||
|
|
Loading…
Add table
Reference in a new issue