Convert extract/store functions to ISO-C.
This commit is contained in:
parent
e400552667
commit
a9ac8f511f
3 changed files with 20 additions and 29 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
Sat Mar 4 11:49:21 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* defs.h (store_address, store_unsigned_integer, store_address):
|
||||||
|
Replace PTR with void* in delcaration.
|
||||||
|
* findvar.c (extract_signed_integer, extract_unsigned_integer,
|
||||||
|
extract_long_unsigned_integer, extract_address,
|
||||||
|
store_signed_integer, store_unsigned_integer, store_address):
|
||||||
|
Convert definition to ISO-C. Replace PTR with void*.
|
||||||
|
|
||||||
Sat Mar 4 10:57:25 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
Sat Mar 4 10:57:25 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
* defs.h (make_cleanup_func): Document as deprecated.
|
* defs.h (make_cleanup_func): Document as deprecated.
|
||||||
|
|
|
@ -1038,11 +1038,11 @@ extern int extract_long_unsigned_integer (void *, int, LONGEST *);
|
||||||
|
|
||||||
extern CORE_ADDR extract_address (void *, int);
|
extern CORE_ADDR extract_address (void *, int);
|
||||||
|
|
||||||
extern void store_signed_integer (PTR, int, LONGEST);
|
extern void store_signed_integer (void *, int, LONGEST);
|
||||||
|
|
||||||
extern void store_unsigned_integer (PTR, int, ULONGEST);
|
extern void store_unsigned_integer (void *, int, ULONGEST);
|
||||||
|
|
||||||
extern void store_address (PTR, int, LONGEST);
|
extern void store_address (void *, int, LONGEST);
|
||||||
|
|
||||||
/* Setup definitions for host and target floating point formats. We need to
|
/* Setup definitions for host and target floating point formats. We need to
|
||||||
consider the format for `float', `double', and `long double' for both target
|
consider the format for `float', `double', and `long double' for both target
|
||||||
|
|
|
@ -57,10 +57,8 @@ static int read_relative_register_raw_bytes_for_frame PARAMS ((int regnum, char
|
||||||
you lose
|
you lose
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LONGEST
|
LONGEST
|
||||||
extract_signed_integer (addr, len)
|
extract_signed_integer (void *addr, int len)
|
||||||
PTR addr;
|
|
||||||
int len;
|
|
||||||
{
|
{
|
||||||
LONGEST retval;
|
LONGEST retval;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
@ -94,9 +92,7 @@ That operation is not available on integers of more than %d bytes.",
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONGEST
|
ULONGEST
|
||||||
extract_unsigned_integer (addr, len)
|
extract_unsigned_integer (void *addr, int len)
|
||||||
PTR addr;
|
|
||||||
int len;
|
|
||||||
{
|
{
|
||||||
ULONGEST retval;
|
ULONGEST retval;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
@ -130,10 +126,7 @@ That operation is not available on integers of more than %d bytes.",
|
||||||
function returns 1 and sets *PVAL. Otherwise it returns 0. */
|
function returns 1 and sets *PVAL. Otherwise it returns 0. */
|
||||||
|
|
||||||
int
|
int
|
||||||
extract_long_unsigned_integer (addr, orig_len, pval)
|
extract_long_unsigned_integer (void *addr, int orig_len, LONGEST *pval)
|
||||||
PTR addr;
|
|
||||||
int orig_len;
|
|
||||||
LONGEST *pval;
|
|
||||||
{
|
{
|
||||||
char *p, *first_addr;
|
char *p, *first_addr;
|
||||||
int len;
|
int len;
|
||||||
|
@ -177,9 +170,7 @@ extract_long_unsigned_integer (addr, orig_len, pval)
|
||||||
}
|
}
|
||||||
|
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
extract_address (addr, len)
|
extract_address (void *addr, int len)
|
||||||
PTR addr;
|
|
||||||
int len;
|
|
||||||
{
|
{
|
||||||
/* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
|
/* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
|
||||||
whether we want this to be true eventually. */
|
whether we want this to be true eventually. */
|
||||||
|
@ -187,10 +178,7 @@ extract_address (addr, len)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
store_signed_integer (addr, len, val)
|
store_signed_integer (void *addr, int len, LONGEST val)
|
||||||
PTR addr;
|
|
||||||
int len;
|
|
||||||
LONGEST val;
|
|
||||||
{
|
{
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
unsigned char *startaddr = (unsigned char *) addr;
|
unsigned char *startaddr = (unsigned char *) addr;
|
||||||
|
@ -217,10 +205,7 @@ store_signed_integer (addr, len, val)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
store_unsigned_integer (addr, len, val)
|
store_unsigned_integer (void *addr, int len, ULONGEST val)
|
||||||
PTR addr;
|
|
||||||
int len;
|
|
||||||
ULONGEST val;
|
|
||||||
{
|
{
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
unsigned char *startaddr = (unsigned char *) addr;
|
unsigned char *startaddr = (unsigned char *) addr;
|
||||||
|
@ -250,10 +235,7 @@ store_unsigned_integer (addr, len, val)
|
||||||
gdb-local memory pointed to by "addr"
|
gdb-local memory pointed to by "addr"
|
||||||
for "len" bytes. */
|
for "len" bytes. */
|
||||||
void
|
void
|
||||||
store_address (addr, len, val)
|
store_address (void *addr, int len, LONGEST val)
|
||||||
PTR addr;
|
|
||||||
int len;
|
|
||||||
LONGEST val;
|
|
||||||
{
|
{
|
||||||
store_unsigned_integer (addr, len, val);
|
store_unsigned_integer (addr, len, val);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue