]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/solib-ia64-hpux.c
C++ keyword cleanliness, mostly auto-generated
[thirdparty/binutils-gdb.git] / gdb / solib-ia64-hpux.c
index f349c4c8674590a3bff55dfcdfe4490b660e14ac..3b0bf4800f0c91152427c45019a2a4fb21d0160b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,7 +30,6 @@
 #include "symfile.h"
 #include "objfiles.h"
 #include "elf-bfd.h"
-#include "exceptions.h"
 
 /* Need to define the following macro in order to get the complete
    load_module_desc struct definition in dlfcn.h  Otherwise, it doesn't
@@ -86,8 +85,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);
@@ -120,7 +119,7 @@ ia64_hpux_at_dld_breakpoint_1_p (ptid_t ptid)
   struct regcache *regcache = get_thread_regcache (ptid);
   CORE_ADDR pc = regcache_read_pc (regcache);
   struct address_space *aspace = get_regcache_aspace (regcache);
-  ia64_insn t0, t1, slot[3], template, insn;
+  ia64_insn t0, t1, slot[3], templ, insn;
   int slotnum;
   bfd_byte bundle[16];
 
@@ -140,12 +139,12 @@ ia64_hpux_at_dld_breakpoint_1_p (ptid_t ptid)
   /* bundles are always in little-endian byte order */
   t0 = bfd_getl64 (bundle);
   t1 = bfd_getl64 (bundle + 8);
-  template = (t0 >> 1) & 0xf;
+  templ = (t0 >> 1) & 0xf;
   slot[0] = (t0 >>  5) & 0x1ffffffffffLL;
   slot[1] = ((t0 >> 46) & 0x3ffff) | ((t1 & 0x7fffff) << 18);
   slot[2] = (t1 >> 23) & 0x1ffffffffffLL;
 
-  if (template == 2 && slotnum == 1)
+  if (templ == 2 && slotnum == 1)
     {
       /* skip L slot in MLI template: */
       slotnum = 2;
@@ -189,7 +188,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 +209,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));
 
@@ -336,7 +335,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 +396,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 +459,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 +676,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;