summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-05-23 18:20:03 +0000
committerAndrew Cagney <cagney@redhat.com>2005-05-23 18:20:03 +0000
commit36aa5e41a20700ef558dc5d8362653ea1c8a4ec9 (patch)
tree076fe36fe9dcda8d6bb5aa3ef5e39d27036d3fcf
parent0c552dc1882e1b7cfe81f27117631f04a92381bb (diff)
downloadbinutils-gdb-36aa5e41a20700ef558dc5d8362653ea1c8a4ec9.tar.gz
2005-05-23 Andrew Cagney <cagney@gnu.org>
* auxv.h (target_auxv_read, procfs_xfer_auxv) (target_auxv_parse): Use gdb_byte for byte buffer parameters. * auxv.c (target_auxv_read, procfs_xfer_auxv, target_auxv_parse) (target_auxv_search, fprint_target_auxv): Update.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/auxv.c22
-rw-r--r--gdb/auxv.h8
3 files changed, 22 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dd947effac4..71876080ab1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2005-05-23 Andrew Cagney <cagney@gnu.org>
+
+ * auxv.h (target_auxv_read, procfs_xfer_auxv)
+ (target_auxv_parse): Use gdb_byte for byte buffer parameters.
+ * auxv.c (target_auxv_read, procfs_xfer_auxv, target_auxv_parse)
+ (target_auxv_search, fprint_target_auxv): Update.
+
2005-05-23 Orjan Friberg <orjanf@axis.com>
* cris-tdep.c: Tweak values for cris-mode.
diff --git a/gdb/auxv.c b/gdb/auxv.c
index d09fc38b776..05d424bd693 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -45,8 +45,8 @@ LONGEST
procfs_xfer_auxv (struct target_ops *ops,
int /* enum target_object */ object,
const char *annex,
- void *readbuf,
- const void *writebuf,
+ gdb_byte *readbuf,
+ const gdb_byte *writebuf,
ULONGEST offset,
LONGEST len)
{
@@ -81,10 +81,10 @@ procfs_xfer_auxv (struct target_ops *ops,
If zero, there is no data and *DATA is null.
if < 0, there was an error and *DATA is null. */
LONGEST
-target_auxv_read (struct target_ops *ops, char **data)
+target_auxv_read (struct target_ops *ops, gdb_byte **data)
{
size_t auxv_alloc = 512, auxv_pos = 0;
- char *auxv = xmalloc (auxv_alloc);
+ gdb_byte *auxv = xmalloc (auxv_alloc);
int n;
while (1)
@@ -118,11 +118,11 @@ target_auxv_read (struct target_ops *ops, char **data)
Return -1 if there is insufficient buffer for a whole entry.
Return 1 if an entry was read into *TYPEP and *VALP. */
int
-target_auxv_parse (struct target_ops *ops, char **readptr, char *endptr,
- CORE_ADDR *typep, CORE_ADDR *valp)
+target_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
+ gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
{
const int sizeof_auxv_field = TYPE_LENGTH (builtin_type_void_data_ptr);
- char *ptr = *readptr;
+ gdb_byte *ptr = *readptr;
if (endptr == ptr)
return 0;
@@ -147,9 +147,9 @@ int
target_auxv_search (struct target_ops *ops, CORE_ADDR match, CORE_ADDR *valp)
{
CORE_ADDR type, val;
- char *data;
+ gdb_byte *data;
int n = target_auxv_read (ops, &data);
- char *ptr = data;
+ gdb_byte *ptr = data;
int ents = 0;
if (n <= 0)
@@ -183,9 +183,9 @@ int
fprint_target_auxv (struct ui_file *file, struct target_ops *ops)
{
CORE_ADDR type, val;
- char *data;
+ gdb_byte *data;
int len = target_auxv_read (ops, &data);
- char *ptr = data;
+ gdb_byte *ptr = data;
int ents = 0;
if (len <= 0)
diff --git a/gdb/auxv.h b/gdb/auxv.h
index 4ce0569a591..899fc5af90f 100644
--- a/gdb/auxv.h
+++ b/gdb/auxv.h
@@ -35,14 +35,14 @@ struct target_ops; /* Forward declaration. */
stored in *DATA. Return the size in bytes of this data.
If zero, there is no data and *DATA is null.
if < 0, there was an error and *DATA is null. */
-extern LONGEST target_auxv_read (struct target_ops *ops, char **data);
+extern LONGEST target_auxv_read (struct target_ops *ops, gdb_byte **data);
/* Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
Return 0 if *READPTR is already at the end of the buffer.
Return -1 if there is insufficient buffer for a whole entry.
Return 1 if an entry was read into *TYPEP and *VALP. */
extern int target_auxv_parse (struct target_ops *ops,
- char **readptr, char *endptr,
+ gdb_byte **readptr, gdb_byte *endptr,
CORE_ADDR *typep, CORE_ADDR *valp);
/* Extract the auxiliary vector entry with a_type matching MATCH.
@@ -66,8 +66,8 @@ extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops);
extern LONGEST procfs_xfer_auxv (struct target_ops *ops,
int /* enum target_object */ object,
const char *annex,
- void *readbuf,
- const void *writebuf,
+ gdb_byte *readbuf,
+ const gdb_byte *writebuf,
ULONGEST offset,
LONGEST len);