This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Make some value.h interfaces const
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 28 Jan 2005 11:46:27 -0500
- Subject: [commit] Make some value.h interfaces const
little by little, committed,
Andrew
2005-01-28 Andrew Cagney <cagney@gnu.org>
* value.h (value_bit_index, print_floating)
(find_rt_vbase_offset): Make buffer a const bfd_byte.
* valprint.c (print_floating): Update.
* valarith.c (value_bit_index): Update.
* valops.c (find_rt_vbase_offset): Update.
Index: valarith.c
===================================================================
RCS file: /cvs/src/src/gdb/valarith.c,v
retrieving revision 1.30
diff -p -u -r1.30 valarith.c
--- valarith.c 21 Nov 2004 19:52:13 -0000 1.30
+++ valarith.c 28 Jan 2005 16:43:15 -0000
@@ -1367,7 +1367,7 @@ value_complement (struct value *arg1)
Return -1 if out of range, -2 other error. */
int
-value_bit_index (struct type *type, char *valaddr, int index)
+value_bit_index (struct type *type, const bfd_byte *valaddr, int index)
{
LONGEST low_bound, high_bound;
LONGEST word;
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.139
diff -p -u -r1.139 valops.c
--- valops.c 21 Nov 2004 19:52:13 -0000 1.139
+++ valops.c 28 Jan 2005 16:43:15 -0000
@@ -1354,8 +1354,9 @@ search_struct_field (char *name, struct
* conventions. */
void
-find_rt_vbase_offset (struct type *type, struct type *basetype, char *valaddr,
- int offset, int *boffset_p, int *skip_p)
+find_rt_vbase_offset (struct type *type, struct type *basetype,
+ const bfd_byte *valaddr, int offset, int *boffset_p,
+ int *skip_p)
{
int boffset; /* offset of virtual base */
int index; /* displacement to use in virtual table */
Index: valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/valprint.c,v
retrieving revision 1.37
diff -p -u -r1.37 valprint.c
--- valprint.c 28 Jan 2005 16:23:51 -0000 1.37
+++ valprint.c 28 Jan 2005 16:43:15 -0000
@@ -284,7 +284,8 @@ longest_to_int (LONGEST arg)
TYPE_CODE_FLT), pointed to in GDB by VALADDR, on STREAM. */
void
-print_floating (char *valaddr, struct type *type, struct ui_file *stream)
+print_floating (const bfd_byte *valaddr, struct type *type,
+ struct ui_file *stream)
{
DOUBLEST doub;
int inv;
Index: value.h
===================================================================
RCS file: /cvs/src/src/gdb/value.h,v
retrieving revision 1.63
diff -p -u -r1.63 value.h
--- value.h 27 Jan 2005 21:48:27 -0000 1.63
+++ value.h 28 Jan 2005 16:43:16 -0000
@@ -382,7 +382,8 @@ extern struct value *register_value_bein
extern struct value *value_in (struct value *element, struct value *set);
-extern int value_bit_index (struct type *type, char *addr, int index);
+extern int value_bit_index (struct type *type, const bfd_byte *addr,
+ int index);
extern int using_struct_return (struct type *value_type, int gcc_p);
@@ -466,7 +467,7 @@ extern char *baseclass_addr (struct type
extern void print_longest (struct ui_file *stream, int format,
int use_local, LONGEST val);
-extern void print_floating (char *valaddr, struct type *type,
+extern void print_floating (const bfd_byte *valaddr, struct type *type,
struct ui_file *stream);
extern int value_print (struct value *val, struct ui_file *stream, int format,
@@ -515,8 +516,8 @@ extern struct value *value_slice (struct
extern struct value *value_literal_complex (struct value *, struct value *,
struct type *);
-extern void find_rt_vbase_offset (struct type *, struct type *, char *, int,
- int *, int *);
+extern void find_rt_vbase_offset (struct type *, struct type *,
+ const bfd_byte *, int, int *, int *);
extern struct value *find_function_in_inferior (const char *);