aboutsummaryrefslogtreecommitdiff
path: root/gdb/findcmd.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2012-09-25 12:48:53 +0000
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2012-09-25 12:48:53 +0000
commit744a80590447619c1c58d7d6a6e780ae6bd29777 (patch)
treeb491fe31aed31cb5602ebc51515298738489312f /gdb/findcmd.c
parenta4b411d69d3bb453546f1120664377057da8a444 (diff)
downloadgdb-744a80590447619c1c58d7d6a6e780ae6bd29777.zip
gdb-744a80590447619c1c58d7d6a6e780ae6bd29777.tar.gz
gdb-744a80590447619c1c58d7d6a6e780ae6bd29777.tar.bz2
* ada-valprint.c (ada_val_print_1): Eliminate single-use
variable LEN. * alpha-tdep.c (alpha_extract_return_value): Use TYPE_LENGTH directly. (alpha_store_return_value): Likewise. * amd64-tdep.c (amd64_classify_aggregate): Likewise. (amd64_push_arguments): Likewise. * ax-gdb.c (gen_trace_static_fields): Likewise. (gen_traced_pop): Likewise. * bfin-tdep.c (bfin_push_dummy_call): Likewise. * breakpoint.c (update_watchpoint): Likewise. * findcmd.c (parse_find_args): Use local variable for type instead of length. * findvar.c (default_read_var_value): Use TYPE_LENGTH directly. * h8300-tdep.c (h8300h_extract_return_value): Likewise. (h8300_store_return_value): Likewise. * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise. Use i386_darwin_arg_type_alignment directly. * infcall.c (call_function_by_hand): Use TYPE_LENGTH directly. * lm32-tdep.c (lm32_push_dummy_call): Likewise. * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise. (m68hc11_extract_return_value): Likewise. * mep-tdep.c (mep_push_dummy_call): Likewise. * printcmd.c (float_type_from_length): Likewise. * s390-tdep.c (s390_value_from_register): Likewise. * stack.c (read_frame_arg): Likewise. * tracepoint.c (encode_actions_1): Likewise. * valops.c (value_fetch_lazy): Use local variable for type instead of length. Use TYPE_LENGTH directly. * value.c (value_contents_equal): Use TYPE_LENGTH directly.
Diffstat (limited to 'gdb/findcmd.c')
-rw-r--r--gdb/findcmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/findcmd.c b/gdb/findcmd.c
index 68184aa..116e0b0 100644
--- a/gdb/findcmd.c
+++ b/gdb/findcmd.c
@@ -169,19 +169,19 @@ parse_find_args (char *args, ULONGEST *max_countp,
while (*s != '\0')
{
LONGEST x;
- int val_bytes;
+ struct type *t;
ULONGEST pattern_buf_size_need;
while (isspace (*s))
++s;
v = parse_to_comma_and_eval (&s);
- val_bytes = TYPE_LENGTH (value_type (v));
+ t = value_type (v);
/* Keep it simple and assume size == 'g' when watching for when we
need to grow the pattern buf. */
pattern_buf_size_need = (pattern_buf_end - pattern_buf
- + max (val_bytes, sizeof (int64_t)));
+ + max (TYPE_LENGTH (t), sizeof (int64_t)));
if (pattern_buf_size_need > pattern_buf_size)
{
size_t current_offset = pattern_buf_end - pattern_buf;
@@ -215,8 +215,8 @@ parse_find_args (char *args, ULONGEST *max_countp,
}
else
{
- memcpy (pattern_buf_end, value_contents (v), val_bytes);
- pattern_buf_end += val_bytes;
+ memcpy (pattern_buf_end, value_contents (v), TYPE_LENGTH (t));
+ pattern_buf_end += TYPE_LENGTH (t);
}
if (*s == ',')