diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-04-03 14:39:51 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-04-03 14:39:51 +0000 |
commit | 2427aa4bd15e88a2aba5fe710c7425c4957f1819 (patch) | |
tree | fe33d174804e2dc254d13a2e0c1cefa20d2c1eb7 /gdb/value.h | |
parent | 164d8e9ac9ec74d970aa42550000539710e96a8e (diff) | |
download | gdb-2427aa4bd15e88a2aba5fe710c7425c4957f1819.tar.gz |
gdb/
* cp-valprint.c (cp_print_value_fields): Check valprint_check_validity
for TYPE_VPTR_FIELDNO.
* valprint.c (valprint_check_validity): Make it global, move the
function comment ...
* value.h (valprint_check_validity): ... to this new declaration.
gdb/testsuite/
* gdb.trace/unavailable.exp
(collect globals: print object on: print derived_partial)
(collect globals: print object on: print derived_whole)
(collect globals: print object off: print derived_partial)
(collect globals: print object off: print derived_whole): Update
expected output.
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h index d501b52e5d1..4d04a200e43 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -213,6 +213,20 @@ extern struct value *allocate_computed_value (struct type *type, const struct lval_funcs *funcs, void *closure); +/* Helper function to check the validity of some bits of a value. + + If TYPE represents some aggregate type (e.g., a structure), return 1. + + Otherwise, any of the bytes starting at OFFSET and extending for + TYPE_LENGTH(TYPE) bytes are invalid, print a message to STREAM and + return 0. The checking is done using FUNCS. + + Otherwise, return 1. */ + +extern int valprint_check_validity (struct ui_file *stream, struct type *type, + int embedded_offset, + const struct value *val); + extern struct value *allocate_optimized_out_value (struct type *type); /* If VALUE is lval_computed, return its lval_funcs structure. */ |