From: "Andrew Burgess" <aburgess@broadcom.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 12/12] Remove old lval check valid functions.
Date: Mon, 12 Aug 2013 12:33:00 -0000 [thread overview]
Message-ID: <5208D60E.9090505@broadcom.com> (raw)
In-Reply-To: <5208D1DF.1090201@broadcom.com>
This was the old way we supported checking for partially optimized out
values, this is no longer needed given this patch set.
Just remove unused code.
OK to apply?
Thanks,
Andrew
gdb/ChangeLog
2013-08-11 Andrew Burgess <aburgess@broadcom.com>
* dwarf2loc.c (entry_data_value_funcs): Remove check_validity and
check_any_valid fields.
(check_pieced_value_validity): Delete.
(check_pieced_value_invalid): Delete.
(pieced_value_funcs): Remove check_validity and check_any_valid
fields.
* opencl-lang.c (lval_func_check_validity): Delete.
(lval_func_check_any_valid): Delete.
(opencl_value_funcs): Remove check_validity and check_any_valid
fields.
* value.h (struct lval_funcs): Remove check_validity and
check_any_valid fields.
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 553f720..1ddf841 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -1275,8 +1275,6 @@ static const struct lval_funcs
entry_data_value_funcs =
{
NULL, /* read */
NULL, /* write */
- NULL, /* check_validity */
- NULL, /* check_any_valid */
NULL, /* indirect */
entry_data_value_coerce_ref,
NULL, /* check_synthetic_pointer */
@@ -1996,22 +1994,6 @@ check_pieced_value_bits (const struct value
*value, int bit_offset,
return validity;
}
-static int
-check_pieced_value_validity (const struct value *value, int bit_offset,
- int bit_length)
-{
- return check_pieced_value_bits (value, bit_offset, bit_length,
- DWARF_VALUE_MEMORY);
-}
-
-static int
-check_pieced_value_invalid (const struct value *value)
-{
- return check_pieced_value_bits (value, 0,
- 8 * TYPE_LENGTH (value_type (value)),
- DWARF_VALUE_OPTIMIZED_OUT);
-}
-
/* An implementation of an lval_funcs method to see whether a value is
a synthetic pointer. */
@@ -2169,8 +2151,6 @@ free_pieced_value_closure (struct value *v)
static const struct lval_funcs pieced_value_funcs = {
read_pieced_value,
write_pieced_value,
- check_pieced_value_validity,
- check_pieced_value_invalid,
indirect_pieced_value,
NULL, /* coerce_ref */
check_pieced_synthetic_pointer,
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c
index 4da2c9d..100295b 100644
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -240,58 +240,6 @@ lval_func_write (struct value *v, struct value
*fromval)
value_free_to_mark (mark);
}
-/* Return nonzero if all bits in V within OFFSET and LENGTH are valid. */
-
-static int
-lval_func_check_validity (const struct value *v, int offset, int length)
-{
- struct lval_closure *c = (struct lval_closure *)
value_computed_closure (v);
- /* Size of the target type in bits. */
- int elsize =
- TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type
(c->val)))) * 8;
- int startrest = offset % elsize;
- int start = offset / elsize;
- int endrest = (offset + length) % elsize;
- int end = (offset + length) / elsize;
- int i;
-
- if (endrest)
- end++;
-
- if (end > c->n)
- return 0;
-
- for (i = start; i < end; i++)
- {
- int comp_offset = (i == start) ? startrest : 0;
- int comp_length = (i == end) ? endrest : elsize;
-
- if (!value_bits_available (c->val, c->indices[i] * elsize +
comp_offset,
- comp_length))
- return 0;
- }
-
- return 1;
-}
-
-/* Return nonzero if any bit in V is valid. */
-
-static int
-lval_func_check_any_valid (const struct value *v)
-{
- struct lval_closure *c = (struct lval_closure *)
value_computed_closure (v);
- /* Size of the target type in bits. */
- int elsize =
- TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type
(c->val)))) * 8;
- int i;
-
- for (i = 0; i < c->n; i++)
- if (value_bits_available (c->val, c->indices[i] * elsize, elsize))
- return 1;
-
- return 0;
-}
-
/* Return nonzero if bits in V from OFFSET and LENGTH represent a
synthetic pointer. */
@@ -358,8 +306,6 @@ static const struct lval_funcs opencl_value_funcs =
{
lval_func_read,
lval_func_write,
- lval_func_check_validity,
- lval_func_check_any_valid,
NULL, /* indirect */
NULL, /* coerce_ref */
lval_func_check_synthetic_pointer,
diff --git a/gdb/value.h b/gdb/value.h
index d2b7f18..c848338 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -180,14 +180,6 @@ struct lval_funcs
TOVAL is not considered as an lvalue. */
void (*write) (struct value *toval, struct value *fromval);
- /* Check the validity of some bits in VALUE. This should return 1
- if all the bits starting at OFFSET and extending for LENGTH bits
- are valid, or 0 if any bit is invalid. */
- int (*check_validity) (const struct value *value, int offset, int
length);
-
- /* Return 1 if any bit in VALUE is valid, 0 if they are all invalid. */
- int (*check_any_valid) (const struct value *value);
-
/* If non-NULL, this is used to implement pointer indirection for
this value. This method may return NULL, in which case value_ind
will fall back to ordinary indirection. */
next prev parent reply other threads:[~2013-08-12 12:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 12:15 [RFC 00/12] Merge value optimized_out and unavailable Andrew Burgess
2013-08-12 12:16 ` [PATCH 01/12] Introduce is_unavailable_error Andrew Burgess
2013-08-12 12:18 ` [PATCH 02/12]: Remove set_value_optimized_out Andrew Burgess
2013-08-12 12:20 ` [PATCH 03/12] Mark optimized out values as non-lazy Andrew Burgess
2013-11-26 16:38 ` Pedro Alves
2013-11-26 19:19 ` Andrew Burgess
2013-08-12 12:22 ` [PATCH 04/12] Introduce OPTIMIZED_OUT_ERROR Andrew Burgess
2013-08-12 12:24 ` [PATCH 05/12] Convert the unavailable to be bit based Andrew Burgess
2013-08-12 12:27 ` [PATCH 06/12] Delete value_bits_valid Andrew Burgess
2013-11-25 21:41 ` [PATCH] Print entirely unavailable struct/union values as a single <unavailable>. (Re: [PATCH 06/12] Delete value_bits_valid.) Pedro Alves
2013-11-26 10:13 ` Andrew Burgess
2013-11-28 20:14 ` Pedro Alves
2013-08-12 12:28 ` [PATCH 07/12] Generic print unavailable or optimized out function Andrew Burgess
2013-08-12 12:29 ` [PATCH 08/12] Replace some value_optimized_out with value_entirely_available Andrew Burgess
2013-11-27 17:52 ` [COMMITTED PATCH 0/2] "set debug frame 1" and not saved registers (was: Re: [PATCH 08/12] Replace some value_optimized_out with value_entirely_available) Pedro Alves
2013-11-27 18:14 ` [PATCH 1/2] Make "set debug frame 1" use the standard print routine for optimized out values Pedro Alves
2013-11-27 18:35 ` [PATCH 2/2] Make "set debug frame 1" output print <not saved> instead of <optimized out> Pedro Alves
2013-11-27 18:41 ` Pedro Alves
2013-11-27 18:53 ` [pushed] Fix type of not saved registers. (was: Re: [PATCH 2/2] Make "set debug frame 1" output print <not saved> instead of <optimized out>.) Pedro Alves
2013-08-12 12:30 ` [PATCH 09/12] DWARF value, mark unavailable in bits not bytes Andrew Burgess
2013-08-12 12:31 ` [PATCH 10/12] Merge optimized_out into unavailable vector Andrew Burgess
2013-08-12 12:32 ` [PATCH 11/12] Add test mechanism for value " Andrew Burgess
2013-08-12 12:33 ` Andrew Burgess [this message]
2013-08-29 17:21 ` PING: Re: [RFC 00/12] Merge value optimized_out and unavailable Andrew Burgess
2013-11-12 9:37 ` Andrew Burgess
2013-11-29 22:31 ` Pedro Alves
2013-12-04 14:54 ` Andrew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5208D60E.9090505@broadcom.com \
--to=aburgess@broadcom.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox