+2003-01-06 Andrew Cagney <cagney@redhat.com>
+
+ * 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 <mludvig@suse.cz>
* x86-64-linux-nat.c (i386_sse_regnum_p): Deleted. Not needed anymore
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
}
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));
}
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));
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);
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;
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. */
/* 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)
/* 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));
}
}
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)
#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"
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
#
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);
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))
{
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);
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);
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);
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;
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. */
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;
}
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));