aboutsummaryrefslogtreecommitdiff
path: root/gdb/findvar.c
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 /gdb/findvar.c
parent18ff05380b97c423b27dfe6e9a724a8d326dff68 (diff)
downloadfsf-binutils-gdb-37611a2b102505daefdae7cb47a60c84fb2a9a09.zip
fsf-binutils-gdb-37611a2b102505daefdae7cb47a60c84fb2a9a09.tar.gz
fsf-binutils-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.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r--gdb/findvar.c16
1 files changed, 8 insertions, 8 deletions
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 ("\