From: Andrew Cagney Date: Mon, 6 Jan 2003 18:49:09 +0000 (+0000) Subject: 2003-01-06 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=66140c26166febde29e6e7f2001674a930967545;p=binutils-gdb.git 2003-01-06 Andrew Cagney * MAINTAINERS (Target Instruction Set Architectures): Update arm-elf. Can be built with -Werror, has been multiarched. * value.h (unpack_long): Make buffer parameter constant. (unpack_double, unpack_pointer, unpack_field_as_long): Ditto. * scm-lang.h (scm_parse): Ditto. * defs.h (extract_typed_address, extract_address): Ditto. (extract_long_unsigned_integer): Ditto. * inferior.h (unsigned_pointer_to_address): Ditto. (signed_pointer_to_address): Ditto. * gdbarch.sh (POINTER_TO_ADDRESS): Ditto. * gdbarch.h, gdbarch.c: Regenerate. * findvar.c (extract_long_unsigned_integer): Update. (extract_address): Update. (extract_typed_address): Update. (unsigned_pointer_to_address): Update. * values.c (unpack_long): Update. (unpack_double): Update. (unpack_pointer): Update. (unpack_field_as_long): Update. * d10v-tdep.c (d10v_pointer_to_address): Update. * avr-tdep.c (avr_pointer_to_address): Update. * scm-lang.c (scm_unpack): Update. * findvar.c (signed_pointer_to_address): Update. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 408592ee70d..f5c06270526 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,30 @@ +2003-01-06 Andrew Cagney + + * MAINTAINERS (Target Instruction Set Architectures): Update + arm-elf. Can be built with -Werror, has been multiarched. + + * value.h (unpack_long): Make buffer parameter constant. + (unpack_double, unpack_pointer, unpack_field_as_long): Ditto. + * scm-lang.h (scm_parse): Ditto. + * defs.h (extract_typed_address, extract_address): Ditto. + (extract_long_unsigned_integer): Ditto. + * inferior.h (unsigned_pointer_to_address): Ditto. + (signed_pointer_to_address): Ditto. + * gdbarch.sh (POINTER_TO_ADDRESS): Ditto. + * gdbarch.h, gdbarch.c: Regenerate. + * findvar.c (extract_long_unsigned_integer): Update. + (extract_address): Update. + (extract_typed_address): Update. + (unsigned_pointer_to_address): Update. + * values.c (unpack_long): Update. + (unpack_double): Update. + (unpack_pointer): Update. + (unpack_field_as_long): Update. + * d10v-tdep.c (d10v_pointer_to_address): Update. + * avr-tdep.c (avr_pointer_to_address): Update. + * scm-lang.c (scm_unpack): Update. + * findvar.c (signed_pointer_to_address): Update. + 2003-01-06 Michal Ludvig * x86-64-linux-nat.c (i386_sse_regnum_p): Deleted. Not needed anymore diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS index feb558b9c7e..b6a76555cbf 100644 --- a/gdb/MAINTAINERS +++ b/gdb/MAINTAINERS @@ -62,11 +62,10 @@ maintainer works with the native maintainer when resolving API issues. arc Deleted. - arm --target=arm-elf , + arm --target=arm-elf ,-Werror Fernando Nasser fnasser@redhat.com Scott Bambrough scottb@netwinder.org Richard Earnshaw rearnsha@arm.com - Not multi-arch avr --target=avr ,-Werror Theodore A. Roth troth@verinet.com diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 64f8822bc6a..07f0ece34b3 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -322,7 +322,7 @@ avr_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr) } static CORE_ADDR -avr_pointer_to_address (struct type *type, void *buf) +avr_pointer_to_address (struct type *type, const void *buf) { CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type)); diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index 46f312941d8..3707cd03312 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -429,7 +429,7 @@ d10v_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr) } static CORE_ADDR -d10v_pointer_to_address (struct type *type, void *buf) +d10v_pointer_to_address (struct type *type, const void *buf) { CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type)); diff --git a/gdb/defs.h b/gdb/defs.h index 0e7539aa85d..3ca68475b08 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -1111,11 +1111,11 @@ extern LONGEST extract_signed_integer (const void *, int); extern ULONGEST extract_unsigned_integer (const void *, int); -extern int extract_long_unsigned_integer (void *, int, LONGEST *); +extern int extract_long_unsigned_integer (const void *, int, LONGEST *); -extern CORE_ADDR extract_address (void *, int); +extern CORE_ADDR extract_address (const void *, int); -extern CORE_ADDR extract_typed_address (void *buf, struct type *type); +extern CORE_ADDR extract_typed_address (const void *buf, struct type *type); extern void store_signed_integer (void *, int, LONGEST); diff --git a/gdb/findvar.c b/gdb/findvar.c index 9a34b851c9e..980bb57880e 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -115,7 +115,7 @@ That operation is not available on integers of more than %d bytes.", function returns 1 and sets *PVAL. Otherwise it returns 0. */ int -extract_long_unsigned_integer (void *addr, int orig_len, LONGEST *pval) +extract_long_unsigned_integer (const void *addr, int orig_len, LONGEST *pval) { char *p, *first_addr; int len; @@ -173,7 +173,7 @@ extract_long_unsigned_integer (void *addr, int orig_len, LONGEST *pval) else based on POINTER_TO_ADDRESS. */ CORE_ADDR -extract_address (void *addr, int len) +extract_address (const void *addr, int len) { /* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure whether we want this to be true eventually. */ @@ -184,7 +184,7 @@ extract_address (void *addr, int len) /* Treat the bytes at BUF as a pointer of type TYPE, and return the address it represents. */ CORE_ADDR -extract_typed_address (void *buf, struct type *type) +extract_typed_address (const void *buf, struct type *type) { if (TYPE_CODE (type) != TYPE_CODE_PTR && TYPE_CODE (type) != TYPE_CODE_REF) @@ -347,13 +347,13 @@ value_of_register (int regnum, struct frame_info *frame) /* Given a pointer of type TYPE in target form in BUF, return the address it represents. */ CORE_ADDR -unsigned_pointer_to_address (struct type *type, void *buf) +unsigned_pointer_to_address (struct type *type, const void *buf) { return extract_address (buf, TYPE_LENGTH (type)); } CORE_ADDR -signed_pointer_to_address (struct type *type, void *buf) +signed_pointer_to_address (struct type *type, const void *buf) { return extract_signed_integer (buf, TYPE_LENGTH (type)); } diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index e39ff5a116d..9519bb3cf62 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -4025,7 +4025,7 @@ set_gdbarch_value_to_register (struct gdbarch *gdbarch, } CORE_ADDR -gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) +gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf) { gdb_assert (gdbarch != NULL); if (gdbarch->pointer_to_address == 0) diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index d973fa30eeb..bc5d9ca4cbb 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1428,8 +1428,8 @@ extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_valu #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf)) #endif -typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, void *buf); -extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf); +typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf); +extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf); extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address); #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS) #error "Non multi-arch definition of POINTER_TO_ADDRESS" diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 5848ca81334..12131d88ac5 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -530,7 +530,7 @@ f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum:regnum::0:legacy_conver f:1:REGISTER_TO_VALUE:void:register_to_value:int regnum, struct type *type, char *from, char *to:regnum, type, from, to::0:legacy_register_to_value::0 f:1:VALUE_TO_REGISTER:void:value_to_register:struct type *type, int regnum, char *from, char *to:type, regnum, from, to::0:legacy_value_to_register::0 # -f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, void *buf:type, buf:::unsigned_pointer_to_address::0 +f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, const void *buf:type, buf:::unsigned_pointer_to_address::0 f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr:::unsigned_address_to_pointer::0 F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf # diff --git a/gdb/inferior.h b/gdb/inferior.h index 09cd7ff4c9d..79ca670eebb 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -185,11 +185,12 @@ extern CORE_ADDR read_fp (void); extern CORE_ADDR generic_target_read_fp (void); -extern CORE_ADDR unsigned_pointer_to_address (struct type *type, void *buf); +extern CORE_ADDR unsigned_pointer_to_address (struct type *type, const void *buf); extern void unsigned_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr); -extern CORE_ADDR signed_pointer_to_address (struct type *type, void *buf); +extern CORE_ADDR signed_pointer_to_address (struct type *type, + const void *buf); extern void address_to_signed_pointer (struct type *type, void *buf, CORE_ADDR addr); diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c index 5b2f0c5b665..4d3f2c18741 100644 --- a/gdb/scm-lang.c +++ b/gdb/scm-lang.c @@ -87,7 +87,7 @@ scm_get_field (LONGEST svalue, int index) or Boolean (CONTEXT == TYPE_CODE_BOOL). */ LONGEST -scm_unpack (struct type *type, char *valaddr, enum type_code context) +scm_unpack (struct type *type, const char *valaddr, enum type_code context) { if (is_scmvalue_type (type)) { diff --git a/gdb/scm-lang.h b/gdb/scm-lang.h index 713b0309028..e3af0a16768 100644 --- a/gdb/scm-lang.h +++ b/gdb/scm-lang.h @@ -67,4 +67,4 @@ extern struct type *builtin_type_scm; extern int scm_parse (void); -extern LONGEST scm_unpack (struct type *, char *, enum type_code); +extern LONGEST scm_unpack (struct type *, const char *, enum type_code); diff --git a/gdb/value.h b/gdb/value.h index 7e108c691e2..1ba28641c10 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -284,13 +284,14 @@ extern DOUBLEST value_as_double (struct value *val); extern CORE_ADDR value_as_address (struct value *val); -extern LONGEST unpack_long (struct type *type, char *valaddr); +extern LONGEST unpack_long (struct type *type, const char *valaddr); -extern DOUBLEST unpack_double (struct type *type, char *valaddr, int *invp); +extern DOUBLEST unpack_double (struct type *type, const char *valaddr, + int *invp); -extern CORE_ADDR unpack_pointer (struct type *type, char *valaddr); +extern CORE_ADDR unpack_pointer (struct type *type, const char *valaddr); -extern LONGEST unpack_field_as_long (struct type *type, char *valaddr, +extern LONGEST unpack_field_as_long (struct type *type, const char *valaddr, int fieldno); extern struct value *value_from_longest (struct type *type, LONGEST num); diff --git a/gdb/values.c b/gdb/values.c index 950dee68e99..5b76d6c0766 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -679,7 +679,7 @@ value_as_address (struct value *val) to an INT (or some size). After all, it is only an offset. */ LONGEST -unpack_long (struct type *type, char *valaddr) +unpack_long (struct type *type, const char *valaddr) { register enum type_code code = TYPE_CODE (type); register int len = TYPE_LENGTH (type); @@ -728,7 +728,7 @@ unpack_long (struct type *type, char *valaddr) format, result is in host format. */ DOUBLEST -unpack_double (struct type *type, char *valaddr, int *invp) +unpack_double (struct type *type, const char *valaddr, int *invp) { enum type_code code; int len; @@ -785,7 +785,7 @@ unpack_double (struct type *type, char *valaddr, int *invp) to an INT (or some size). After all, it is only an offset. */ CORE_ADDR -unpack_pointer (struct type *type, char *valaddr) +unpack_pointer (struct type *type, const char *valaddr) { /* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure whether we want this to be true eventually. */ @@ -1038,7 +1038,7 @@ value_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *ty If the field is signed, we also do sign extension. */ LONGEST -unpack_field_as_long (struct type *type, char *valaddr, int fieldno) +unpack_field_as_long (struct type *type, const char *valaddr, int fieldno) { ULONGEST val; ULONGEST valmask; diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 0c14f3da14f..aaf5ae2d016 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -958,7 +958,7 @@ xstormy16_in_solib_call_trampoline (CORE_ADDR pc, char *name) } static CORE_ADDR -xstormy16_pointer_to_address (struct type *type, void *buf) +xstormy16_pointer_to_address (struct type *type, const void *buf) { enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type)); CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));