aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2020-08-24 22:51:50 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-08-24 22:51:50 -0400
commit2677f2d3fdb07cc77d0d88e52fb37dfb6217dec9 (patch)
tree43b4857a5707aa1db9293a335b94c1d81df91995 /gdb/valprint.h
parent4cf3d79e64bebab661564d81bd72a9d8436dbb3a (diff)
downloadbinutils-2677f2d3fdb07cc77d0d88e52fb37dfb6217dec9.zip
binutils-2677f2d3fdb07cc77d0d88e52fb37dfb6217dec9.tar.gz
binutils-2677f2d3fdb07cc77d0d88e52fb37dfb6217dec9.tar.bz2
gdb: move declaration of valprint_check_validity to valprint.h
The implementation is in valprint.c, so the declaration belongs in valprint.h. gdb/ChangeLog: * value.h (valprint_check_validity): Move declaration from here... * valprint.h (valprint_check_validity): ... to here. Change-Id: Ibe577d3696720099e6d79888d4ee8e3c1bf05a26
Diffstat (limited to 'gdb/valprint.h')
-rw-r--r--gdb/valprint.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/valprint.h b/gdb/valprint.h
index 57bc033..489d14b 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -171,6 +171,20 @@ extern int read_string (CORE_ADDR addr, int len, int width,
gdb::unique_xmalloc_ptr<gdb_byte> *buffer,
int *bytes_read);
+/* 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,
+ LONGEST embedded_offset,
+ const struct value *val);
+
extern void val_print_optimized_out (const struct value *val,
struct ui_file *stream);