Change len's type to ULONGEST: remote_read_bytes and get_core_siginfo
[deliverable/binutils-gdb.git] / gdb / solib-ia64-hpux.c
index 8a45d75f9663bedc095fc85cfa4ff1a4a45ce08b..b53caa8e5d9da10775e6a340b9d01184ba03df17 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -86,8 +86,8 @@ new_so_list (char *so_name, struct load_module_desc module_desc)
 {
   struct so_list *new_so;
 
-  new_so = (struct so_list *) XZALLOC (struct so_list);
-  new_so->lm_info = (struct lm_info *) XZALLOC (struct lm_info);
+  new_so = (struct so_list *) XCNEW (struct so_list);
+  new_so->lm_info = (struct lm_info *) XCNEW (struct lm_info);
   new_so->lm_info->module_desc = module_desc;
 
   strncpy (new_so->so_name, so_name, SO_NAME_MAX_PATH_SIZE - 1);
@@ -164,7 +164,7 @@ ia64_hpux_at_dld_breakpoint_1_p (ptid_t ptid)
 int
 ia64_hpux_at_dld_breakpoint_p (ptid_t ptid)
 {
-  struct gdb_exception e;
+  volatile struct gdb_exception e;
   ptid_t saved_ptid = inferior_ptid;
   int result = 0;
 
@@ -189,7 +189,7 @@ ia64_hpux_handle_load_event (struct regcache *regcache)
   CORE_ADDR module_desc_addr;
   ULONGEST module_desc_size;
   CORE_ADDR so_path_addr;
-  char so_path[MAXPATHLEN];
+  char so_path[PATH_MAX];
   struct load_module_desc module_desc;
   struct so_list *new_so;
 
@@ -210,7 +210,7 @@ ia64_hpux_handle_load_event (struct regcache *regcache)
              sizeof (struct load_module_desc),
             pulongest (module_desc_size));
 
-  read_memory_string (so_path_addr, so_path, MAXPATHLEN);
+  read_memory_string (so_path_addr, so_path, PATH_MAX);
   read_memory (module_desc_addr, (gdb_byte *) &module_desc,
               sizeof (module_desc));
 
@@ -278,7 +278,7 @@ ia64_hpux_handle_dld_breakpoint_1 (ptid_t ptid)
 void
 ia64_hpux_handle_dld_breakpoint (ptid_t ptid)
 {
-  struct gdb_exception e;
+  volatile struct gdb_exception e;
   ptid_t saved_ptid = inferior_ptid;
 
   inferior_ptid = ptid;
@@ -336,7 +336,8 @@ ia64_hpux_relocate_section_addresses (struct so_list *so,
      bfd, whereas we would have had to open our own if we wanted to do it
      while processing the library-load event.  */
   if (so->lm_info->text_start == 0 && so->lm_info->data_start == 0)
-    ia64_hpux_find_start_vma (sec->bfd, &so->lm_info->text_start,
+    ia64_hpux_find_start_vma (sec->the_bfd_section->owner,
+                             &so->lm_info->text_start,
                              &so->lm_info->data_start);
 
   /* Determine the relocation offset based on which segment
@@ -396,7 +397,7 @@ ia64_hpux_clear_solib (void)
 static CORE_ADDR
 ia64_hpux_get_load_info_addr (void)
 {
-  struct type *data_ptr_type = builtin_type (target_gdbarch)->builtin_data_ptr;
+  struct type *data_ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
   CORE_ADDR addr;
   int status;
 
@@ -459,7 +460,8 @@ ia64_hpux_read_dynamic_info (struct gdbarch *gdbarch, bfd *abfd,
             {
               CORE_ADDR load_map_addr = bfd_h_get_64 (abfd, &dynp->d_un.d_ptr);
 
-              if (target_read_memory (load_map_addr, (char *) &info->load_map,
+              if (target_read_memory (load_map_addr,
+                                     (gdb_byte *) &info->load_map,
                                       sizeof (info->load_map)) != 0)
                error (_("failed to read load map at %s"),
                       paddress (gdbarch, load_map_addr));
@@ -675,7 +677,7 @@ ia64_hpux_get_solib_linkage_addr (CORE_ADDR faddr)
 static struct target_so_ops *
 ia64_hpux_target_so_ops (void)
 {
-  struct target_so_ops *ops = XZALLOC (struct target_so_ops);
+  struct target_so_ops *ops = XCNEW (struct target_so_ops);
 
   ops->relocate_section_addresses = ia64_hpux_relocate_section_addresses;
   ops->free_so = ia64_hpux_free_so;
This page took 0.026915 seconds and 4 git commands to generate.