aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index bdd6f50..cce8d00 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -1456,7 +1456,7 @@ encode_actions_1 (struct command_line *action,
}
else
{
- unsigned long addr, len;
+ unsigned long addr;
struct cleanup *old_chain = NULL;
struct cleanup *old_chain1 = NULL;
@@ -1486,8 +1486,10 @@ encode_actions_1 (struct command_line *action,
/* Safe because we know it's a simple expression. */
tempval = evaluate_expression (exp);
addr = value_address (tempval);
- len = TYPE_LENGTH (check_typedef (exp->elts[1].type));
- add_memrange (collect, memrange_absolute, addr, len);
+ /* Initialize the TYPE_LENGTH if it is a typedef. */
+ check_typedef (exp->elts[1].type);
+ add_memrange (collect, memrange_absolute, addr,
+ TYPE_LENGTH (exp->elts[1].type));
break;
case OP_VAR_VALUE: