summaryrefslogtreecommitdiff
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
commitcdd476f8690254fd8e3dda07fabc16e21ada4e5e (patch)
treeacbe856db0019fd3034aabd864d079ad0b46aab4 /gdb/findvar.c
parentd2e8b699d0c4f7793b49d35bf64f537c1bbd714a (diff)
downloadgdb-cdd476f8690254fd8e3dda07fabc16e21ada4e5e.tar.gz
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 831ae4bc1b0..d2591321d75 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 ("\