aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-07-24 22:46:48 +0000
committerAndrew Cagney <cagney@redhat.com>2002-07-24 22:46:48 +0000
commit37611a2b102505daefdae7cb47a60c84fb2a9a09 (patch)
tree5d5a6b3bc72b6f2960ee3d8a1b42292d28aca07d
parent18ff05380b97c423b27dfe6e9a724a8d326dff68 (diff)
downloadgdb-37611a2b102505daefdae7cb47a60c84fb2a9a09.zip
gdb-37611a2b102505daefdae7cb47a60c84fb2a9a09.tar.gz
gdb-37611a2b102505daefdae7cb47a60c84fb2a9a09.tar.bz2
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.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/defs.h4
-rw-r--r--gdb/findvar.c16
3 files changed, 18 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 79ac321..f55379b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+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.
diff --git a/gdb/defs.h b/gdb/defs.h
index 7dea2b7..a96948c 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1071,9 +1071,9 @@ extern void *alloca ();
/* 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 *);
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 831ae4b..d259132 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -47,12 +47,12 @@ you lose
#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 ("\
@@ -81,12 +81,12 @@ That operation is not available on integers of more than %d bytes.",
}
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 ("\