+2002-07-24 Andrew Cagney <cagney@redhat.com>
+
+ * findvar.c (extract_unsigned_integer): Make `addr' parameter
+ constant. Same for local pointer variables.
+ (extract_signed_integer): Ditto.
+ * defs.h (extract_unsigned_integer): Update.
+ (extract_signed_integer): Update.
+
2002-07-24 Kevin Buettner <kevinb@redhat.com>
* gdbserver/configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
/* In findvar.c. */
-extern LONGEST extract_signed_integer (void *, int);
+extern LONGEST extract_signed_integer (const void *, int);
-extern ULONGEST extract_unsigned_integer (void *, int);
+extern ULONGEST extract_unsigned_integer (const void *, int);
extern int extract_long_unsigned_integer (void *, int, LONGEST *);
#endif
LONGEST
-extract_signed_integer (void *addr, int len)
+extract_signed_integer (const void *addr, int len)
{
LONGEST retval;
- unsigned char *p;
- unsigned char *startaddr = (unsigned char *) addr;
- unsigned char *endaddr = startaddr + len;
+ const unsigned char *p;
+ const unsigned char *startaddr = addr;
+ const unsigned char *endaddr = startaddr + len;
if (len > (int) sizeof (LONGEST))
error ("\
}
ULONGEST
-extract_unsigned_integer (void *addr, int len)
+extract_unsigned_integer (const void *addr, int len)
{
ULONGEST retval;
- unsigned char *p;
- unsigned char *startaddr = (unsigned char *) addr;
- unsigned char *endaddr = startaddr + len;
+ const unsigned char *p;
+ const unsigned char *startaddr = addr;
+ const unsigned char *endaddr = startaddr + len;
if (len > (int) sizeof (ULONGEST))
error ("\