aboutsummaryrefslogtreecommitdiff
path: root/gdb/irix5-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/irix5-nat.c')
-rw-r--r--gdb/irix5-nat.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 12907c5..ea37b8c 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -352,7 +352,7 @@ static int disable_break (void);
static void info_sharedlibrary_command (char *, int);
-static int symbol_add_stub (char *);
+static int symbol_add_stub (void *);
static struct so_list *find_solib (struct so_list *);
@@ -364,7 +364,7 @@ static void xfer_link_map_member (struct so_list *, struct link_map *);
static CORE_ADDR locate_base (void);
-static int solib_map_sections (char *);
+static int solib_map_sections (void *);
/*
@@ -394,8 +394,7 @@ static int solib_map_sections (char *);
*/
static int
-solib_map_sections (arg)
- char *arg;
+solib_map_sections (void *arg)
{
struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
char *filename;
@@ -460,6 +459,7 @@ solib_map_sections (arg)
/* Free the file names, close the file now. */
do_cleanups (old_chain);
+ /* must be non-zero */
return (1);
}
@@ -564,12 +564,13 @@ first_link_map_member ()
return NULL;
/* Get first list entry. */
- lladdr = (CORE_ADDR) listp;
+ /* The MIPS Sign extends addresses. */
+ lladdr = host_pointer_to_address (listp);
read_memory (lladdr, (char *) &list_old, sizeof (struct obj_list));
/* The first entry in the list is the object file we are debugging,
so skip it. */
- next_lladdr = (CORE_ADDR) list_old.next;
+ next_lladdr = host_pointer_to_address (list_old.next);
#ifdef HANDLE_NEW_OBJ_LIST
if (list_old.data == NEW_OBJ_INFO_MAGIC)
@@ -629,7 +630,7 @@ next_link_map_member (so_list_ptr)
status = target_read_memory (lm->l_lladdr,
(char *) &list_old,
sizeof (struct obj_list));
- next_lladdr = (CORE_ADDR) list_old.next;
+ next_lladdr = host_pointer_to_address (list_old.next);
}
#ifdef HANDLE_NEW_OBJ_LIST
else if (lm->l_variant == OBJ_LIST_32)
@@ -682,7 +683,7 @@ xfer_link_map_member (so_list_ptr, lm)
new_lm->l_variant = OBJ_LIST_OLD;
new_lm->l_lladdr = lladdr;
- new_lm->l_next = (CORE_ADDR) list_old.next;
+ new_lm->l_next = host_pointer_to_address (list_old.next);
#ifdef HANDLE_NEW_OBJ_LIST
if (list_old.data == NEW_OBJ_INFO_MAGIC)
@@ -818,8 +819,7 @@ find_solib (so_list_ptr)
/* A small stub to get us past the arg-passing pinhole of catch_errors. */
static int
-symbol_add_stub (arg)
- char *arg;
+symbol_add_stub (void *arg)
{
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
CORE_ADDR text_addr = 0;
@@ -848,6 +848,7 @@ symbol_add_stub (arg)
section_addrs.other[0].addr = text_addr;
so->objfile = symbol_file_add (so->so_name, so->from_tty,
&section_addrs, 0, 0);
+ /* must be non-zero */
return (1);
}