aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-11-24 10:47:27 +0000
committerYao Qi <yao.qi@linaro.org>2017-11-24 10:47:27 +0000
commit98ead37e9735438986934f9f1f35f020a093fe07 (patch)
treeced7a341a4e4be5149213f3c80bc9890fca38518 /gdb/value.h
parent62ad7ce71b243df3e8d7d4f8b8560a7316233a9e (diff)
downloadgdb-98ead37e9735438986934f9f1f35f020a093fe07.zip
gdb-98ead37e9735438986934f9f1f35f020a093fe07.tar.gz
gdb-98ead37e9735438986934f9f1f35f020a093fe07.tar.bz2
Change value_contents_eq return bool
This patch changes value_contents_eq return type from int to bool. gdb: 2017-11-24 Yao Qi <yao.qi@linaro.org> * mi/mi-main.c (register_changed_p): Update. * value.c (value_contents_bits_eq): Change return type. (value_contents_eq): Likewise. * value.h: Update comments.
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 2b6ae35..e0de844 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -549,12 +549,12 @@ extern void mark_value_bits_unavailable (struct value *value,
then:
- value_contents_eq(val, 0, val, 8, 6) => 1
- value_contents_eq(val, 0, val, 4, 4) => 0
- value_contents_eq(val, 0, val, 8, 8) => 0
- value_contents_eq(val, 4, val, 12, 2) => 1
- value_contents_eq(val, 4, val, 12, 4) => 0
- value_contents_eq(val, 3, val, 4, 4) => 0
+ value_contents_eq(val, 0, val, 8, 6) => true
+ value_contents_eq(val, 0, val, 4, 4) => false
+ value_contents_eq(val, 0, val, 8, 8) => false
+ value_contents_eq(val, 4, val, 12, 2) => true
+ value_contents_eq(val, 4, val, 12, 4) => true
+ value_contents_eq(val, 3, val, 4, 4) => true
If 'x's represent an unavailable byte, 'o' represents an optimized
out byte, in a value with length 8:
@@ -564,9 +564,9 @@ extern void mark_value_bits_unavailable (struct value *value,
then:
- value_contents_eq(val, 0, val, 2, 2) => 1
- value_contents_eq(val, 4, val, 6, 2) => 1
- value_contents_eq(val, 0, val, 4, 4) => 0
+ value_contents_eq(val, 0, val, 2, 2) => true
+ value_contents_eq(val, 4, val, 6, 2) => true
+ value_contents_eq(val, 0, val, 4, 4) => true
We only know whether a value chunk is unavailable or optimized out
if we've tried to read it. As this routine is used by printing
@@ -574,9 +574,9 @@ extern void mark_value_bits_unavailable (struct value *value,
after the inferior is gone, it works with const values. Therefore,
this routine must not be called with lazy values. */
-extern int value_contents_eq (const struct value *val1, LONGEST offset1,
- const struct value *val2, LONGEST offset2,
- LONGEST length);
+extern bool value_contents_eq (const struct value *val1, LONGEST offset1,
+ const struct value *val2, LONGEST offset2,
+ LONGEST length);
/* Read LENGTH addressable memory units starting at MEMADDR into BUFFER,
which is (or will be copied to) VAL's contents buffer offset by